Your first study guide
In this tutorial you run the whole study-guide loop once, on a small repository you can download. You write a guide with one skill, have a second model check it with another, and fold the findings back in with a third. At the end you’ll have a fact-checked, reconciled guide in a local clone, and a report listing every change made to it.
The three skills are
codebase-study-guide,
study-guide-fact-check and
study-guide-reconcile. Why the loop
has three steps is in
Why I fact-check generated docs.
You don’t need to read it first.
What you need
Section titled “What you need”- Claude Code, signed in, with a choice of at least two models. The fact-check pass should run on a different model from the one that wrote the guide, and step 4 does that.
- Git, to clone the repository.
- Nothing else from the dependencies page. The catalog lists no outside requirements for the study-guides plugin or its three skills.
The repository you’ll use
Section titled “The repository you’ll use”You’ll write a guide for pallets/itsdangerous,
a Python library for signing data so that it can be passed through untrusted places such
as a cookie or a URL. It suits the tutorial because:
- it’s public and under a permissive license, so you can clone it without an account;
- it’s small: about 1,200 lines of Python in
__init__.pyand seven modules undersrc/itsdangerous/, few enough to cover in one session. For a codebase with more than about 10 to 15 modules the skill asks which areas to prioritize, or works entry-point-first; - it has a tagged release,
2.2.0, so you can check out the same code every time and your guide describes the same commit as the one in this tutorial; - it already has a
docs/folder, so you see the skill nest its output underdocs/study-guide/instead of mixing it in.
You’ll only read the repository. Nothing here pushes to it.
1. Install the plugin
Section titled “1. Install the plugin”In Claude Code, run these two commands. They come from the study-guides reference page, which has the install commands for other clients too.
/plugin marketplace add PeterGrace/pg-skills/plugin install study-guides@pg-skillsIf you’ve already added the marketplace, only the second command is new. Start a new Claude Code session afterwards so it loads the plugin.
2. Clone the repository
Section titled “2. Clone the repository”In a terminal, in a scratch directory of your choice:
git clone --depth 1 --branch 2.2.0 --config advice.detachedHead=false https://github.com/pallets/itsdangerous itsdangerous-studycd itsdangerous-studygit rev-parse --short HEADls src/itsdangerousThe commit should print as 096c8d4. The listing should show __init__.py, _json.py,
encoding.py, exc.py, serializer.py, signer.py, timed.py, url_safe.py and
py.typed.
3. Write the guide
Section titled “3. Write the guide”Open Claude Code in the itsdangerous-study directory. Any model works for this pass, as
long as the fact-check in step 4 uses a different one. This tutorial follows Peter’s usual
pairing: write with Opus and check with Sonnet. Switch with /model if you need to. Then
say:
Write a study guide for this codebase.The skill works in phases and in order, and you’ll see each of them.
- Reconnaissance. It detects the language, the build system (
pyproject.toml) and the layout, and looks for entry points. This is a library with nomain, so the entry point is its public interface, whichsrc/itsdangerous/__init__.pyre-exports. It notes the tests and the existingdocs/. It doesn’t read every file yet. - Plan and scope. It lists the modules it found, each with a path and a one-line guess at its job. The skill confirms the scope before it writes the deep dives. If it asks what to prioritize, answer “all of them”.
- Architecture overview. It writes
00-architecture-overview.md, built around a real walk of one primary path through the code, with file references at each step. - Module deep dives. One document per module, written one module at a time.
- Glossary. It collects domain terms and named code constructs.
- Flashcards. It derives Anki-ready cards from the documents it just wrote. You won’t use them in this tutorial.
- Index and checklist. It writes
docs/study-guide/README.md, with a reading order and a checklist of every Open questions / verify with an SME item from all the docs.
When it finishes, look at what it wrote:
find docs/study-guide -type f | sortYou should see this layout. The module and flashcard file names depend on how the model grouped the code.
docs/study-guide/├── 00-architecture-overview.md├── README.md├── glossary.md├── flashcards/<module-or-topic>.txt└── modules/<module-name>.mdOpen 00-architecture-overview.md. Near the top is a header with the generation date
and the commit hash, which should be 096c8d4. Then open the checklist at the bottom of
README.md. These are the places where the guide itself says it isn’t sure. Don’t edit
any of these files by hand: the skill says corrections go through the loop, so that
there’s an audit trail.
4. Fact-check the guide on a different model
Section titled “4. Fact-check the guide on a different model”Open a new Claude Code window in the same directory, so the check starts with a fresh
context. Run /model there and pick a different model from step 3: Sonnet, if you wrote
with Opus. Don’t switch models in the session that wrote the guide, because the writing
conversation would still be in context.
The skills don’t name a model for either pass. What they ask for is that the two differ, because a model checking its own output shares its own blind spots. Then say:
Fact-check the study guide in docs/study-guide/.You should see the skill:
- read the index, and compare the commit in each doc’s header with the current checkout.
Both are
096c8d4, so there’s no drift warning; - pull out each doc’s checkable claims, tagging each as a claim about what the code does, a claim about why, or a cross-reference;
- try to disprove the claims about what the code does, by opening the cited file and the code around it;
- check that claims about why are hedged, and note any important omissions it can point to in the code;
- write the report without changing the guide.
Look at what it wrote:
find docs/study-guide/fact-check -type f | sortThere is a SUMMARY.md and a .review.md file for each doc it reviewed, laid out like the
guide (the flashcards share one flashcards.review.md). Open SUMMARY.md. Read the provenance section, the totals by severity, and the
list under Fix these first (Critical). Then open one .review.md and read a finding.
It has a verdict, a severity, the claim, the evidence (a file and symbol) and a suggested
correction. The review also lists a few spot-checks it verified.
The number of findings will differ from run to run. A pass can find several Critical claims, or only Minor ones, or none. Any of those is a valid result. If it reports no findings, the next step has little to do, and you’ve still run the loop.
5. Reconcile the findings
Section titled “5. Reconcile the findings”The reconcile step can run in the same session, or a new one. The skills don’t name a model for it. It re-checks each finding against the code before it edits anything. Say:
Reconcile the fact-check findings into the study guide.You should see the skill:
- gather the findings from
SUMMARY.mdand the review files; - sort each one into apply, reframe, defer or reject, with Critical findings first;
- re-check each finding it plans to act on against the code, then edit the guide;
- add a revision line to each doc it changed, update the open questions, and update any flashcard that taught a corrected claim;
- write
docs/study-guide/fact-check/RECONCILIATION.md; - suggest a re-check if the edits were substantial.
Now check its work. Open RECONCILIATION.md. The summary table counts the findings per
outcome. Compare the total with the findings in SUMMARY.md. The report is meant to
account for every finding under exactly one outcome.
Then find the revision lines:
grep -rn "Revised by study-guide-reconcile" docs/study-guideOpen one entry under Applied. It has what the guide said before, what it says now and
a Confirmed by line with a file and symbol. Open that file in src/itsdangerous/ and
check the claim yourself. This is the habit the loop is for. If there are any entries
under Deferred, find the matching open question in the guide. The report says why it wasn’t
resolved and how it was left in the guide.
6. Decide whether to check again
Section titled “6. Decide whether to check again”If the report recommends a re-check, you can do it now. Use a new window on the checking
model, as in step 4, with the same fact-check request. It writes new review files and a new
summary. The skills don’t say whether a re-run leaves RECONCILIATION.md in place, so
copy it somewhere outside the fact-check/ folder first if you want to keep it.
Whether to do this, and what to do about the deferred items, is a judgment call. Why I fact-check generated docs says how the author decides.
What you did
Section titled “What you did”You wrote a guide with one pass, had a second model try to disprove it against the code, and applied the corrections the code supported, with a report of what changed and why. The guide is usable now, with its deferred items still flagged.
Next steps
Section titled “Next steps”- Delete the clone when you’ve finished with it: remove the
itsdangerous-studydirectory. - Do the same on a repository of your own, then use Fact-check and reconcile a study guide whenever you have a guide to check.
- Read Why I fact-check generated docs for the reasons behind each step.