/pkm:learn [source]from pkm
Guides the user through learning a source (URL, article, talk, term) and records only what they understood as a new page in a Scraps wiki. Includes diagram-based explanation, comprehension checks, and writes nothing if understanding is not reached.
Ships in pkm. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
Several steps put choices to the user. How depends on the client, so decide it from the tools you actually have:
AskUserQuestion in Claude Code), use it. Its definition says how many questions a call takes, how many options a question takes, and whether several options can be picked; stay inside those.1b 2d), then stop and wait.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.
The existing pages are the list of what the user already understands. Reading them decides where the explanation starts and what it can skip.
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.
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.
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.
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:
git log --since="1 month ago" --name-only --format=)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.
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.
[[Title]], without explaining them again.After the explanation, stop and take questions. Move on to the check only when the user says to.
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.
If the gist did not pass, say where understanding stopped and end without writing.
Otherwise, without writing any file yet, present:
scraps get "<title>" --json)scraps tag list --jsonA 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.
resource, and add sources only for what was read when that differs, such as a translation. Any other page lists what it was written from in sources: the source's URL, or the path of the source's own page (resource: "/<key>.md") when the wiki has one; step 7 finds those.verified entries in the frontmatter, the user's first, both with the current time as at (date -u +%Y-%m-%dT%H:%M:%SZ). The user's says they showed they understand it: by: human:<id>, the id taken from project instructions, else from the human: entries the wiki's pages already carry, else asked once. Yours says you checked the page against its primary source: by is you as an agent, written <producer>/<version> (for example claude-code/<model id>). The two are separate clocks: recall brings the page back by the first, verify by the second.[[Title]]. Use #[[Tag]] only for existing cross-cutting categories.Grep the wiki for the literal new title across *.md, with surrounding context, to find mentions that are not yet links. scraps search does not search bodies, so it cannot find them.[[Title]] or [[Title|surface form]].With no candidates, leave existing pages untouched. Backlinks are computed automatically, so do not add reverse links.
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.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.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/digestWrite one page about an article, blog post, news item, release note, or talk (slides) from its URL into this Scraps wiki, without dialogue - a short summary of what the source says, linked to the pages the wiki already has. Use this when the user hands over the URL of something they read or want to keep up with and asks to put it in the wiki, record it, or summarize and keep it; write it through without asking for confirmation. For anything the user wants to understand, or for a page whose subject is a term, tool, or product, use learn instead./recallCheck again that the user still understands pages of this Scraps wiki whose understanding was confirmed long ago, and renew the confirmation of those that pass. Takes the pages a person confirmed longest ago, from `scraps verified --by human`, asks the user to recall each before showing it, and appends a new `verified` entry on a pass; a page that does not pass is left untouched and stays due. Use this whenever the user wants to be quizzed on, revisit, or review what they wrote in the wiki, or asks what they may have forgotten. Recall asks whether the user still holds the page, not whether the page is still current: to check a page against today's sources, use verify; to understand something new, use learn./verifyRe-confirm an existing page of this Scraps wiki against today's primary sources together with the user, fix what has changed only as far as the user understands the change, and record in the page's `verified` frontmatter that it was checked, and the user's confirmation when they give it. When no page is named, takes stock of the wiki first and proposes the pages most worth checking. Use this whenever the user wants to know whether pages are still current, take stock or inventory of the wiki, update old pages to the latest, or re-check what a page says, even if they do not name a page. For a new page use learn. Broken or moved external links are out of scope.npx claudepluginhub boykush/scraps --plugin pkmOther plugins' skills for the same job