capture

capture is a command for Claude Code from hdk10/orgkit. It costs 41 tokens per session (2,131 once invoked), scanned A, original, MIT.

A command that reads recent development work and turns specific discoveries into tagged lessons saved for later review. It complements a faster process that only looks for manually written tags.

In plain words
What is it for?
Use it after project work to capture concrete patterns, gotchas, tools, and lessons for a role's ongoing knowledge base.
Why use it?
Useful lessons are often found in code changes and conversations but are not written in a consistent format. This command distills them into a file that another workflow can reconcile.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .org/transcript.py "<transcript-path>".

Part of the orgkit plugin — 10 commands, 3 hooks shipped together

Good fit Use it after project work to capture concrete patterns, gotchas, tools, and lessons for a role's ongoing knowledge base.

Compare 6 commands from other repositories ↓
View source ↗ hdk10/orgkit
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/hdk10/orgkit
agentmods
npx agentmods add commands/hdk10/orgkit/capture

Made for: Claude Code.

Or install orgkit, the plugin that ships this one along with the rest of its 10 commands, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for capture

README.md
[![agentmods](https://agentmods.dev/badge/commands/hdk10/orgkit/capture/github.svg)](https://agentmods.dev/commands/hdk10/orgkit/capture)
Your own site
<a href="https://agentmods.dev/commands/hdk10/orgkit/capture"><img src="https://agentmods.dev/badge/commands/hdk10/orgkit/capture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for capture

Your own site · 80×15
<a href="https://agentmods.dev/commands/hdk10/orgkit/capture"><img src="https://agentmods.dev/badge/commands/hdk10/orgkit/capture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,131 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.02131
Opus 5.5 $0.00016 $0.00852
Sonnet 5.5 $0.00008 $0.00426
Haiku 4.5 $0.00004 $0.00213

Measured today against content hash 758aa6daba90, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 today.

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.

commands/capture.md · 113 lines

How it starts

The opening of the file, as written. The whole thing — 113 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 via claude -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.

Paths (read first). <mem> below means the role's memory dir: $ARGUMENTS/memory/ normally, but memory/ at the repo root when .org/roles.json has _meta.repo_role equal to $ARGUMENTS (single-role repo: the repo root IS the role, projects are top-level folders, and $ARGUMENTS/<x> paths mean <x>). Tiered brain: if <mem>/role/ exists, <mem>/ROLE.md is the short CORE tier (always injected, keep it under ~14 KB) and <mem>/role/*.md are DETAIL files (gotchas, patterns, best practices, index, ...). Read both tiers when deduping; file new bullets into the matching detail file, and touch the core only for rules that are critical across projects or to update the Projects list.

Read the full file on GitHub · 113 lines

Changes

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.

  1. today Changed · +8 lines 758aa6daba90
  2. 3mo ago First seen · 105 lines · 41 tokens per session scan A c769f8f08a21

Subscribe to this mod's changes

capture is a command published in the GitHub repository hdk10/orgkit (2 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 2,131 once invoked, about $0.0002 per session on Opus 5.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.

Related

capture compared with commands from other repositories

capture next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
capturehdk10/orgkitCommand2yesterdayMITA41Claude Code
instinct-importaffaan-m/ECCCommand315k2d agoMITA5Claude Code, OpenCode
learnaffaan-m/ECCCommand315k2d agoMITA8Claude Code, OpenCode
export-closedloop-learningsclosedloop-ai/claude-pluginsCommand122todayApache-2.0A13Claude Code
pull-learningsclosedloop-ai/claude-pluginsCommand122todayApache-2.0A12Claude Code
load-contextjoseairosa/recallCommand1791mo agoMITA18Claude Code
recall-loopjoseairosa/recallCommand1791mo agoMITA36Claude Code