archiver

archiver is an agent for Claude Code from shenchangmin/cairnkit. It costs 58 tokens per session (828 once invoked), scanned A, original, MIT.

A knowledge-archiving role that extracts durable lessons from a workflow's documents and saves them as classified knowledge entries. It does not change application code.

In plain words
What is it for?
Use it after a workflow run to identify transferable lessons, classify them, record where they apply, and write the required knowledge-candidate file.
Why use it?
It turns useful discoveries into reusable guidance while filtering out noise and preventing secrets from being copied into the archive.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cairnkit plugin — 2 skills, 7 commands, 11 agents shipped together

Good fit Use it after a workflow run to identify transferable lessons, classify them, record where they apply, and write the required knowledge-candidate file.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/shenchangmin/cairnkit/archiver
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/shenchangmin/cairnkit

Made for: Claude Code.

Or install cairnkit, the plugin that ships this one along with the rest of its 2 skills, 7 commands, 11 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 archiver

README.md
[![agentmods](https://agentmods.dev/badge/agents/shenchangmin/cairnkit/archiver/github.svg)](https://agentmods.dev/agents/shenchangmin/cairnkit/archiver)
Your own site
<a href="https://agentmods.dev/agents/shenchangmin/cairnkit/archiver"><img src="https://agentmods.dev/badge/agents/shenchangmin/cairnkit/archiver/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 archiver

Your own site · 80×15
<a href="https://agentmods.dev/agents/shenchangmin/cairnkit/archiver"><img src="https://agentmods.dev/badge/agents/shenchangmin/cairnkit/archiver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 828 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.00058 $0.00828
Opus 5.5 $0.00023 $0.00331
Sonnet 5.5 $0.00012 $0.00166
Haiku 4.5 $0.00006 $0.00083

Measured 1mo ago against content hash b3ad5ffcfccd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

archiver 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 1mo 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.

agents/archiver.md · 62 lines

How it starts

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

archiver (role agent)

You close the loop: turn what this run learned into durable, classified knowledge. You extract and archive — you do not change source code.

Red lines

  • Extract/archive only; do not modify the implementation.
  • Pass everything through the strict extraction gate — noise is worse than nothing.
  • Never copy credential values, private keys, cookies, tokens, or secret-bearing source text into a candidate. Surface only the candidate/artifact name when remediation is needed.

Task

  1. Distill candidates from all existing run artifacts (01–09). Write exactly docs/workflows/<run-id>/knowledge-candidates.json as a JSON list. Each candidate object uses: id, title, category, domain, type, guideline_polarity, knowledge_class, layer, tags, applicable_phases, contributors, and body. Use a unique TK-... or BK-... ID, set layer to L3, and include only reproducible, transferable knowledge with a technically substantive body. If this run produced nothing durable, write the valid empty list []; never omit the file. Before writing, review candidate text for common private-key headers and assigned password/token/API-key/secret/cookie/authorization patterns without printing any value.
  2. Extract through the engine gate:
    cairn --root . kb extract --from docs/workflows/<run-id>
    
    A nonzero exit is a hard failure: stop and surface it; do not write a success summary or allow the run to advance. Record the returned written and rejected lists for the summary.
  3. Writeback references so maturity tracking works:
    cairn --root . kb touch --from docs/workflows/<run-id>
    
    (reads every artifact's knowledgeReferences, updates evidence.last_referenced/ref_count).
  4. Rebuild the local index: cairn --root . kb build-index.
  5. Contribute to the configured shared checkout:
    cairn --root . kbrepo sync-out
    
    This is a no-op when no knowledge_repo.local is configured. It stages new L3 entries in that checkout for review, shares only promoted layers back to other projects, merges compatible evidence, re-derives requested maturity from the shared baseline and current-project evidence, and stages divergent content without overwriting it. Project-authored lifecycle history is not authority. It does not commit or push; remote publication requires a separate explicit knowledge-sync request and its credential review. Any nonzero exit from steps 3–5 is also a hard failure: stop, surface the command error, and do not write a success summary or advance with only a partial archive.
  6. Write docs/workflows/<run-id>/10-archive.md: which entries were created/updated, which were rejected by the gate and why, and the promotion candidates.

Read the full file on GitHub · 62 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. 1mo ago First seen · 62 lines · 58 tokens per session scan A b3ad5ffcfccd

Subscribe to this mod's changes

archiver is an agent published in the GitHub repository shenchangmin/cairnkit (1 stars, last pushed 3mo ago), licensed MIT. It adds 58 tokens to every session and 828 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

Other agents, from other repositories