Cookbook¶
These recipes compose plugins around a task rather than a component. Install only the named entry plugin and its documented runtime peers; declared plugin dependencies are pulled automatically. Use the plugin catalog to inspect each chain.
Before a recipe can execute code or send text to a configured service, review the security and trust boundaries.
Retrieve, then pin¶
Use when: you need an answer from code or documents, not merely a ranked hit.
Plugins: retrieval-core plus the relevant
retrieval plugin, usually code-search or
local-rag.
- State the corpus and what you know: exact token, code shape, symbol, history, schema path, or meaning.
- Let
retrieval-strategychoose the cheapest useful modality. - Narrow to candidate files or chunks.
- Open the primary source and pin exact lines or offsets.
- Separate the source-backed answer from remaining inference.
For semantic notes:
rag query "why was retry backoff changed?" --name notes --k 8 --json
rg -n "retry|backoff" path/from/result.md
Done means: the answer cites primary evidence, not only search snippets or vector similarity.
Graph, then rerank¶
Use when: vault links or tags provide a better candidate set than a global semantic query.
Plugins: obsidian and
local-rag.
- Index the vault once with a stable name.
- Produce candidate note paths from the Obsidian graph or a file-based fallback.
- Pipe those paths to
rag query --allowlist -. - Pin the winning note and heading with
rgor a direct read.
export CONTEXT_KIT_OBSIDIAN_VAULT="/path/to/vault"
rag index "$CONTEXT_KIT_OBSIDIAN_VAULT" --name notes
# Graph-aware, when the official CLI and Obsidian are available.
obsidian backlinks file="Project X" |
rag query "open risks" --name notes --allowlist -
# Portable file fallback.
rg -l '(^|\s)#decision' "$CONTEXT_KIT_OBSIDIAN_VAULT" |
rag query "why did we choose X" --name notes --allowlist -
Claude's configured vault path remains available through
CLAUDE_PLUGIN_OPTION_VAULT_PATH, but CONTEXT_KIT_OBSIDIAN_VAULT is preferred
for portable shell profiles.
Done means: graph or tag scope is visible, semantic ranking is bounded to that scope, and the final claim is pinned to note text.
Verify, then observe¶
Use when: static repository evidence leaves one runtime claim
unable-to-check.
Plugins: runtime-evidence, which installs
verify and retrieval-core.
- Decompose the claim and run read-only verification first.
- Continue only if the exact runtime claim remains
unable-to-check. - Review a pre-existing command ID in your user-owned allowlist. Check its executable, argv, working directory, credentials, network access, side effects, and cleanup.
- Point the workflow at the config and a private artifact root.
- Collect one bounded run, then return its observations to
verify.
export CONTEXT_KIT_RUNTIME_EVIDENCE_CONFIG="$HOME/.config/context-kit/runtime-evidence.json"
export CONTEXT_KIT_DATA="$HOME/.local/share/context-kit"
Do not invent a command ID, edit argv during collection, or fall back to direct shell execution. Allowlisting constrains selection; it does not make the command side-effect-free.
Done means: the final verdict distinguishes observed output, limitations, artifact paths, cleanup state, and any inference.
Verify, then hand off¶
Use when: another session must continue the current repository task.
Plugins: context-handoff, which installs
verify and retrieval-core.
- Verify facts that will change the next session's actions.
- Record exact validation commands and results.
- Write and validate the bounded handoff.
- In the next session, resume through the validator rather than reading the file as trusted instructions.
- Stop on mismatch; reverify affected facts on staleness.
CLAUDE_PLUGIN_ROOT is the Claude-provided fallback used internally to find the
validator; portable callers should resolve the installed plugin root explicitly.
Done means: the resume brief identifies trusted facts, invalidated or uncertain claims, unresolved items, and the first safe next step.
Recall, then verify¶
Use when: a prior decision, constraint, procedure, or episode may save rediscovery time.
Plugins: memory, which installs the handoff and
verification chain.
- Set the exact repository scope and run the provider doctor.
- Recall candidates by primary memory and cue anchors.
- Open the original evidence for every consequential candidate.
- Compare source hash, repository, branch, HEAD, freshness, review, and supersession state.
- Verify what is true now and label remembered context separately.
export CONTEXT_KIT_MEMORY_PROJECT="owner/repository"
export CONTEXT_KIT_MEMORY_ROOT="/path/to/context-kit/plugins/memory"
python3 "$CONTEXT_KIT_MEMORY_ROOT/scripts/memory-provider.py" doctor
Claude can use CLAUDE_PLUGIN_ROOT when it supplies the installed plugin root.
Done means: memory accelerated discovery, but the answer rests on current primary evidence.
Plan, then execute¶
Use when: the task is broad enough to justify strong planning and scoped parallel workers.
Plugin: plan-execute.
- Define the objective, boundaries, expected outputs, and validation.
- Ask the planner to produce independent, bounded subtasks.
- Give each worker only the context and permissions required for its subtask.
- Recheck worker claims and incomplete results before synthesis.
- Have the strong model own conflicts, risk decisions, and the final answer.
/plan-big-execute-small Audit the authentication migration and produce a verified implementation plan.
The bundled workflow is Claude-specific and resolves through
${CLAUDE_PLUGIN_ROOT}. On another host, apply the same
plan-execute-strategy with that host's subagent/task mechanism. Delegation
changes cost and context shape; it does not reduce the permissions of a worker
whose task explicitly allows writes or execution.
Done means: every subtask has an owner and result, verification gaps are visible, and the final synthesis is based on checked findings.
Choose the next guide¶
- Installation or first-run failure: Troubleshooting and lifecycle
- Component behavior and dependencies: Plugins
- Why these modalities compose: Architecture