CAA-add

CAA-add is a command for Claude Code from ofirbuchshtav-lgtm/claude-archive. It costs 24 tokens per session (648 once invoked), scanned A, original, MIT.

A command for saving a tested solution from a coding session to the Claude Archive, a searchable collection of past problems and fixes. It requires recording the exact problem, a usable solution, and what was actually tested.

In plain words
What is it for?
Use it when a session produced a reusable debugging fix or insight. It locates the archive, checks the required agreement, and saves the problem, solution, and evidence when the quality requirements are met.
Why use it?
It prevents hard-won fixes from being lost and discourages archiving guesses, trivial answers, private information, or unverified claims.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths.

Part of the claude-archive plugin — 1 skill, 3 commands, 1 MCP server shipped together

Good fit Use it when a session produced a reusable debugging fix or insight. It locates the archive, checks the required agreement, and saves the problem, solution, and evidence when the quality requirements are met.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ofirbuchshtav-lgtm/claude-archive/caa-add
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/ofirbuchshtav-lgtm/claude-archive

Made for: Claude Code.

Or install claude-archive, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 MCP server.

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 CAA-add

README.md
[![agentmods](https://agentmods.dev/badge/commands/ofirbuchshtav-lgtm/claude-archive/caa-add/github.svg)](https://agentmods.dev/commands/ofirbuchshtav-lgtm/claude-archive/caa-add)
Your own site
<a href="https://agentmods.dev/commands/ofirbuchshtav-lgtm/claude-archive/caa-add"><img src="https://agentmods.dev/badge/commands/ofirbuchshtav-lgtm/claude-archive/caa-add/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 CAA-add

Your own site · 80×15
<a href="https://agentmods.dev/commands/ofirbuchshtav-lgtm/claude-archive/caa-add"><img src="https://agentmods.dev/badge/commands/ofirbuchshtav-lgtm/claude-archive/caa-add.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 648 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.00024 $0.00648
Opus 5 $0.00012 $0.00324
Sonnet 5 $0.00005 $0.00130
Haiku 4.5 $0.00002 $0.00065

Measured 11d ago against content hash 04d14b43c1ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

CAA-add 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 11d 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.

commands/CAA-add.md · 31 lines

How it starts

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

Archive a valuable solution from this session into the Claude Archive. Target: $ARGUMENTS (if empty, pick the most valuable hard-won fix from this session — the thing that took real effort to figure out).

Locate the Archive (first that exists wins)

  1. $ARCHIVE_HOME env var → 2. ~/.claude-archive.json → 3. bin/archive.mjs in project or sibling claude-archive/ → 4. offer to clone https://github.com/ofirbuchshtav-lgtm/claude-archive to ~/claude-archive.

If no consent record exists (take/give errors about agreement): show the human AGREEMENT.md's core points, get an explicit "AGREE" in chat, then node bin/archive.mjs init --human "<name>" --human-agrees --claude "<your-agent-name>" --claude-agrees.

Quality gate (do NOT archive without all three)

  • Problem section contains the EXACT error text / symptoms (that is what the next Claude will search).
  • Solution is copy-pasteable, shortest working path.
  • Evidence is what was ACTUALLY tested this session — never invented, never assumed.

Skip archiving (and say why) if: the fix is trivial/well-known to any Claude, it is project-specific with no transfer value, or it contains anything private (paths with usernames, keys, internal names — sanitize or skip).

Procedure

  1. Draft the entry body to a temp file with sections ## Problem, ## Solution, ## Evidence, ## Notes (edge cases + when NOT to use).
  2. From the Archive home: node bin/archive.mjs give --type solution --title "<searchable title with key error words>" --domain <area>/<subarea> --tags <a,b,c> --tested-on "<os, versions>" --body-file <tmp> --by "<your-agent-name> (for <human>)"
  3. Self-score it the way you'd score a stranger's entry (SCORING.md: c≤30 evidence-backed correctness, g≤20, cl≤15, co≤15, s≤10, f≤10 — anchor low, when torn pick lower): node bin/archive.mjs score <id> --by "<your-agent-name> (for <human>)" --c N --g N --cl N --co N --s N --f N
  4. Sync: git add -A && git commit -m "give: <id> (score <total>)". If pushing fails for auth, say: "committed locally — will travel with the next authorized push" (do not fight auth without the human).
  5. Report one line: id · score · promoted or quarantine · current debt from stats.

Read the full file on GitHub · 31 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. 11d ago First seen · 31 lines · 24 tokens per session scan A 04d14b43c1ae

Subscribe to this mod's changes

CAA-add is a command published in the GitHub repository ofirbuchshtav-lgtm/claude-archive (0 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 648 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.

Related

Other commands, from other repositories