Remember (cross-agent write-back)
Memory at ~/.agents/memory/ is shared by every agent. Any agent, not just Claude, can contribute. This skill is how Codex, Gemini, and Pi (which have no auto-memory) write durable facts the same way Claude's auto-memory does. One fact per file. Match the existing files' format exactly.
When to use
- The user says "remember this" / "save this" / "note for next time".
- You learned a durable fact: a preference, a correction/feedback, an ongoing project constraint, or a pointer to an external resource.
- Not for: what the repo, git history, or a project's own
AGENTS.md already records; transient task state; anything only relevant to this one conversation.
Memory types
user: who the user is (role, skills, preferences).
feedback: guidance on how to work (corrections + confirmed approaches). Include the why.
project: ongoing work, goals, constraints not derivable from code/git. Convert relative dates to absolute.
reference: pointers to external resources (URLs, dashboards, tickets).
Procedure
Dedupe first. grep -ril "<topic>" ~/.agents/memory/, if a file already covers it, update that file, don't make a duplicate. Delete memories that turn out wrong (trash, never rm -rf).
Write the file ~/.agents/memory/<slug>.md (kebab-case slug), with this frontmatter:
---
name: <Short Title>
description: <one line, used to decide relevance during recall>
metadata:
type: user | feedback | project | reference
---
<the fact. For feedback/project, add **Why:** and **How to apply:** lines.>
- Absolute dates (today's real date, not "last week").
- Link related memories with
[[their-slug]]. Link liberally; a [[slug]] with no file yet is fine.
Index it. Add ONE line to ~/.agents/memory/MEMORY.md:
- [<Title>](<slug>.md), <hook>
(MEMORY.md is the index loaded every session. One line each, no content.)
Ship it so all agents inherit it:
cd ~/.agents && git add -A && git commit -m "memory: <slug>" && git push
(If git push fails on network/sandbox, the commit alone is enough, a backup job or the next push ships it.)
Confirm in one line: what you saved and where.
Quality bar (parity across agents)
Every agent writes to the same standard so the weakest model doesn't degrade the shared brain:
- One fact per file. Minimal. No restating the obvious.
- Description line must be genuinely useful for recall; it's what future agents scan.
- If unsure whether something is durable or just this-session, ask rather than guessing.
- Write-back is discretionary and unequal by design: the auto-memory agent (Claude) captures most; read-mostly agents write only clearly-durable facts. Fewer, better memories beat volume.
1---2name: remember3description: Save a durable fact about the user or their work into the shared cross-agent memory (~/.agents/memory), then commit + push so every agent (Claude, Codex, Gemini, Pi) sees it. The write-back path: use it whenever you learn something worth persisting beyond this session, or when the user says "remember this".4---56# Remember (cross-agent write-back)78Memory at `~/.agents/memory/` is shared by every agent. Any agent, not just Claude, can contribute. This skill is how Codex, Gemini, and Pi (which have no auto-memory) write durable facts the same way Claude's auto-memory does. One fact per file. Match the existing files' format exactly.910## When to use1112- The user says "remember this" / "save this" / "note for next time".13- You learned a durable fact: a preference, a correction/feedback, an ongoing project constraint, or a pointer to an external resource.14- **Not** for: what the repo, git history, or a project's own `AGENTS.md` already records; transient task state; anything only relevant to this one conversation.1516## Memory types1718- `user`: who the user is (role, skills, preferences).19- `feedback`: guidance on how to work (corrections + confirmed approaches). Include the **why**.20- `project`: ongoing work, goals, constraints not derivable from code/git. Convert relative dates to absolute.21- `reference`: pointers to external resources (URLs, dashboards, tickets).2223## Procedure24251. **Dedupe first.** `grep -ril "<topic>" ~/.agents/memory/`, if a file already covers it, **update that file**, don't make a duplicate. Delete memories that turn out wrong (`trash`, never `rm -rf`).26272. **Write the file** `~/.agents/memory/<slug>.md` (kebab-case slug), with this frontmatter:28 ```markdown29 ---30 name: <Short Title>31 description: <one line, used to decide relevance during recall>32 metadata:33 type: user | feedback | project | reference34 ---3536 <the fact. For feedback/project, add **Why:** and **How to apply:** lines.>37 ```38 - Absolute dates (today's real date, not "last week").39 - Link related memories with `[[their-slug]]`. Link liberally; a `[[slug]]` with no file yet is fine.40413. **Index it.** Add ONE line to `~/.agents/memory/MEMORY.md`:42 `- [<Title>](<slug>.md), <hook>`43 (MEMORY.md is the index loaded every session. One line each, no content.)44454. **Ship it** so all agents inherit it:46 ```bash47 cd ~/.agents && git add -A && git commit -m "memory: <slug>" && git push48 ```49 (If `git push` fails on network/sandbox, the commit alone is enough, a backup job or the next push ships it.)50515. **Confirm** in one line: what you saved and where.5253## Quality bar (parity across agents)5455Every agent writes to the same standard so the weakest model doesn't degrade the shared brain:56- One fact per file. Minimal. No restating the obvious.57- Description line must be genuinely useful for recall; it's what future agents scan.58- If unsure whether something is durable or just this-session, ask rather than guessing.59- Write-back is discretionary and unequal by design: the auto-memory agent (Claude) captures most; read-mostly agents write only clearly-durable facts. Fewer, better memories beat volume.