ap-memory

ap-memory is a skill for Claude Code, Codex from agentproto/ts. It costs 81 tokens per session (1,127 once invoked), scanned A, original, Apache-2.0.

Read and write the daemon's durable memory (AIP-72): memorysearch, memorylist, memoryread, memorywrite, memorysupersede, memoryarchive, memorydismiss. Trigger when asked to remember or recall a fact, preference or correction across sessions, check what is already remembered before writing, replace or retire an…

Skill for Claude CodeCodex

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

Install with agentmods
npx agentmods add skills/agentproto/ts/ap-memory
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.

Any agent
npx skills add agentproto/ts --skill ap-memory
Clone the repo
git clone --depth 1 https://github.com/agentproto/ts

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentproto/ts/ap-memory/github.svg)](https://agentmods.dev/skills/agentproto/ts/ap-memory)
Your own site
<a href="https://agentmods.dev/skills/agentproto/ts/ap-memory"><img src="https://agentmods.dev/badge/skills/agentproto/ts/ap-memory/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 ap-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentproto/ts/ap-memory"><img src="https://agentmods.dev/badge/skills/agentproto/ts/ap-memory.svg" alt="Reviewed on agentmods" width="80" 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,127 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 unknown 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.01127
Opus 5.5 $0.00032 $0.00451
Sonnet 5.5 $0.00016 $0.00225
Haiku 4.5 $0.00008 $0.00113

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

Security

Grade A, and why

ap-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 today.

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/skill-pack-agentproto/src/skills/ap-memory/SKILL.md · 89 lines

How it starts

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

ap-memory

MCP profile

Only memory_search and memory_write are on the core profile. memory_list, memory_read, memory_supersede, memory_archive and memory_dismiss exist only on the full profile: in a session narrowed to core, orchestrator, apps or admin they are not in tools/list, so a call fails before reaching the daemon. On core you can find a hit and propose, but you cannot read the whole item, so work from the snippet.

Who may do what

  • Anyone proposes. memory_write defaults to mode: "propose": it stores a pending proposal that is not in force. memory_search does not find it and no id exists yet.
  • Only the operator or a supervisor commits. mode: "commit", memory_supersede, memory_archive and memory_dismiss need a caller with no session id (the operator) or a session whose recorded spawn role is at least supervisor. A worker session, a session with no recorded role or a pack-carried role gets commit_not_allowed; it proposes instead.
  • Opt-out. A session whose agent sets memory.enabled: false writes nothing, not even a proposal (memory_disabled); it can still read.
  • This is a write policy on the local daemon, not an authentication boundary.
  • Every call is scoped to the calling session's node scope: an item outside it reads as absent.

Tools

Task: remember something without duplicating

  1. memory_search with a few distinctive words. If a hit already says it, stop.
  2. If a hit says something close but outdated, do not write a second item: memory_read it (keep the revision) and either change it (commit, with ifRevision) or supersede it. Two active items cannot share a slug.
  3. Otherwise memory_write with an item: schema: "memory/v1", a kebab-case slug, a kind (user, feedback, project or reference), a title, updated_at, and a short body. For feedback, give the rule first, then a Why: line. One claim per item.
  4. Report the proposalId you got back and say it is pending: it is not remembered until an operator or supervisor commits it.

Read the full file on GitHub · 89 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. today First seen · 89 lines · 81 tokens per session scan A a70aab6bfeae

Subscribe to this mod's changes

ap-memory is a skill published in the GitHub repository agentproto/ts (11 stars, last pushed today), licensed Apache-2.0. It adds 81 tokens to every session and 1,127 once invoked, about $0.0003 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-12-02.

Related

ap-memory compared with skills from other repositories

ap-memory next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ap-memoryagentproto/tsSkill11todayApache-2.0A81Claude Code, Codex
llm-wikisammcj/agentic-codingSkill175todayApache-2.0A82Claude Code
authoring-claude-mdsammcj/agentic-codingSkill175todayApache-2.0A33Claude Code, Codex
graphifysammcj/agentic-codingSkill175todayApache-2.0B76Claude Code, Codex
import-memoryomnigent-ai/omnigentSkill12ktodayApache-2.0A54Codex
weknora-sharedTencent/WeKnoraSkill39kyesterdaynoneA68Claude Code, Codex
rememberyonatangross/orchestkitSkill313yesterdayMITA66Claude Code