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/MadAppGang/magusWrote 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/madappgang/magus/learn)<a href="https://agentmods.dev/commands/madappgang/magus/learn"><img src="https://agentmods.dev/badge/commands/madappgang/magus/learn/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/madappgang/magus/learn"><img src="https://agentmods.dev/badge/commands/madappgang/magus/learn.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.00024 | $0.02854 |
| Opus 5.5 | $0.00010 | $0.01142 |
| Sonnet 5.5 | $0.00005 | $0.00571 |
| Haiku 4.5 | $0.00002 | $0.00285 |
Grade B, and why
learn scanned grade B 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 22d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat .claude/CLAUDE.md 2>/dev/null || cat CLAUDE.md 2>/dev/null || echo "No CLAUDE.md found" How it starts
The opening of the file, as written. The whole thing — 358 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<user_request> Analyze this session for learnable patterns and propose CLAUDE.md updates. $ARGUMENTS </user_request>
<workflow_apply condition="--apply argument">
Bulk-apply all staged HIGH-confidence learnings from the daemon
Read pending-learnings.json:
bash PENDING_FILE="${CWD}/.claude/.coaching/pending-learnings.json" if [ ! -f "$PENDING_FILE" ] || [ ! -s "$PENDING_FILE" ]; then echo "No pending learnings to apply." exit 0 fi cat "$PENDING_FILE"
For each pending learning:
1. Show the learning with evidence
2. Read current CLAUDE.md
3. Find or create ## Learned Preferences section
4. Find or create the appropriate subsection (Code Style, Project Structure, Tools & Commands, Conventions, Workflow)
5. Check the current line count in the ## Learned Preferences section against the 200-line budget before adding. Skip any learning that would exceed budget and warn the user.
6. Add the learning as a single line with metadata comment:
markdown <!-- learned: {YYYY-MM-DD} session: {session_id_first_8} source: {type} --> - {rule_text}
7. Use Edit tool to update the file
After applying all learnings:
1. Clear the pending-learnings.json file (write empty array [])
2. Read dedup-state.json from ${CWD}/.claude/.coaching/dedup-state.json, then update entries for all applied learnings: set staged_to_claude_md: true and record staged_session using the session id from each learning.
3. Confirm what was added:
```
✓ Applied {N} learnings to CLAUDE.md:
- {learning 1}
- {learning 2}
These will apply to all future sessions in this project.
```
</step>
</steps>
</phase>
</workflow_apply>
<workflow_prune condition="--prune argument">
Interactive review and cleanup of learned preferences in CLAUDE.md
Read CLAUDE.md and extract all lines in the ## Learned Preferences section.
Parse metadata comments to get dates, session IDs, and sources.
A metadata comment has the format:
<!-- learned: {YYYY-MM-DD} session: {session_id_first_8} source: {type} -->
Pair each comment with the rule line immediately following it.
Read dedup-state.json from ${CWD}/.claude/.coaching/dedup-state.json to check reinforcement:
- Flag entries where times_seen == 1 (never reinforced)
- Flag entries whose last_reinforced_session date is older than 90 days from today
- Flag entries not seen recently (if session count available in _session_count and entry has not been reinforced in the last 50 sessions)
Present entries grouped by status:
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.
- 22d ago Changed 17a1e119c832
- 1mo ago First seen · 358 lines · 24 tokens per session scan B 5991c8b7008e
learn is a command published in the GitHub repository MadAppGang/magus (13 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 2,854 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other commands, from other repositories
cancel-ralph
Cancel active Ralph Loop.
engage.actions
Execute Phase 7 - Actions on Objectives and Goal Achievement.
quickstart
Interactive onboarding guide — set up credentials, connect to orq.ai, and learn every command and skill.
r
Resume the last handoff and carry on with the outstanding work.
focus
You are an ADHD focus assistant. Help the user commit to ONE task and block mental distractions.
stuck
You are an ADHD-friendly unblocking assistant. Help users get unstuck when they don't know what to do.