with one click
add-memory
// Add a memory system to an agent — file awareness, knowledge graph, structured state, or multi-session tracking
// Add a memory system to an agent — file awareness, knowledge graph, structured state, or multi-session tracking
Modify an existing playbook based on conversation context or explicit instructions. Use when user wants to update, fix, extend, or refine a playbook they already have.
Create a new skill or playbook. Guides through requirements gathering and generates the appropriate template based on complexity.
Create an executive chief of staff agent — asks about your tools, team, and priorities, then scaffolds a Trinity-compatible agent for daily briefings, meeting prep, and decision tracking
Scaffold a new Trinity-compatible Claude Code agent from scratch on any topic. Creates directory, CLAUDE.md, skills, and Trinity files — ready for development.
Create a content writer agent — asks about your brand voice, platforms, and topics, then scaffolds a Trinity-compatible ghostwriter agent that writes in your voice
Create a knowledge-base agent — asks a structured 6-question interview about the domain's ontology, then scaffolds a Cornelius-shaped Trinity-compatible KB agent with a typed graph, 7-layer vault, subagents, and scheduled coherence jobs
| name | add-memory |
| description | Add a memory system to an agent — file awareness, knowledge graph, structured state, or multi-session tracking |
| argument-hint | [memory-type] |
| disable-model-invocation | false |
| user-invocable | true |
| allowed-tools | Read, Write, Bash, Glob, Grep, AskUserQuestion |
| metadata | {"version":"1.1","created":"2026-04-16T00:00:00.000Z","updated":"2026-05-16T00:00:00.000Z","author":"Ability.ai"} |
Add a memory system to an existing agent. Memory skills are COPIED into the agent's .claude/skills/ directory — the agent becomes self-contained with no plugin dependency.
| Type | Description | Skills Installed |
|---|---|---|
| file-index | File system awareness — creates and maintains a searchable file index | setup-index, refresh-index, search-files |
| brain | Zettelkasten-style knowledge graph — atomic notes with connections | setup-brain, create-note, search-brain, find-connections |
| json-state | Structured JSON state with jq-based updates and action logging | setup-memory, load-memory, update-memory, memory-jq |
| workspace | Multi-session project tracking — organized folders, sessions, archives | setup-projects, create-project, create-session, archive-project |
Check if we're in an agent directory (has CLAUDE.md) or if user specified a path.
# Check current directory
if [ -f "CLAUDE.md" ]; then
AGENT_DIR="$(pwd)"
else
# Ask user for agent path
fi
If no CLAUDE.md found, ask:
If user provided an argument (e.g., /agent-dev:add-memory brain), use that.
Otherwise, use AskUserQuestion:
Question: "What kind of memory does this agent need?"
Header: "Add Memory"
Options:
File awareness (file-index) — "I need the agent aware of workspace files"
Knowledge graph (brain) — "I need connected notes, evolving knowledge"
Structured state (json-state) — "I need counters, config, structured data"
Multi-session workspace (workspace) — "I need organized projects and sessions"
Memory templates are stored in this plugin at:
agent-dev/memory-templates/
file-index/ # setup-index/, refresh-index/, search-files/
brain/ # setup-brain/, create-note/, search-brain/, find-connections/
json-state/ # setup-memory/, load-memory/, update-memory/, memory-jq/
workspace/ # setup-projects/, create-project/, create-session/, archive-project/
Copy the selected memory type's skills into the agent:
# Get the plugin directory (where this skill lives)
PLUGIN_DIR="$(dirname "$(dirname "$(dirname "$0")")")"
TEMPLATES_DIR="$PLUGIN_DIR/memory-templates"
# Copy skills to agent
cp -r "$TEMPLATES_DIR/[selected-type]/"* "$AGENT_DIR/.claude/skills/"
Add a section documenting the new memory capabilities:
## Memory: [Type Name]
This agent has [type] memory installed. Available skills:
- `/[skill-1]` — description
- `/[skill-2]` — description
...
Run `/[setup-skill]` to initialize.
Output:
## Memory Added
Installed **[type]** memory to `[agent-name]`.
### New Skills
- `/[skill-1]` — description
- `/[skill-2]` — description
### Next Step
Run `/[setup-skill]` to initialize the memory system.
~/. If using the native Claude Code memory: frontmatter field on custom subagent definitions, use memory: project (stores in .claude/agent-memory/, stays in repo) — never memory: user (stores in ~/.claude/, breaks portability)