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.
npx agentmods add commands/tslateman/duet/capture-memorygit clone --depth 1 https://github.com/tslateman/duetWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00010 | $0.00572 |
| Opus 5 | $0.00005 | $0.00286 |
| Sonnet 5 | $0.00002 | $0.00114 |
| Haiku 4.5 | $0.00001 | $0.00057 |
Grade C, and why
capture-memory scanned grade C with 1 finding 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 yesterday.
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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- Memory files hold lessons. CLAUDE.md holds instructions. | MEMORY.md | CLAUDE.md | | -------------------------------------------- | -------------------------------------------- | | "We learned X breaks" | "Use Y ins How it starts
The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Reflect on the work just completed, then persist learnings for future sessions.
Step 1: Reflect
Identify 2-4 concrete technical insights:
- Patterns discovered or reinforced
- Gotchas or surprises encountered
- Techniques that worked well (or didn't)
Focus on insights, not actions taken. Be specific -- name files, functions, concepts.
Step 2: Dedup Guard
Read the project's CLAUDE.md (if it exists). For each insight from Step 1, check whether CLAUDE.md already covers it. If so, drop it and note "already in CLAUDE.md" in the Step 4 output. Memory captures lessons CLAUDE.md does not.
Step 3: Write to Memory
Read the existing MEMORY.md in the project's memory directory. Find the right section for each insight. Add to an existing section when one fits. Create a new section only when no existing section applies.
Format for entries:
## [Topic Name]
- **[Bold insight]**: explanation with specific file/function references
If MEMORY.md doesn't exist, create it with a # [Project] Project Memory
header first.
Keep entries concise -- this file loads into every session's context.
Routing check
If an insight references a different project by name (e.g., mentions "duet" while working in "lore"), note it in the Step 4 output: "Consider: this insight may belong in [other project]'s memory, not [current project]'s."
Size check
After writing, count lines in MEMORY.md. If over 50 lines, warn: "MEMORY.md is [N] lines. Consider running /memory-audit to identify content that can be pruned or moved."
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.
- yesterday First seen · 82 lines · 10 tokens per session scan C 4f862956fbef
capture-memory is a command published in the GitHub repository tslateman/duet (1 stars, last pushed 5d ago), licensed MIT. It adds 10 tokens to every session and 572 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
explain
Provide clear explanations of code, concepts, and system behavior with educational clarity.
learn
Learn Claude Code best practices and capture lessons into persistent memory.
learn-rule
Capture a lesson from this session into permanent memory.
quiz-gate
The ★-tap NUDGE before merging a significant+worthy gate PR: a 5-question quiz built from the ACTUAL diff+tests, routed through deep-understand's mastery gate. Three logged responses (engage/defer/wave); advisory, never must-pass. Gates the human's attention, not the merge.
tutorial
Command "tutorial" from usurahi-project/usurahi, covering /tutorial, すること, 案内する要点 and 出力方針.
OPSX: Onboard
Guided onboarding - walk through a complete OpenSpec workflow cycle with narration.