context-capture

context-capture is a command for Claude Code from ai-sdlc-framework/ai-sdlc. It costs 36 tokens per session (607 once invoked), scanned A, original, Apache-2.0.

A command for recording inferred facts from conversations, documents, or findings in a shared knowledge store. Each fact includes confidence, a source, a date, and instructions for checking it again.

In plain words
What is it for?
Use it to capture decisions, findings, and project facts for later sessions, with a clear way to re-check uncertain information.
Why use it?
It keeps useful context without treating guesses as confirmed truth. Corrections replace earlier facts while preserving the history, so information is not silently overwritten.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Part of the ai-sdlc plugin — 3 skills, 25 commands, 14 agents shipped together

Good fit Use it to capture decisions, findings, and project facts for later sessions, with a clear way to re-check uncertain information.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ai-sdlc-framework/ai-sdlc/context-capture
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.

Clone the repo
git clone --depth 1 https://github.com/ai-sdlc-framework/ai-sdlc

Made for: Claude Code.

Or install ai-sdlc, the plugin that ships this one along with the rest of its 3 skills, 25 commands, 14 agents.

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 context-capture

README.md
[![agentmods](https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/context-capture/github.svg)](https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/context-capture)
Your own site
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/context-capture"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/context-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 context-capture

Your own site · 80×15
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/context-capture"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/context-capture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 607 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.00036 $0.00607
Opus 5.5 $0.00014 $0.00243
Sonnet 5.5 $0.00007 $0.00121
Haiku 4.5 $0.00004 $0.00061

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

Security

Grade A, and why

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

ai-sdlc-plugin/commands/context-capture.md · 39 lines

How it starts

The opening of the file, as written. The whole thing — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Capture knowledge into the context engine (RFC-0053). Adapted from the capture-knowledge mechanics of the data-room kit. Capture writes entries, never documents.

Rules (hard)

  1. Authority is always inferred. Never write specialist or canonical; promotion belongs to the promotion verifier (code) or a human.
  2. Every entry carries a reverify: note saying how a later reader can re-check it (a file path, a test id, a decision id, or a command to re-run).
  3. Every entry carries a confidence band and a numeric confidence inside it:
    Band Range Meaning
    candidate below 0.7 weak signal, surfaced as a question
    working 0.7 to 0.85 agent inference, usable
    Confidence is capped at 0.85 for agent-written entries.
  4. Every entry carries a source citation and an observed date, and a decay class (volatile 30 days, seasonal 180 days, durable 2 years, evergreen).
  5. Supersede, never delete. When the user or the source corrects an earlier entry, write a new inferred entry with supersedes: <old-id> and mark the old entry superseded_by: <new-id>. Do not remove or overwrite the old entry body.
  6. Scope routes the root. scope: protected entries go to the gitignored protected root and never into a tracked file or a PR body.
  7. Re-observation of an existing fact moves confidence 30 percent toward the new value and never changes authority.

Steps

  1. Read the source named in $ARGUMENTS.
  2. Search for an existing entry on the same fact before writing (cli-context query when available, otherwise grep the knowledge root).
  3. For each new fact, write an entry with the full schema (id, value, confidence, band, authority: inferred, scope, source, observed, decay, relations, reverify:).
  4. For each correction, follow rule 5 and report the superseded id.
  5. Print a table: id, band, confidence, supersedes, reverify.

Important

  • Running code outranks every written entry; when the source conflicts with the code, record the code's behavior and cite it.
  • Never write under a data-room root; capture writes entries only.

Read the full file on GitHub · 39 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. yesterday First seen · 39 lines · 36 tokens per session scan A 4628be562a24

Subscribe to this mod's changes

context-capture is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (428 stars, last pushed today), licensed Apache-2.0. It adds 36 tokens to every session and 607 once invoked, about $0.0001 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-11-01.