capture

A command for recording important findings from the current coding session so a later session in a related repository can retrieve them.

In plain words
What is it for?
Saving specific, verifiable findings with the relevant repository, files, symbols, and line numbers through the session-recording tool.
Why use it?
It preserves hard-won causes, decisions, constraints, surprises, and unresolved questions instead of making the next session rediscover them.

Command for Claude Code

Install

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.

agentmods
npx agentmods add commands/haroon-jay/wctx/capture
Clone the repo
git clone --depth 1 https://github.com/Haroon-jay/wctx

Made for: Claude Code.

Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 332 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00016 $0.00332
Opus 5 $0.00008 $0.00166
Sonnet 5 $0.00003 $0.00066
Haiku 4.5 $0.00002 $0.00033

Measured 2d ago against content hash 1aa291ca5946, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d ago.

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.

.claude/commands/capture.md · 29 lines

What it actually says

Record this session's findings using the finalize_session MCP tool from wctx.

Pass your own session id as sessionId — it is imported automatically if wctx has not seen it yet.

Include only what is worth keeping. Judge that yourself; you know which of this session's facts were hard-won and which were routine:

  • a root cause, especially one that turns out to live in a different repository than the symptom
  • a decision with a rationale that would not be obvious from reading the diff
  • a constraint discovered the hard way — a rate limit, an ordering requirement, a rejected approach
  • a question left unresolved, together with what was ruled out
  • a surprise: behaviour that contradicted the code's apparent intent

For each item set repository to the repository the finding is about (often not the one being edited) and attach the files and symbols it concerns, with line numbers where you know them. That provenance is what makes the finding verifiable and retrievable later.

Prefer specific, falsifiable statements. "The SDK returns 419 as terminal with no retry" is worth keeping; "error handling could be improved" is not. Skip routine work, anything already obvious from the code, and anything that will be stale within a day.

If nothing meets that bar, say so plainly and record nothing rather than padding the store.

Then tell me, in two lines, what you recorded and what you deliberately left out.

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. 2d ago First seen · 29 lines · 16 tokens per session scan A 1aa291ca5946

Subscribe to this mod's changes

capture is a command published in the GitHub repository Haroon-jay/wctx (7 stars, last pushed 13d ago), licensed MIT. It adds 16 tokens to every session and 332 once invoked, about $0.0001 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.