/librarian:librarianfrom librarian
Review the librarian's pending memory promotion proposals and lesson candidates queued from past sessions. Walk pending entries with the user one at a time, surfacing provenance and conflict state, and route each to accept (writes the typed memory file and updates MEMORY.md), reject (writes a body-hash tombstone so the same content won't re-propose), or defer (leave in the queue). Lesson candidates route separately to confirm (with a visibility), pass, or defer, with unconfirm to take back a confirmation before the jury sees it. Use when the user types `/librarian`, `/librarian review`, `/librarian triage`, `/librarian status`, `/librarian list`, `/librarian lessons`, `/librarian lessons review`, `/librarian lessons judge`, or `/librarian lessons promote <id>`, or asks to review librarian proposals or lesson candidates.
Ships in librarian. 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.
You are operating the Librarian review surface — the user-facing control for promoting per-session artifacts (decisions, dead-ends, open questions captured by Archivist) into the user's durable typed memory store.
Auto-promotion of MEMORY.md proposals is intentionally off, full stop — nothing in this skill or the worker ever writes to ${CLAUDE_CONFIG_DIR:-~/.claude}/projects/<encoded>/memory/ unattended. Librarian queues proposals; the user (with your help) confirms each one. Every accept writes a real file there, so every accept matters.
Lessons are a separate queue with a separate default. By default this walk is also how a lesson gets confirmed and judged — nobody moves without you. But when a project turns on lesson_auto.enabled, the detached worker (never this skill) may itself assert a parked candidate's version-independence and dispatch its jury, with no human present — see ADR-004. That path never touches MEMORY.md, never bypasses this walk's pass/veto verbs, and only ever produces a held lesson behind a veto window (/librarian lessons queue, /librarian lessons veto) — but it is real auto-promotion of a lesson's scope assertion, and the sentence above about memory proposals must not be read as also covering it.
Read the user's argument after /librarian:
review, triage, walk → walk the queue (default)list → print the pending table and stopstatus → print one-line counts and stoplessons, lessons review → walk the lesson queue (see below)lessons list / lessons status → print and stop (lessons list --confirmed lists confirmed lessons instead of pending ones)lessons judge → run the jury over confirmed candidates (see below)lessons queue → print held lessons and stoplessons veto <id> [reason] → kill a held lesson before it shipslessons promote <id> → run librarian_cli lessons promote <id> once, report its output, and stop. This is how a lesson judged but not promoted gets its pool entry or declined row; the SessionStart line names this verb when one is strandedIf the user passes a free-form intent ("clear out the queue", "what's pending?"), map it to review or list as appropriate.
Source the plugin helpers and invoke librarian_cli. The Bash tool may be zsh and keeps no functions between calls, so send this block inside bash, in one call:
bash <<'ONLOOKER_SKILL'
<this block, with the action filled in>
ONLOOKER_SKILL
set -uo pipefail
export CLAUDE_SESSION_ID="${CLAUDE_SESSION_ID}"
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT}"
export CLAUDE_PLUGIN_ROOT="$PLUGIN_ROOT"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-config.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/onlooker-project-key.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-storage.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-emit.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-lesson-storage.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-lesson-validate.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-lesson-review.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-lesson-rubric.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-lesson-judge.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-author-key.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-lesson-promote.sh"
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/librarian-cli.sh"
# action is one of: list | show <id> | accept <id> | reject <id> [reason] | defer <id> | status
# or: lessons <list [--confirmed]|show <id>|confirm <id> <visibility> [--justification TEXT]|pass <id> [reason]|unconfirm <id>|defer <id>|status>
librarian_cli "<action>" "<args...>"
librarian_cli resolves the project key from the current working directory automatically and routes writes to the typed memory store under ${CLAUDE_CONFIG_DIR}/projects/${CLAUDE_PROJECT_ENCODED}/memory/ (falling back to $HOME/.claude when Claude Code exports no config dir) (deriving the encoded path from cwd when the env var is unset).
For review (the default), loop:
librarian_cli list. If the output says No pending proposals., tell the user the queue is clear and stop.librarian_cli show <id> to render the proposal's provenance, classifier confidence, conflict state, and full body.none, name the memory conflict_with lists and read it before recommending anything. conflict_candidate means the proposal states something that memory denies, and merge_candidate means it covers the same ground. (A duplicate never reaches the queue; it is dropped before a proposal is written.)librarian_cli accept <id>. Confirm the resulting path Librarian printed and move to the next proposal.librarian_cli reject <id> "<reason>". The reason is optional but valuable — it's recorded on the proposal and the tombstone is keyed on body hash so the same content won't be re-proposed.librarian_cli defer <id>. The proposal stays pending; mention it'll resurface next session.list reorders naturally) and repeat. When list returns no rows, finish with librarian_cli status so the user sees the final counts.For list and status, just call librarian_cli <action> once and render the output.
Lesson candidates are a separate queue from memory proposals — confirming one is a step toward publishing beyond this machine, not writing a local file, so it gets its own walk rather than folding into the loop above.
For lessons / lessons review (default for the lessons route), loop:
librarian_cli lessons list. If the output says No pending lessons., tell the user the queue is clear and stop.librarian_cli lessons show <id> to render it.claim, rationale, evidence.resolution, applies_to.stack, scope.versions (or the scope kind if unversioned), and the source artifact id. If show prints a refused: line, the unattended path was asked to justify this candidate as version-independent and declined. Show the user that reason verbatim, as the model's objection rather than a verdict: it is why the candidate is still waiting for them, and they may disagree with it. (no reason given) means the model refused without saying why. If show prints a held: line, the user deferred or unconfirmed this candidate earlier; say so, since it is why the unattended path has not touched it.librarian_cli lessons confirm <id> <visibility> [--justification TEXT]. Confirming requires a visibility (private, org, or public) — never call confirm without one. --justification rewrites the scope to version_independent and requires org or public visibility: a private lesson runs no jury, so its justification would go unchecked. If the user wants version-independence at private, tell them why it's refused rather than silently dropping the justification.show reports scope: {"kind":"unscoped"}, and list marks the row "needs scope") has no version scope at all: the transform could not bind one and left it to the user. Confirming it requires a justification — why the lesson holds regardless of version — and therefore org or public, because a private lesson runs no jury and the justification would go unchecked. Do not offer private for one. Ask for the justification in the user's own words and never write it for them: it is the assertion a jury will judge, and inventing it puts words in their mouth that leave this machine.librarian_cli lessons pass <id> "<reason>". The reason is optional.librarian_cli lessons defer <id>. The candidate stays pending; mention it'll resurface next session, and that the unattended path will leave it alone until they decide.list returns no rows, finish with librarian_cli lessons status so the user sees the final count.A confirm made at the wrong visibility isn't stuck that way — librarian_cli lessons unconfirm <id> takes it back, returning the lesson to pending so the user can confirm it again at the right visibility. It only works on a confirmed lesson: a passed lesson stays passed, because that decision already has its own record and unconfirm won't touch it.
Which decisions hold when the unattended path is on. With lesson_auto.enabled, a scan can confirm a parked candidate on a model's justification. defer and unconfirm both hold a candidate against that: it stays pending for the user and the unattended path skips it. A later confirm by the user clears the hold. pass is the durable "never share this". A held candidate is still the user's to decide; nothing releases it automatically.
Finding the lesson is its own step, because lessons list shows only the pending queue and a confirmed lesson is by definition not in it. The user regretting a confirm is usually back in a later session with the claim in mind and no id, so start from librarian_cli lessons list --confirmed, which prints the same <id> <claim> rows for everything confirmed and not yet judged. Then librarian_cli lessons show <id> — its visibility line is what tells you which tier the lesson currently sits at, and whether unconfirming is what the user actually wants.
For lessons list, lessons list --confirmed, and lessons status, just call librarian_cli lessons <action> once and render the output.
For lessons judge, run the jury over confirmed candidates:
Call librarian_cli lessons list --confirmed --json. Each row carries id,
visibility, and the full candidate. If the array is empty, tell the user
there is nothing awaiting judgment and stop.
Report the batch before spending anything. Say how many candidates are
confirmed and how many are public, and ask whether to proceed. This is the
most expensive step in the pipeline. If the user declines, stop — nothing is
written and every candidate stays confirmed.
For each candidate, in order:
visibility is private, dispatch no judges at all. Call
librarian_cli lessons judge <id> '[]' and move on. Private lessons run no
jury; that is what makes cost scale with intent rather than artifact volume.tribunal-judge-standard and
tribunal-judge-adversarial with the Task tool. Give each the candidate's
claim, rationale, evidence.resolution, and applies_to, plus the
rubric criteria for that lesson verbatim from
librarian_cli lessons rubric <id>. That prints each criterion
with its weight, floor and definition. Pass the id, not the
visibility: a lesson the unattended path asserted (asserted_by: model)
is checked against a stricter rubric that adds disclosure even at
org, and lessons rubric <id> is what resolves the rubric the verdict
will actually be recorded against. Pass the definitions, not just
the names: given the bare word, judges read disclosure as
"acknowledges caveats" when it is a leak check, and it floored every
candidate in the 2026-10-17 baseline. The unattended pipeline renders
the same text, so both panels score the same question.score, passed, judge_type,
feedback_summary, and criterion_scores — a map from each rubric
criterion name you gave it to a score in [0,1]. Tell each judge it
must score every criterion you listed. Every criterion in both lesson
rubrics carries a floor, and a floor no judge scored makes the whole panel
UNJUDGED — the candidate stays confirmed and is re-judged, at full cost,
on the next run. So an omission here does not soften a verdict; it prevents
one. That differs from tribunal, which degrades to a plain mean instead of
refusing, and the shared judge agents describe tribunal's behavior.
A judge that genuinely cannot assess a criterion should say so in
feedback_summary and score its honest worst case rather than omit the
key. Collect both verdicts into a JSON array verbatim — never summarize
or reconstruct a judge's verdict.librarian_cli lessons judge <id> '<verdicts-json>'. Record before
moving to the next candidate, so an interrupted run costs at most one
re-judgment. Recording a verdict also promotes the lesson in the same
call — approved candidates land in the pool and rejected ones in the
declined ledger, with no separate step. If the output instead says the
lesson was judged but not promoted, the verdict is already recorded;
retry once with librarian_cli lessons promote <id>, not by re-judging —
re-judging would spend tokens again for a verdict that already exists.
If that retry itself fails, do not loop on it. Add the id to the
judged-but-not-promoted bucket and move to the next candidate; report it
at the end alongside the retry command rather than retrying again here.If either judge fails to return parseable JSON, do not invent a verdict and
do not drop that judge. The array must still have one entry per empaneled
judge: put that judge's raw output, as a JSON string, in its slot instead of
a parsed verdict object. Pass that array to the CLI; it will exit 2, leave
the candidate confirmed, and report that it could not be judged. Collect
those ids and list them at the end so the user knows to re-run. A broken judge
must never become a rejection — the artifact's watermark has already moved,
so a false rejection buries a good lesson permanently.
Finish on librarian_cli lessons status, not on your own tally. It
prints one line — pending, confirmed, approved, rejected, and awaiting
promotion — read from disk, so it is the same kind of authoritative close
the review walk ends on. Report those numbers as it gives them; a long batch
is exactly where a running count kept in your head drifts.
Two things the call cannot tell you, which you must still report yourself:
confirmed, which on disk is
indistinguishable from a candidate that was never judged this run. Keep
the ids from step 4 and list them.librarian_cli lessons promote <id> as the
next step, and don't fold them into "approved" — a lesson here has no pool
entry yet. If your ids and the count disagree, trust the count and say so.scope_accuracy is the criterion that matters most on a version_independent
candidate. The schema guarantees such a lesson carries a justification; this
criterion asks whether it is true.
accept updates the index for you; hand-editing risks duplicate entries or stale links.conflict_state is conflict_candidate or merge_candidate, surface the conflict and the memory conflict_with names to the user before they decide. Often the right answer is reject (the existing memory is better) or accept-and-then-prune (you can mention that follow-up).public counts and wait before spawning a single judge. This binds the skill agent, not the worker: with lesson_auto.enabled true, the detached worker dispatches judges on model-confirmed candidates with no go-ahead and no session present (ADR-004) — a compensating rubric, hold, and veto window stand in for the go-ahead this rule describes. If you see a candidate already judged when you walk in, that is expected on such a project, not a violation of this rule.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub onlooker-community/ecosystem --plugin librarian