amfs-memory

amfs-memory is a skill for Claude Code, Codex from raia-live/amfs. It costs 55 tokens per session (1,146 once invoked), scanned A, original, Apache-2.0.

A guide for using AMFS, a persistent memory system that keeps selected information available across sessions, agents, and machines. It explains when to read, save, search, and commit memories, rather than documenting the tool commands themselves.

In plain words
What is it for?
Use it to begin a session with the right role and briefing, record important decisions, save meaningful work, search past context, and commit a complete outcome.
Why use it?
It helps agents preserve useful decisions and context without writing after every small change or wasting memory operations. Its session process starts with an identity and briefing and ends by saving the outcome.

Skill for Claude CodeCodex

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/raia-live/amfs/cursor
Any agent
npx skills add raia-live/amfs --skill cursor
Clone the repo
git clone --depth 1 https://github.com/raia-live/amfs

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 amfs-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/raia-live/amfs/cursor.svg)](https://agentmods.dev/skills/raia-live/amfs/cursor)
Your own site
<a href="https://agentmods.dev/skills/raia-live/amfs/cursor"><img src="https://agentmods.dev/badge/skills/raia-live/amfs/cursor.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,146 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.00055 $0.01146
Opus 5 $0.00028 $0.00573
Sonnet 5 $0.00011 $0.00229
Haiku 4.5 $0.00006 $0.00115

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

Security

Grade A, and why

amfs-memory 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 4d 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.

packages/agent-guide/cursor/SKILL.md · 108 lines

How it starts

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

AMFS Agent Memory Guide

Persistent memory that survives across sessions, agents, and machines. This guide covers decision rules and conventions — not tool syntax (the MCP server already provides that).

Cost Model

Operation Cost Examples
Read 1 op amfs_read, amfs_search, amfs_list, amfs_recall, amfs_briefing, amfs_retrieve
Write 2 ops amfs_write, amfs_record_context
Commit FREE amfs_commit_outcome — always commit, never skip

Session Lifecycle

Every session follows four phases:

  1. Identifyamfs_set_identity with a stable kebab-case role name (e.g. api-agent, infra-agent). Reuse the same name across conversations about the same domain. Don't use task-specific names like fix-button-color.

  2. Get Briefedamfs_briefing returns compiled knowledge from the Cortex. One briefing (1 op) replaces many individual reads. Always start here.

  3. Work — read/write/record as you go. Write after meaningful work, not after every edit. Record decisions as they happen, not at the end.

  4. Commitamfs_commit_outcome snapshots the full decision trace. This is free. Without it, the trace is lost when the session ends.

What to Save (worth 2 ops)

  • Decisions with rationale — why X over Y, trade-offs considered
  • Discovered patterns — reusable across sessions, link with pattern_refs
  • Risks and bugs — gotchas that would trip up future agents
  • Task summaries — what was done and key outcomes after significant work
  • External tool outputs — API results, metrics, incident data that informed decisions

What NOT to Save

  • Trivial edits — "renamed variable", "added comment" — VCS tracks these
  • File-level changes — save the decision, not the diff
  • Recomputable info — anything derivable from the codebase in under 5 seconds
  • Transient debug output — stack traces, test logs
  • One-sentence entries — too low signal for 2 ops; batch into richer entries

Read the full file on GitHub · 108 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. 4d ago First seen · 108 lines · 55 tokens per session scan A 368cb263b291

Subscribe to this mod's changes

amfs-memory is a skill published in the GitHub repository raia-live/amfs (75 stars, last pushed 5d ago), licensed Apache-2.0. It adds 55 tokens to every session and 1,146 once invoked, about $0.0003 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-30.