archive-fact

archive-fact is a skill for Claude Code, Codex from acn-ericlaw/agent-memory. It costs 81 tokens per session (1,021 once invoked), scanned A, original, Apache-2.0.

A tool that moves an old or completed fact from the active memory file into an archive. An archive stores information kept for reference but no longer used regularly.

In plain words
What is it for?
Use it during a memory review or whenever specific facts need archiving. It moves the selected fact blocks without deciding which facts should be archived.
Why use it?
Manually editing memory files can truncate or corrupt them, and deciding what is old should be separate from moving it safely. This handles the file move after that decision is made.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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 skills/acn-ericlaw/agent-memory/archive-fact
Any agent
npx skills add acn-ericlaw/agent-memory --skill archive-fact
Clone the repo
git clone --depth 1 https://github.com/acn-ericlaw/agent-memory

Made for: Claude Code, Codex.

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 archive-fact

README.md
[![agentmods](https://agentmods.dev/badge/skills/acn-ericlaw/agent-memory/archive-fact.svg)](https://agentmods.dev/skills/acn-ericlaw/agent-memory/archive-fact)
Your own site
<a href="https://agentmods.dev/skills/acn-ericlaw/agent-memory/archive-fact"><img src="https://agentmods.dev/badge/skills/acn-ericlaw/agent-memory/archive-fact.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,021 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.1 $0.00081 $0.01021
Opus 5 $0.00041 $0.00511
Sonnet 5 $0.00016 $0.00204
Haiku 4.5 $0.00008 $0.00102

Measured yesterday against content hash e3fc9710aee6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

archive-fact 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.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/archive-fact.mjs, scripts/archive-fact.py, scripts/test_archive_fact.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

agent-skills/archive-fact/SKILL.md · 63 lines

How it starts

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

⚠️ Tool-managed skill provided by agent-memory (provenance: agent-memory-builtin). Don't edit it in place — fork under a new name, or upstream a fix to the agent-memory project (see SKILLS.md).

This skill is the safe archive-move. It performs REVIEW.md step 4 — moving a faded/superseded fact's block out of the live layer — continuity.md, or a thread's own memory/open-threads/thread-<id>.md file (v4.39.0; the sweep moves the block to the quarter archive and deletes the file) — as a runnable script, so the move can't be botched. Don't hand-edit continuity.md to do this (the read-modify-write open(f,"w").write(open(f).read()+…) truncates the file before the read — it has wiped a version.md stamp and then this repo's archive, 50 facts → 6, once each). This script reads the whole file into memory first and writes once, so truncation is structurally impossible.

What it does NOT do

It does not decide what to archive — that judgment (which facts have faded, contradiction scans, supersession) stays with the agent and the REVIEW.md ritual (never-pick-a-winner). This is the mechanical executor only: you name the id(s); it moves them. Same split as memory-lint (the script counts; the agent judges).

How to run

From the repo root, use whichever runtime the machine has (output is byte-identical):

python3 agent-skills/archive-fact/scripts/archive-fact.py --id <fact-id> [--id <fact-id> …]
# or
node    agent-skills/archive-fact/scripts/archive-fact.mjs --id <fact-id> [--id <fact-id> …]

Flags:

  • --id ID — the fact/thread id to archive (repeatable; the move is all-or-nothing — if any id is missing it refuses and changes nothing).
  • --reasonfaded (default) or e.g. "superseded by <new-id>".
  • --quarter YYYY-Qn — target memory/archive/<quarter>.md (default: derived from today, UTC).
  • --note TEXT — the INDEX.md one-liner (single --id only; otherwise derived from the block).
  • --dry-run — print what would move; change nothing. Preview first when unsure.

Read the full file on GitHub · 63 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 Changed · +1 lines e3fc9710aee6
  2. 5d ago First seen · 62 lines · 81 tokens per session scan A b2925ec8a168

Subscribe to this mod's changes

archive-fact is a skill published in the GitHub repository acn-ericlaw/agent-memory (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 81 tokens to every session and 1,021 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.