Learn

From boykush/scraps · View interactive version

Learn is an AI agent skill from the GitHub repository boykush/scraps. Learn a source together with the user and record only what they understood as a new page in this Scraps wiki. Explains the source with a diagram anchored on the pages the wiki already has, checks comprehension with questions, then writes one page from the points that passed; when understanding is no

How to use this skill

Skill file

Learn

Help the user understand a source, then record only what they understood as one page in the wiki.

The wiki is a record of the user's understanding, not of what its sources say. When an AI drafts a summary and the user approves it, nobody can tell what was understood from what was merely read and nodded at. So before anything is written, the user answers for themselves. The goal is the user's understanding, and the page is what remains of it. A run that ends with nothing written, because understanding was not reached, has ended correctly.

Hold the dialogue and write the page in the user's language.

Boundaries

Asking the user

Several steps put choices to the user. How depends on the client, so decide it from the tools you actually have:

Either way the user can always answer in their own words. Take such an answer as it is rather than forcing it onto an option.

1. Find where the user stands

The existing pages are the list of what the user already understands. Reading them decides where the explanation starts and what it can skip.

  1. Read the source and identify its central terms and claims. For a URL, fetch the primary source; given only a term, find a primary source for it. If only part of a source can be read (slide hosts such as Speaker Deck often yield just the title and abstract), work from what you could read and say what was missing instead of filling the gap by guessing.
  2. Search with varied wording using scraps search "<query>" --json, then read the 3–8 most related pages by passing each hit's key back: scraps get "<key>" --json.
  3. Split the central terms into those that already have a page and those that do not. A term has a page only when that thing is the page's subject. A page about a source (an article, a talk, one entry of a report or catalog) is not the page for the term in its title, even when the title is exactly the term; read the body to tell, and link such a page only when you mean that source. The former are known ground to build on. Fill in the latter only as far as this run needs, and keep them as candidates for later runs.
  4. Settle the context: the part of the wiki the user is learning this source for, named by the existing page at its center. This is not a context folder. A source usually touches several parts of the wiki, and the user came for one of them. A gateway for agent traffic sits next to both the pages on agent protocols and the pages on cluster networking; a user who came for the first does not want to be quizzed on the second. Decide it in this order:

Do not settle it by which part has the most pages or backlinks. A hub the user filled in long ago would outweigh what they are learning now.

  1. Decide the points that may be recorded: one gist saying what the thing is, and up to three connections saying how it relates to existing pages inside the context. Fewer is fine. A connection outside the context is not a point, however much room the source gives it; name it as a candidate for a later run. With no related pages, the gist alone is enough.

2. Explain

After the explanation, stop and take questions. Move on to the check only when the user says to.

3. Check comprehension

Check the points with multiple-choice questions, then have the user state the gist in their own words.

A question that can be answered by remembering the wording of the explanation does not measure understanding. Give each question one of these shapes:

Set every question inside the context: take the concrete cases from it and the nearby concepts from its pages. What the user asked about during the pause tells you more about the context than your read in step 1 did, so follow it.

Ask one multiple-choice question per point, all at once.

When the answers come back, say for each question whether it was right and why. For a wrong answer or "I don't know", explain again from a different angle (another example, a redrawn diagram) rather than repeating yourself, and check again with a different question. Repeating the same question lets a memorized answer pass.

For "Not interested", drop the point from this run without explaining it again or asking why. It is not a failed point and not a candidate for a later run. It does say your read of the context was off: if most of the points come back this way, stop and ask what the user came for instead of checking further. If the gist itself comes back this way, there is no page to write; end the run there.

Once the multiple-choice questions are settled, ask the user to write what the thing is in one or two sentences. That text becomes the basis of the page's gist. If it disagrees with the source, point out where, then decide by what is wrong:

When in doubt, treat it as the core.

Explain each point again about once. A point that still does not pass is left out of this run.

4. Settle the page plan

If the gist did not pass, say where understanding stopped and end without writing.

Otherwise, without writing any file yet, present:

A page's subject is either a thing (a term, tool, or product) or the source itself (an article or talk: who said what, and where). A tool's official site yields a page about the tool. An article or talk yields a page titled with the source's own title, neither translated nor shortened.

Then ask only about the items where judgment could go either way. The recommended plan passes by default, so do not turn settled items into questions.

Wait for the user to confirm or correct the plan.

5. Write the page

6. Link existing pages to the new one

  1. Run scraps lint --rule unlinked-mention and keep the warnings that end in [[<key>]], the new page's key. Each names a page that writes the new title without linking it, at the line shown. Which text counts as a mention is the rule's to decide: take its warnings as the candidates, and do not search the pages yourself.
  2. Present the candidates with their context and your read of each, and let the user pick which to link, several at once. With more candidates than one question holds, list them all in the message body and ask only about those that need judgment.
  3. Convert only the chosen mentions to [[Title]] or [[Title|surface form]].

With no candidates, leave existing pages untouched. Backlinks are computed automatically, so do not add reverse links.

7. Verify

  1. Reread the page. It should hold no explanation without a link and nothing that did not pass the check.
  2. Confirm every tag is an existing tag or a new one the user explicitly agreed to.
  3. Run scraps get "<key>" --json verified and confirm the tier is human-reviewed and that both entries are listed. An entry of the wrong shape is dropped without a warning, so only this shows it was read.
  4. Run scraps lint --rule broken-link --rule source-has-page. A source-has-page warning names the path to write in place of a source URL that has its own page.
  5. Read the diff and confirm that only the new page and the approved links changed.
  6. Report separately: the page created, the links updated, the points left out and the candidates for later runs, anything in the source that could not be read, and warnings unrelated to this change.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.