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.
git clone --depth 1 https://github.com/tslateman/duetWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/tslateman/duet/capture-memory)<a href="https://agentmods.dev/commands/tslateman/duet/capture-memory"><img src="https://agentmods.dev/badge/commands/tslateman/duet/capture-memory/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/tslateman/duet/capture-memory"><img src="https://agentmods.dev/badge/commands/tslateman/duet/capture-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00010 | $0.00572 |
| Opus 5.5 | $0.00004 | $0.00229 |
| Sonnet 5.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 1mo ago.
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.
- 1mo ago 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 1mo ago), licensed MIT. It adds 10 tokens to every session and 572 once invoked, about $0.0000 per session on Opus 5.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
context
A project-context command that manages a .context directory containing decision notes, session logs, and history. It helps keep a record of why changes were made across Git branches and commits.
lessons-compact
Compact MEMORY/LESSON.md by deduplicating near-identical lessons, merging same-root-cause lessons, and pruning stale ones — without losing any unique signal. Delegates the analysis to the lessons-compactor agent.
lessons
View project lessons in MEMORY/LESSON.md (project root) and append a compact "never reproduce" lesson.
quick
Quick execution mode for ad-hoc tasks without full workflow overhead.
resume
Show the restored Continuity project state (frozen constraints, decisions, rejected paths, next step).
audit-release
Diagnose release-readiness against the Starter Series quality bar — matched starter, version-vs-last-tag drift, CHANGELOG drift vs merged PRs, and publish-workflow kind. Read-only.