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/jpavley/meta-loop-ios/ml-retaingit clone --depth 1 https://github.com/jpavley/meta-loop-iosWrote 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/jpavley/meta-loop-ios/ml-retain)<a href="https://agentmods.dev/commands/jpavley/meta-loop-ios/ml-retain"><img src="https://agentmods.dev/badge/commands/jpavley/meta-loop-ios/ml-retain.svg" alt="Measured on agentmods" 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 | $0.00014 | $0.01553 |
| Opus 5 | $0.00007 | $0.00776 |
| Sonnet 5 | $0.00003 | $0.00311 |
| Haiku 4.5 | $0.00001 | $0.00155 |
Grade A, and why
ml-retain scanned grade A with 0 findings 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 3d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 270 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Meta-Loop: Learning Retention
Capture session learnings in documentation before clearing context.
Modes: Plan Mode → Agent Mode
Prerequisites
This skill implements Step 4 of the Meta-Loop process defined in skills/meta-loop-methodology/SKILL.md.
Use this after a successful implementation pass (/ml-impl review passed).
Phase 1: Plan (Plan Mode)
Enter plan mode and create a plan for documentation updates.
1.1 Review Session Changes
Analyze what happened in this session:
-
Check git status and diff:
- What files were created?
- What files were modified?
- What's the scope of changes?
-
Read the feature's
notes.md(if this session followed the Meta-Loop):- Located in the spec directory (e.g.,
specs/views/{name}/notes.md) - Contains decisions from wireframe, spec, and implementation phases
- Review for learnings that should be promoted to CLAUDE.md or doc/
- Located in the spec directory (e.g.,
-
Identify learnings:
- What patterns emerged?
- What decisions were made?
- What documentation gaps were discovered?
- What issues required workarounds?
-
Check current documentation state:
- Read TODO.md for task tracking
- Read CLAUDE.md for current context
- Note any outdated information
1.2 Create Documentation Plan
Plan updates to these files:
TODO.md Updates:
- Tasks completed this session
- New tasks discovered
- Phase/milestone status changes
CLAUDE.md Updates (keep concise!):
- New patterns that should be quick-reference
- Updated file references if structure changed
- Removed outdated content
- ⚠️ Keep under 40k characters total
New doc/ Files (if detailed knowledge needed):
- Complex patterns that need explanation
- Architectural decisions with rationale
- Anti-patterns with examples
- Guides that would bloat CLAUDE.md
1.3 Present Plan to Developer
## Learning Retention Plan
### Session Summary
[1-2 sentence summary of what was accomplished]
### TODO.md Updates
**Move to Completed:**
- [ ] [Task that was completed]
**Add to Next Up:**
- [ ] [New task discovered]
**Milestone Update:**
- [Any phase/milestone status change]
### CLAUDE.md Updates
**Add:**
- [New section or entry]
**Update:**
- [Section to modify]
**Remove:**
- [Outdated content to delete]
### New Documentation Files
| File | Purpose |
|------|---------|
| `doc/[name].md` | [What it documents] |
### Git Commit
**Suggested message:**
> [Descriptive commit message]
Ready to proceed?
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.
- 3d ago First seen · 270 lines · 14 tokens per session scan A 1bba8b7fa8b5
ml-retain is a command published in the GitHub repository jpavley/meta-loop-ios (3 stars, last pushed 6mo ago), licensed MIT. It adds 14 tokens to every session and 1,553 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
status
Project health dashboard - shows environment status and suggests improvements.
run-tests
Run tests, debug failures, or audit test quality (launches test-runner agent).
den
Phase 60 — capture project learnings into the knowledge base.
audit
Smart audit selector - analyzes your project and suggests relevant audits.
optimize-build
Scan Xcode project for build performance optimizations.
profile
Run automated performance profiling via xctrace CLI (launches performance-profiler agent).