Skip to content
Back to skills

Agent Memory

ASecurity

Manage agent memory across sessions — store, retrieve, and persist context, decisions, and learned patterns.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 14, 2026
ai-agentsgogit

Works with

  • claude code
  • cursor
  • cli

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned October 14, 2026

npx -y skills add ctaxnagomi/agent-kd-skill --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 with every re-scan.

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

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
{
  "name": "agent-memory",
  "description": "Manage agent memory across sessions: store, retrieve, and persist context, decisions, and learned patterns. Use when the agent needs to remember things between sessions or build a knowledge base.",
  "credit": "Matt Pocock (mattpocock/skills)"
}
---

# Agent Memory

Manage agent memory across sessions — store, retrieve, and persist context, decisions, and learned patterns.

## Use case

Use this skill when:
- The agent needs to remember things between sessions
- Building a persistent knowledge base
- Storing decisions, patterns, and learned behaviors
- Resuming work without losing context

## Memory types

- **Session memory**: What happened in this conversation
- **Project memory**: Architecture decisions, domain vocabulary, conventions
- **User memory**: Preferences, patterns, repeated instructions
- **Error memory**: Past bugs and their solutions

## Process

1. **Capture** — Identify what's worth remembering.
2. **Store** — Write to the appropriate memory file (CONTEXT.md, .memory/, etc.).
3. **Index** — Tag with categories for easy retrieval.
4. **Retrieve** — Search memory before starting work.
5. **Update** — Prune stale entries, merge duplicates.

## Rules

- Store facts, not fluff.
- Tag every entry with a category and timestamp.
- Prune entries older than the relevance window.
- Never store secrets or credentials in memory files.
- Prefer structured formats (YAML, JSON) over prose for machine-readable memory.

## File structure

```
.memory/
  context.md        # Project context and decisions
  patterns.md       # Learned patterns and conventions
  errors.md         # Past bugs and solutions
  user.md           # User preferences and habits
```

## Credit

This skill is based on the work of **Matt Pocock** ([@mattpocock](https://github.com/mattpocock)). Original source: [mattpocock/skills](https://github.com/mattpocock/skills). Licensed under MIT.

---

## How to use?

### 1. Download
Go to the [AGENT KD SKILL gallery](https://ctaxnagomi.github.io/agent-kd-skill/) and find this skill card. Click **Download** to save the SKILL.md file to your computer.

### 2. Install
Copy the downloaded SKILL.md into your agent's skills directory:

| Agent | Path |
|-------|------|
| **opencode** | ~/.config/opencode/skills/<skill-name>/SKILL.md |
| **Claude Code** | ~/.claude/skills/<skill-name>/SKILL.md |
| **Codex CLI** | ~/.codex/skills/<skill-name>/SKILL.md |
| **Cursor** | ~/.cursor/skills/<skill-name>/SKILL.md |
| **Gemini CLI** | ~/.gemini/skills/<skill-name>/SKILL.md |

Example for opencode:
`ash
mkdir -p ~/.config/opencode/skills/<skill-name>
cp SKILL.md ~/.config/opencode/skills/<skill-name>/SKILL.md
`

### 3. Use
Restart your agent session. The skill will auto-load based on its description. You can also invoke it explicitly by typing @<skill-name> in your agent.

### 4. Verify
Ask your agent something related to the skill's purpose. If it responds using the skill's instructions, you're all set.

Files in this skill

  • SKILL.md2.9 KB
  • agent-memory-skill.json1 KB
  • agent-memory.md1.9 KB
  • assembly.json693 B

Attribution

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

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.