/wiki-toolkit:wiki-ingestfrom wiki-toolkit
Ingest one explicitly identified input into the wiki as a single transaction. A URL, file, pasted text, command output, stated fact, or an investigation result from the current session. Use when the user asks to add a specific input or finding to the wiki, says "wiki this" or "ingest this into the wiki", or asks to record a conclusion, decision, or finding permanently. Also use when the user pastes a record (a portal or dossier extract, a lab table, an email, a screenshot) into a wiki repository session with no question attached: that is a request to file it. A paste sent in the middle of an open question on its own topic is input to that answer, not a filing request. Generic "ingest this" or "file this" without wiki context is not this skill. Not for behavioural rules or memory updates, not for end-of-thread or pre-compaction knowledge sweeps (use wiki-checkpoint), and not for wiki health checks (use wiki-lint).
Ships in wiki-toolkit. 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.
One input, one ingest transaction: capture, reconcile, write, lint, commit. This is Karpathy's canonical ingest operation applied to the destination wiki's own conventions.
Authority: the destination wiki's SCHEMA.md. This file is the procedure; on any conflict the destination's schema wins. The skill complements wiki-checkpoint (the end-of-thread sweep with retrospective and memory routing): this skill writes no memory files and runs no retrospective. If the input is a behavioural rule ("next time, do X"), it routes to memory: say so and point the user at the checkpoint. That hand-off happens before any transaction starts, so no ingest report is printed.
Project root: the workspace root the harness reports; otherwise the nearest ancestor of the working directory containing .git, CLAUDE.md, or AGENTS.md; otherwise the working directory itself.
Same cascade as the checkpoint: <project root>/wiki/ when it exists, otherwise ~/wiki/. A destination the user has barred ("do not use my global wiki") is skipped in the cascade: no synchronising reads, no writes; when no permitted destination remains, report not written: destination barred by the user and stop. Neither exists: report not written: no wiki found and stop. No other directory (docs/, .wiki/, notes/, handbook/) counts.
SCHEMA.md when present, otherwise sniff the layout. Its conventions govern; never impose global-wiki conventions. Invoking this skill authorises non-destructive writes of this input only; destructive rewriting is forbidden without exception, and no confirmation overrides that ban. When write scope is unclear, report not written: write scope unclear.pages/<project>/ (the schema's routing exception). Before routing there, check each project-root CLAUDE.md, AGENTS.md, and README: if one references an external knowledge system (Confluence, Notion, Linear, Jira), report not written: external knowledge system, manual filing required.git -c core.hooksPath=/dev/null -C ~/wiki pull --ff-only. --ff-only refuses an unintended merge or rebase commit; core.hooksPath=/dev/null keeps hooks out, because git runs the post-merge hook even on a fast-forward pull and a wiki-linting hook would dirty the tree mid-transaction. Attempt this only when ~/wiki is a git repository with a usable upstream: a plain directory or a remote-less repository is a normal setup, so note it and continue rather than blocking. A refusal reading cannot pull with rebase: You have unstaged changes has not run yet: the wiki sets pull.rebase=true, which refuses on any dirty tree before checking whether a fast-forward would touch the dirty files, so retry once as git -c core.hooksPath=/dev/null -c pull.rebase=false -C ~/wiki pull --ff-only and take that outcome as the result (--ff-only still refuses every merge). A pull that ran and failed blocks all writes; report not written: global wiki pull failed.git status. If any of them already carries uncommitted changes, the whole transaction is blocked before the first write: report not written: blocked by pre-existing local changes and name the dirty files. Never sweep pre-existing uncommitted changes into the ingest commit. Exception: when only index.md or a destination-kept log is dirty and the page targets themselves are clean, this explicit user instruction authorises the page write plus a non-destructive append to those files; make no commit, and report that the user owns the combined dirty state and the commit. The exception never extends to editing a dirty substantive page.git status proves nothing about the next minute. Read git log -3 --format='%h %ar %s' and ListAgents before writing; recent foreign commits mean a live peer. A live peer is not a block: prefer writing new files over editing a page a peer may hold, and commit and push as soon as the files are written. A dirty hunk in a target page that equals the edit you were about to make is an abandoned run's work: adopt it and say so in the report, rather than blocking on it as a pre-existing change. An Edit or Write result saying the file changed on disk since it was read: run git diff -- <path> at once and classify each hunk as yours or foreign. Never revert a foreign hunk or stage one silently: SendMessage the peer naming the file, the hunks you would keep, and anything your change makes stale in them; commit the file once, path-limited, after the peer hands it over, and tell the peer the hash.Read the input in full before extracting claims; never infer content from a filename, URL title, search snippet, or memory. After a compaction, the summary (even one marked verified) is a list of leads: before each Edit, rg -n the source for the fact and read the matching lines in the same turn; write a date, an age or a context noun (occasion, venue, genre) only when the line states it, and compute an age from the birth date on the page. In a photo, a handwritten form, small print or a chart, read each ambiguous value (a tick or a cell with its column header) in an enlarged crop before writing it, and file a reading that stays doubtful as [reading uncertain: ...]. An input that is missing, inaccessible, or unreadable makes no wiki writes: report not written: input unavailable or unreadable.
Retention mode decides what survives in the destination's source layer (raw/ for the global wiki):
Retention mode: none, "retain nothing and cite nothing"): that is the owner's override for a file input too, so no capture, sources: [], and the weak citation where one is required.sources; nothing in the source layer.sources when the input has one.The user overrides per ingest ("retain nothing", "keep the whole thing"). Captures land at a non-colliding path following the destination's naming (global: raw/<topic>-YYYY-MM-DD.md; conversation extracts raw/sessions/YYYY-MM-DD-<topic>.md) and are captured verbatim, never style-corrected. A conversation capture quotes only messages actually sent, checked for speaker, wording and order; text composed during the ingest is labelled assistant-authored, never presented as quoted. Choose extracts that exclude secrets and unrelated personal data; when full retention cannot avoid them, drop to evidence or locator and say so in the report. Never call a redacted copy verbatim.
In this order, always all three:
scripts/catalogue.sh <subfolder> for the topic folder the input targets.rg over the page store for concrete terms (names, IDs, slugs, dates).mcp__qmd__status, never by guessing the collection name; scope the mcp__qmd__query call to that collection and always pass an intent. When the qmd tools are deferred, load them first in one ToolSearch call; deferred is not absent. No matching collection or no qmd: a separate text search using synonyms and paraphrases of the topic is the fallback; repeating step 2's exact terms does not satisfy step 3.Step 3 is not optional at any scale and "the index grep found nothing" does not skip it: lexical search misses paraphrased overlap, which is exactly the duplicate this step exists to catch. Open every page you might touch before deciding anything.
One exception: a paste that is a newer copy of a record the wiki already holds verbatim (an in-flight memory names the page and the page cites a raw capture) is reconciled by diffing the paste against that capture; the three searches are skipped and only the changed rows are captured and filed.
A pasted email is one message of a correspondence. Before writing any open question, "no reply" or "not established" line, search the mailbox for the sender's whole history (from:<sender> OR to:<sender> with no date limit, plus sent and drafts) and read every thread the page does not already cite. When no mail tool is loaded or it fails to authenticate, scope each such line to "the pasted thread", say in the report that the mailbox was not searched, and ask the user in that report to reconnect the mail tool.
When the input is an AI month summary of one chat, or the page to be written concerns a dated family event or a person a summary-built page leaves unnamed, grep the raw WhatsApp export trees for the date or name before writing (ls the export directory for a first-name-only person): a summary bounds one file, and the raw text outranks it. The temporary WhatsApp qmd collections locate a described event but are never cited or named on a page or in a raw capture; their setup is on pages/dev/qmd-search-setup.md.
A word or name on the input that cannot be placed (a bare word under a title, a stranger where a known person was expected) is a search term, not a finding: run rg -n -i -w '<word>' over the page store and the source layer, and on the user's own paperwork test it against their address, names and account numbers, before writing "unknown" or "not explained".
For each candidate claim, choose one action: ignore (already covered), strengthen (adds support), qualify (adds conditions or nuance), replace (supersedes; record the supersession), contradict (conflicts without superseding), create (genuinely new), or link (missing cross-reference only).
<!-- CONTRADICTION --> marker is a working device inside the session only; its lint errors on a committed marker and the pre-push hook blocks it, so before committing either resolve the conflict or state it in prose as an open question on the page.Pause and confirm with the user before applying when the ingest involves any of: a contradiction with an existing page, replacing or removing substantive existing content, merging or renaming pages, or sensitive material (personal, confidential, or secret-bearing). Confirmation never overrides a destination's hard rules: a project wiki's ban on destructive rewrites stands regardless. Otherwise apply and report; the user can ask for a preview first at any time.
Order: raw capture (before any page that cites it), then pages (each new page carrying its summary frontmatter), then the destination's index and log where it keeps them (the global wiki keeps neither).
SCHEMA.md, body starts at H2, lead with the conclusion, no em or en dashes).sources. Locator mode: cite the original locator and access date in sources, with no capture file to point at. Nothing retained and conversation-derived: cite [source: conversation, weak] exactly as written; never plain [source: conversation], never an invented phrasing, never a fabricated source.summary at most 150 characters (awk '/^summary:/{sub(/^summary: *"/,""); sub(/" *$/,""); print length}' <page>; it has no dollar-and-digit field reference, because Claude Code fills those in with the invocation's arguments), every body URL outside a [source: ...] bracket wrapped in <...>, and a blank line before and after every added list (markdownlint-cli2 <page> reports 0 issues).## [YYYY-MM-DD] ingest | <title> entry, one to five lines, existing entries untouched.Only after the ingest made wiki writes: the destination's own lint script when present, at <wiki>/scripts/lint_wiki.sh or, when the wiki sits inside a larger repository, at that repository's root. The global wiki's script also refreshes the qmd index; do not assume another wiki's script does. Global wiki: do not run the script by hand; its pre-push hook runs it and prints the same summary, so the lint step is the push in Step 6, read in full: never through tail, awk or any filter that drops the Errors summary or a WARN line; to shorten it, filter with grep -E 'Errors|WARN|ERROR|main ->|rejected'. A rejected push is the lint failure: fix and push again. Fix errors the ingest introduced; report pre-existing warnings without fixing unrelated content. A project wiki without a lint script: report Lint: not run (no project lint script). No lint script available for the destination at all: report Lint: not run (no compatible lint runner); this plugin does not bundle one, and a lint that did not execute is never reported as clean. A blocked, paused, or no-write outcome reports Lint: not run (<reason>).
When the ingest made writes: exactly one commit, path-limited to the files this ingest touched (except the dirty index/log exception above, which makes no commit); no writes means no commit, reported as not run with the reason. Global wiki: conventional format, signed off (git commit -s, which writes the trailer from the repo config), the message drafted at a session-unique path and measured before the commit. Stage and commit in one Bash call so no peer can commit the index in between (git add -- <paths> && git commit -s -F <msg> -- <paths>), verify with git log -1 --format='%h %G? %s' --name-only that only your paths landed under your subject, and push in the next call; never --amend here, since HEAD may already be a peer's commit, so a correction is its own commit on top. A push rejected with cannot lock ref ... is at <hash> is read after git fetch: git branch -r --contains <your hash> listing origin/main means a peer's push carried your commit up and it is pushed, whatever the output said; the is at hash being your HEAD's parent means push again; anything else is recovered once with git -c core.hooksPath=/dev/null -C ~/wiki pull --rebase then a second push, a conflicting rebase aborted (git -C ~/wiki rebase --abort) and reported, and a rebase refused on a peer's dirty tree reported with the local commit hash. Any other failed push is reported with the local commit hash. Project wikis: the project's commit conventions, no push mandate. Never leave a half-applied ingest behind; a rollback undoes only the files this ingest wrote and never restores, cleans, or discards pre-existing changes.
Always print (except the pre-transaction behavioural-rule hand-off):
Wiki ingest: complete / paused (awaiting confirmation) / not written.
- Input: <type>, retention: <mode>
- Raw captures: N (files)
- Pages created: N / updated: N (each with its reconcile action)
- Index: updated / no change needed / not kept by destination
- Log: updated / no change needed / not kept by destination
- Contradictions flagged: N (files)
- Lint: clean / N issues (list) / not run (reason)
- Commit: <hash> pushed / <hash> (push failed) / not run (reason) / not a git repository
- Not written: N (one reason each)
- Failures/manual action: none / list
A paused report shows the state so far (no writes have happened yet) and the pending question. Not-written reasons, first applicable: destination barred by the user; no wiki found; global wiki pull failed; input unavailable or unreadable; blocked by pre-existing local changes; write scope unclear; external knowledge system, manual filing required. A destination the user has closed ("do not use my global wiki") is barred, not scope-unclear.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub marjovanlier/claude-plugins --plugin wiki-toolkit4 skills in this plugin
/wiki-checkpointUse when the user invokes wiki-checkpoint, asks to save session knowledge, asks for a wiki or memory sweep, or wants durable findings, retrospective lessons, and routing decisions captured from the current conversation, typically at the end of a chat thread or before context compaction. Honour focus text and skip flags such as skip wiki, skip memory, and skip retrospective./wiki-lintLint and re-index a Karpathy-style LLM wiki (second brain). Use this whenever the user asks to "lint the wiki", "wiki lint", "check wiki health", "index the wiki pages", "refresh the wiki search index", or anything about validating wiki structure or making wiki pages searchable. The wiki is sometimes a project-local folder and there is sometimes a global one at ~/wiki. This skill detects which wiki applies, runs the correct lint script (which also refreshes the qmd search index in one pass), and resolves flagged issues. Do NOT use it for ordinary source-code linting (eslint, phpstan, markdownlint of non-wiki files) or for the full pre-compaction knowledge sweep (that is /wiki-checkpoint)./wiki-lookupAnswer a question from existing knowledge in the user's Karpathy-style wikis, qmd-backed where a collection exists. Never writes, edits, or commits wiki content; the one exception is that a failed lookup against the global wiki may fast-forward it and refresh the search index before concluding absence. Use whenever the user asks what the wiki knows or says about something, whether a topic was researched or decided before, says "look this up in the wiki", "check the wiki", "have we covered this", or asks "what do we know about X" in the sense of accumulated past project, personal, case, setup, or cross-project knowledge. Do not use for ordinary questions about the current codebase, repository documentation, live system state, or general knowledge. Not for adding knowledge (wiki-ingest), end-of-thread sweeps (wiki-checkpoint), or wiki health, sync, and index maintenance (wiki-lint).