Ingest a source into the wiki — read it in full, compile durable cited pages, and update the index, log, and overview in one commit. Accepts files in raw/, URLs to fetch and archive first, a directory of a code repo read in place, or the answer /kb-ask just gave. Use when the user says ingest, compile this source, add this to the wiki, or pastes a link to read into it.
Turn one source into durable, cited pages. Read the wiki's trusted
./CLAUDE.md first for its schema and conventions. If it is missing, ask
the user to bootstrap or identify the wiki before writing.
raw/YYYY-MM-DD-slug.md with the URL on line 1, retrieval
date, and a note of what was excerpted. Never overwrite an existing archive.
If fetching fails or is truncated, report it rather than inventing an
archive. Archiving first makes the citation stable; a bare URL is not a
source.
Given code:<repo>/<dir>: <repo> is one of the repos CLAUDE.md names
under Code and <dir> a path inside it. Resolve the configured tag or SHA
to a full commit SHA, then read the files in the requested directory at
that commit, for example with git show <sha>:<path>. Do not change the
checkout. Exclude
credentials, binaries, dependencies, and generated files, and disclose
exclusions or unreadable files. Cite code as <repo>@<sha>:<path>:<line>
and stamp verified-at with that SHA. If the pin is unavailable, stop and
report it; never substitute the working tree. Nothing is copied into raw/.
If CLAUDE.md already records a resolved SHA, use it and report any tag
drift instead of silently accepting the tag's new target.
Given "the last answer" (or last-answer): the source is the code and
pages that answer relied on; compile it the same way, with the same pins.
It lands as ONE page, wiki/questions/YYYY-MM-DD-<slug>.md, dated the day
the question was ASKED, not the day it is filed — with type: question,
an asked: key, the answer's citations intact, and its "could not settle"
list preserved rather than tidied away. Nothing goes into raw/: an answer
is derived from sources already there. If the answer or its date is not
available in context, ask rather than inventing it. For this input, skip
source normalization and the source-summary step. Still inspect the index
and Git status, check the evidence and filename, write the question page,
update related pages if needed, then complete steps 7 to 10.wiki/index.md and inspect git status before editing. Preserve
unrelated work. If a target page already has uncommitted edits, ask before
combining them with this ingest.YYYY-MM-DD-slug.md and add the header now. This is the only moment a
file in raw/ may be touched; preserve its body and never overwrite another
file. Check existing citations and the log first: an already-ingested
source stays unchanged, even if it uses an older naming convention.
This step applies only to a new file in raw/, not to code or saved answers.wiki/sources/<slug>.md: key claims, the data, brief
exact quotes worth keeping, and the raw-source or pinned-code citations.
Re-ingesting the same source updates its existing summary.wiki/index.md.wiki/overview.md if the source moved the big picture. Rewrite,
do not append.wiki/log.md without rewriting older entries:
what was created, what was updated, and what was left open.git add ., git add -A, or git commit -a. If unrelated work
is already staged, leave it intact and ask before committing. Make one
commit: kb(ingest): <source title>. If nothing changed, report a no-op.wiki/<type>/<slug>.md. The only root-level wiki files
are index.md, log.md, overview.md, and contradictions.md. Apart from
archiving or normalizing a new source in raw/, write only inside wiki/.[[target]] you introduce must
exist as a page by the time the ingest ends — create it in this same ingest
or do not link it. A dangling link is a defect, not a to-do.support: describes the evidence, not your confidence. One source, or one
source plus a code read, is one-source — never solid. solid needs
several independent sources agreeing.index.md, adds a log.md entry, and commits has left the wiki
inconsistent. If you cannot finish, say plainly that the ingest is
incomplete, list exactly what is missing, and record that in log.md as
left open: — never leave it silent.raw/.(raw/<file>), pinned code, or a wiki page with
traceable evidence. A web URL accompanies its archived source; it does not
replace it. Distinguish inference from what the source actually says.wiki/contradictions.md,
with both citations and an unresolved status. Create the register from the
wiki's frontmatter conventions if missing, and list it in index.md.
Never silently reconcile.support: one-source. Do not imply a consensus
that does not exist.b1cf2db
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.