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/memory-auditgit 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.00017 | $0.00595 |
| Opus 5 | $0.00009 | $0.00298 |
| Sonnet 5 | $0.00003 | $0.00119 |
| Haiku 4.5 | $0.00002 | $0.00060 |
Grade A, and why
memory-audit scanned grade A 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.
Reads agent configuration directorieslowAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
!`find ~/.claude/projects/*/memory -name MEMORY.md 2>/dev/null` Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Audit all project memory files for health issues.
Step 1: Discover Memory Files
Find all MEMORY.md files:
!find ~/.claude/projects/*/memory -name MEMORY.md 2>/dev/null
Step 2: Check Each File
For each MEMORY.md found, run these checks:
Orphan Detection
Extract the project path from the memory directory name (e.g., -Users-tslater-dev-council maps to /Users/tslater/dev/council). Check if the project directory exists. Report orphans -- memory files for projects that have been moved, renamed, or deleted.
Size Check
Count lines and estimate tokens (~1.5 tokens/word). Flag files over 50 lines or ~2,000 tokens. These load into every session for that project and consume context.
Ghost Names
Search each memory file for archived or renamed project names:
- "Lineage" (renamed to Lore)
- "Oracle" (absorbed into Lore)
- "Ralph" (archived)
- "Monarch" (renamed to Lore)
- "Flow" (absorbed into Neo) -- exclude "Data Flow"
Report line numbers.
Stale Markers
Search for items that sound completed:
- Lines containing "resolved", "fixed", "done", "completed" (case-insensitive)
- Date references older than 30 days (pattern:
2026-01or earlier) - Lines starting with
~~(strikethrough, indicating resolved items)
CLAUDE.md Overlap
If the project has a CLAUDE.md, compare section headers. Flag memory sections whose headers also appear in CLAUDE.md (e.g., both files have "## Architecture"). This suggests content that belongs in CLAUDE.md, not MEMORY.md.
Step 3: Report
Output a summary table:
| Project | Lines | Issues |
|---------|-------|--------|
| council | 56 | clean |
| lore | 48 | 2 stale markers |
Then list specific issues grouped by type:
ORPHANS (memory for deleted/moved projects):
(none)
SIZE (over 50 lines):
lore: 140 lines (~4k tokens)
GHOST NAMES:
geordi: "Lineage" on lines 7, 8
STALE MARKERS:
lore: "Fixed" on line 49, "Resolved" on line 108
CLAUDE.MD OVERLAP:
geordi: "Architecture" header in both files
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 · 80 lines · 17 tokens per session scan A 0e49c6e621fe
memory-audit is a command published in the GitHub repository tslateman/duet (1 stars, last pushed 5d ago), licensed MIT. It adds 17 tokens to every session and 595 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
prd-task-doc
Generate development task documentation from PRD files with optional AI model collaboration for optimization and review.
impl-task
Implementation task executor using unified artisan-impl approach - processes each top-level task with high-quality code generation and automatic progress tracking.
git-commit
Git workflow specialist for commit management, branch operations, and repository analysis. Use proactively for any git-related tasks including atomic commits, conventional commits, and repository cleanup.
pr-address
Address PR review comments on current branch.
plan-save
Save the current session's plan to GitHub as an issue.
enforce_standards
CRITICAL: Before running the code standards enforcer, we must prepare the stack properly and abort if there are merge conflicts.