Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Agent Memory

ASecurity

Shared agent memory protocol — the .agents/memory/ graph store every agent reads and writes: MEMORY.md index, subsystem nodes, compact-on-write merging, size caps, and the read protocol. Use when reading or writing project memory, when asked to remember something, or to decide where knowledge belongs.

3 stars
0 votes
0 copies
0 views
Added 9/22/2026
ai-agentsgonodetestinggitdatabase

Security Analysis

A100/100

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add owlmeans/common --skill agent-memory --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Memory?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Agent Memory
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/owlmeans-agent-memory-8f358db7/badge)](https://www.skillsdirectory.com/skills/owlmeans-agent-memory-8f358db7)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: agent-memory
description: "Shared agent memory protocol — the .agents/memory/ graph store every agent reads and writes: MEMORY.md index, subsystem nodes, compact-on-write merging, size caps, and the read protocol. Use when reading or writing project memory, when asked to remember something, or to decide where knowledge belongs."
user-invocable: true
metadata:
  scope: general
---
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->

# Agent memory (`.agents/memory/`)

One shared memory store per repository, used by every agent: a graph of subsystem nodes rooted in
the `MEMORY.md` index. Compactness is the core value — every write
merges and compacts; nothing is ever appended as a log.

Never write memory to `.claude/memory/`, `.github/memory/`, `~/.claude/`, `~/.copilot/`, or
anywhere outside the repository. Records found in any such place are folded into
`.agents/memory/` by `memory-recompact`, never added to.

## Store layout

```
.agents/memory/
├── MEMORY.md     # graph root: the only always-read file
└── <node>.md     # one file per subsystem / concern / integration
```

Flat directory — graph structure lives in scopes and wiki-links, not subdirectories.

## Node naming

Node id = lowercase-kebab name of the **project-structure part** the knowledge attaches to:

1. **Subsystem** — workspace dir / package name: `manager-web`, `auth`, `deploy`. Deepest
   unambiguous segment; prefix with the parent only on collision.
2. **Cross-cutting concern** spanning subsystems: `build`, `testing`, `deploy`, `routing`, `i18n`.
3. **Integration** — external service/library: `stripe`, `cloudflare`, `openrouter`.
4. **`workspace`** — repo-level facts that fit nowhere else (remotes, branch topology, env model).

File is `<node>.md`; the id is the wiki-link target: `[[manager-web]]`. **Never** key a node to an
event, date, phase, investigation, or task name.

## Index format (`MEMORY.md`)

```markdown
# Memory Graph — <project>

Shared agent memory (`agent-memory` protocol). Read this file at session start.
Before non-trivial work, open every node whose scope matches the task's files or topics.

## Subsystems
- [[manager-web]] `sources/manager-web/**` — i18n 8-domain split; owl-theme wiring
## Cross-cutting
- [[build]] `**/tsconfig*.json` — tsbuildinfo path pinning; tolerant library builds
## Integrations
- [[stripe]] `ext:stripe` — sandbox topology; webhook fan-out
```

Rules: exactly one line per node — `- [[<node>]] ` + backticked scope + ` — <hook>`; hook ≤ 100
chars; no dates; only non-empty groups; file ≤ 50 lines; no skills listed (skills self-describe).
The scope column is the router: match the task's paths/topics against scopes to decide which
nodes to open.

## Node format

Frontmatter — exactly three fields:

```yaml
---
node: deploy                 # = filename without .md; = wiki-link target
scope: "deploy/**"           # repo-relative globs; ext:<service> for integrations; . for workspace
updated: 2026-08             # month granularity only
---
```

Body — only non-empty sections, in this order:

- `## Facts` — what IS: structure, behavior, topology. 1–3 lines each.
- `## Invariants` — what MUST HOLD; optionally "broke when violated: <symptom>".
- `## Gotchas` — symptom → cause → counter-move, ≤ 3 lines each.
- `## Pointers` — key files, promoted-skill pointer lines, `External docs` (URL + gist).
- `## Status` — optional; in-flight state only; every line dated; prune resolved lines on every read.

`Status` is the **only** place dates and unfinished-work notes are allowed. Link related nodes
inline with `[[node]]`.

## Read protocol

- **Session start**: read `.agents/memory/MEMORY.md` — the index only.
- **Before a non-trivial task**: open every node whose scope matches the task (typically 1–3).
- **When a topic surfaces mid-session** that the index names: open its node before acting.
- **Never bulk-read** the store — the index + scopes exist so you don't have to.

## Write protocol (compact-on-write)

Every write is a merge, never an append:

1. **Extract** — reduce the outcome to reusable knowledge atoms (rule below). Nothing survives →
   write nothing.
2. **Locate** — match scopes to find the node; none matches → create one per the naming rule and
   add its index line.
3. **Merge / supersede** — place each atom in the right section; if it refines or contradicts an
   existing line, **rewrite that line in place** — never append a dated correction. The node
   always reads as current truth.
4. **Compact** — reread the node; collapse redundancy; delete anything the code or git history
   now states; prune resolved `Status` lines.
5. **Cap** — over soft cap: compact harder. Over hard cap: split by sub-scope into a linked child
   node, or promote procedure-shaped overflow (`memory-promotion` where present, else the
   project's `skill-authoring` or `create-skill` skill).
6. **Index** — update the hook line if the node's center of gravity moved; bump `updated:`.

## Knowledge, not events

**Record the rule, not the story.** For every line ask: *what must a future agent know to act
correctly, stated without reference to this session?* Keep invariants, cause→effect,
counter-moves, recognition fingerprints (symptoms). Drop dates, phase numbers, who did what,
attempt sequences, and anything recoverable from code or git.

Before (event log): "2026-06-11 — CI red on the second run; the migration step was not idempotent,
patched it, re-ran green."
After (knowledge): "The migration step is idempotent — run against an already-migrated database
it writes nothing; a second run that still reports work means the first did not converge."

## Size caps (hard)

| Thing | Cap |
|---|---|
| Index entry | 1 line, hook ≤ 100 chars |
| `MEMORY.md` | ≤ 50 lines |
| Node file (soft / hard) | 80 / 120 lines |
| Single fact/gotcha | ≤ 3 lines |
| `Status` section | ≤ 5 dated lines |
| Nodes per store (soft) | ~25 — merge low-traffic siblings beyond |

## Memory vs skill

Fact-shaped ("what is true") stays here. Procedure-shaped ("to do X, do Y") becomes a skill —
follow `memory-promotion` where present, otherwise the project's `skill-authoring` or
`create-skill` skill. Repeated use of a node to *perform* tasks, and over-cap nodes full of
steps, are promotion triggers.

Promotion is a **rewrite, never a move**: never paste node text into a skill. "Record the rule,
not the story" and the size caps above bind skill bodies at least as tightly as they bind nodes
(`memory-promotion` → Distillation).

Attribution

owlmeansowlmeans
View sourceMore from owlmeans →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1066601 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

651 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →