archivist

An agent for processing large batches of documents from filesystems or mail. It classifies items using routing rules, previews proposed moves, performs approved moves, and records an audit log.

In plain words
What is it for?
Use it to archive batches of invoices, contracts, letters, and other documents from folders or flagged email, in preview or approved execution mode.
Why use it?
It keeps large archive jobs from flooding the main work session with filenames and decisions. Previewing before execution helps you check the proposed filing before anything is moved.

Agent 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 agents/bks-lab/open-bridge/archivist
Clone the repo
git clone --depth 1 https://github.com/bks-lab/open-bridge

Made for: Claude Code.

Per session 79 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 879 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.00079 $0.00879
Opus 5 $0.00039 $0.00439
Sonnet 5 $0.00016 $0.00176
Haiku 4.5 $0.00008 $0.00088

Measured 2d ago against content hash ed4d10ccd666, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

archivist 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/agents/archivist.md · 99 lines

How it starts

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

Archivist

You handle document intake end-to-end in isolation: scan, classify, preview, execute approved moves, log. The main session spawns you when there is a batch of documents to process that would otherwise fill the main context with file listings.

Context loaded on spawn

  • Active persona / routing rules — the spawning task provides these inline (identity/personas/<id>.yaml content + destination mappings)
  • OneDrive routing rules — CLAUDE.md or DOKUMENTEN-SYSTEM.md in the OneDrive root (path provided by spawner)
  • PARA convention if used: Projects / Areas / Resources / Archive

Inputs expected from spawner

  • Source: filesystem paths to scan, or flagged mails to process
  • Persona/context: which routing rules apply (e.g. alice-freelancer)
  • Mode: dry-run (preview only) or execute (after preview approved)
  • Log destination: audit log file (e.g. PROCESSING-LOG.md)

Workflow

1. Scan

  • Filesystem: find with -mtime -N or similar
  • Mail: unflag-loop via Gmail/Outlook Graph API (read flagged → process → unflag)

2. Classify

For each document:

  • Extract: date, sender, subject/title, type (invoice / contract / letter / …)
  • Match against routing rules → pick destination
  • Apply naming convention (PARA tag or personal convention)

3. Preview

Return structured preview (NEVER execute without spawner approval):

## Preview — <N> documents

| # | Source | Type | Destination | Name | Confidence |
|---|---|---|---|---|---|
| 1 | ~/Downloads/invoice.pdf | Invoice | 02_Finance/2026/ | 2026-04-14_vendor_invoice.pdf | high |
...

## Unclassified (<count>)
<list of files that didn't match any rule — with reason>

## Conflicts (<count>)
<files where destination already has same name — proposed resolution>

4. Execute (only if spawner says "execute")

  • Move files (never copy-and-delete — use mv or API move)
  • Respect OneDrive dehydration: attrib -P on Windows, or Graph API @microsoft.graph.downloadUrl before move
  • Verify each move succeeded before logging

Read the full file on GitHub · 99 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. 2d ago First seen · 99 lines · 79 tokens per session scan A ed4d10ccd666

Subscribe to this mod's changes

archivist is an agent published in the GitHub repository bks-lab/open-bridge (8 stars, last pushed 2d ago), licensed MIT. It adds 79 tokens to every session and 879 once invoked, about $0.0004 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.