Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/hdk10/orgkit/capturegit clone --depth 1 https://github.com/hdk10/orgkitWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00041 | $0.01932 |
| Opus 5 | $0.00020 | $0.00966 |
| Sonnet 5 | $0.00008 | $0.00386 |
| Haiku 4.5 | $0.00004 | $0.00193 |
Grade A, and why
capture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are capturing lessons from recent work in the $ARGUMENTS role's projects. This is model-driven distillation — you read actual changed files and synthesise concrete, specific insights. No tag-hunting; no generic platitudes.
Always run capture on Sonnet — never Opus/the best model. Capture is a high-frequency distillation task; it must stay cheap. After validating the role (step 1), delegate the read + distill + write work (steps 2–6) to a Sonnet subagent (Task tool,
model: sonnet). The main thread only validates inputs and relays the final report. If this command is itself invoked headless viaclaude -p, the caller already pins--model claude-sonnet-4-6, so just proceed.
Why this exists
The Stop hook (role_digest.py) only regex-scrapes pre-written [LESSON]/[PATTERN]/[GOTCHA]/[TOOL] tags. Nobody writes those tags consistently, so that fast-lane is usually empty. /capture is the real path: the model reads actual work output and the session conversation and distills lessons from both, then feeds them into _pending.md for /role-promote to reconcile.
The richest lessons usually aren't in the code diff — they're in the conversation ("we tried X, it broke because Y, so we switched to Z"). The Stop hook records a pointer to the session transcript in _pending.md; this command reads that transcript so the reasoning, decisions, and dead-ends get captured, not just the final code.
Steps
-
Validate role. Read
.org/roles.json. If$ARGUMENTSis empty or not listed underroles, print the valid role names and stop. -
Find recent work. In parallel, gather signals:
a. Read
$ARGUMENTS/memory/_pending.md— the stub queue contains lines like
[timestamp] <role>: N files changed (path1, path2, ...) — run /capture then /role-promote
Extract the file paths listed there (these are the files touched since last digest).b. Run
git -C . log --oneline --since="14 days ago" -- "$ARGUMENTS/"to find recent commit messages (quick signal, not the main source).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 105 lines · 41 tokens per session scan A c769f8f08a21
capture is a command published in the GitHub repository hdk10/orgkit (2 stars, last pushed 2mo ago), licensed MIT. It adds 41 tokens to every session and 1,932 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
conclude
Use at session end to save project learnings and produce a commit message.
learn
Force claude-smart to extract learnings from this session now.
memory-store
Store an insight, decision, or pattern to memory.
mach12:gh-pr-read
Read a GitHub pull request's title, body, and all top-level PR conversation comments; optionally locate an HTML-marker comment.
review
Cold re-quiz on code that already shipped — your own session commits, not the change in front of you.
connect
Connect this workspace with another (two-way) for messaging.