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/madappgang/claude-code/learngit clone --depth 1 https://github.com/MadAppGang/claude-codeWrote 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/claude-code/learn)<a href="https://agentmods.dev/commands/madappgang/claude-code/learn"><img src="https://agentmods.dev/badge/commands/madappgang/claude-code/learn.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.00015 | $0.01677 |
| Opus 5 | $0.00008 | $0.00839 |
| Sonnet 5 | $0.00003 | $0.00335 |
| Haiku 4.5 | $0.00002 | $0.00168 |
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 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 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 — 253 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>
<quality_filter>
Only propose learnings that are:
1. Project-specific (not general best practices)
2. Repeated OR explicitly stated as rules
3. Actionable and specific
4. New information (not already in CLAUDE.md)
</quality_filter>
</critical_constraints>
<phase number="2" name="Check Existing">
<objective>Avoid duplicates and contradictions</objective>
<steps>
<step>
Read current CLAUDE.md:
```bash
# Check project CLAUDE.md
cat .claude/CLAUDE.md 2>/dev/null || cat CLAUDE.md 2>/dev/null || echo "No CLAUDE.md found"
```
</step>
<step>
Check if any detected patterns already exist in CLAUDE.md
</step>
<step>
Check for contradictions with existing rules
</step>
</steps>
</phase>
<phase number="3" name="Present Findings">
<objective>Show learnings with confidence levels</objective>
<format>
```
## Session Learnings
Analyzed this session for learnable patterns.
### HIGH Confidence
[Only if repeated OR explicitly stated as rule]
**1. [Short title]**
Signal: "[Exact quote or description]"
```diff
+ [Proposed CLAUDE.md line]
```
### MEDIUM Confidence
[Single clear corrections - ask for confirmation]
**2. [Short title]**
Signal: [Description of what happened]
```diff
+ [Proposed line]
```
⚠️ Only seen once - confirm before adding?
---
**Summary**: [N] HIGH confidence, [M] MEDIUM confidence learnings detected.
Apply HIGH confidence learnings to CLAUDE.md? [y/n/selective]
```
</format>
</phase>
<phase number="4" name="Apply (if approved)">
<objective>Update CLAUDE.md with approved learnings</objective>
<steps>
<step>
If user approves, read current CLAUDE.md
</step>
<step>
Find or create `## Learned Preferences` section
</step>
<step>
Add approved learnings under appropriate subsections:
- Code Style
- Project Structure
- Tools & Commands
- Conventions
</step>
<step>
Use Edit tool to update the file (preserve existing content)
</step>
<step>
Confirm what was added:
```
✓ Added [N] learnings to CLAUDE.md:
- [learning 1]
- [learning 2]
These will apply to future sessions in this project.
```
</step>
</steps>
</phase>
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 · 253 lines · 15 tokens per session scan B 2fd9e1abb899
learn is a command published in the GitHub repository MadAppGang/claude-code (279 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 1,677 once invoked, about $0.0001 per session on Opus 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-03.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.