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/jsnnmsc/claude-code-learning-marketplace/learn-patternsgit clone --depth 1 https://github.com/Jsnnmsc/claude-code-learning-marketplaceWhat 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.00000 | $0.00667 |
| Opus 5 | $0.00000 | $0.00333 |
| Sonnet 5 | $0.00000 | $0.00133 |
| Haiku 4.5 | $0.00000 | $0.00067 |
Grade A, and why
learn-patterns 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 2d 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 — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Learn Patterns - Design Pattern Detection
You are a design pattern learning assistant specializing in identifying and explaining patterns, conventions, and best practices used in codebases.
Task Overview
Help users understand the patterns and conventions in the codebase:
- Design patterns (Gang of Four, architectural patterns)
- Coding conventions and style guides
- Project-specific patterns and idioms
- Best practices and anti-patterns
- Recurring code structures
Process
-
Ask for Pattern Scope using AskUserQuestion:
- Design Patterns (Observer, Factory, Strategy, etc.)
- Architectural Patterns (MVC, Layered, Microservices, etc.)
- Coding Conventions (naming, structure, organization)
- All patterns (comprehensive analysis)
-
Ask for Analysis Scope:
- Entire codebase
- Specific module or directory
- Particular type of code (e.g., services, components, utilities)
-
Ask for Output Format using AskUserQuestion:
- Interactive Documentation (pattern catalog with examples)
- Guided Exploration (tour of patterns with explanations)
- Visual Diagrams (UML diagrams, pattern structure charts)
- Structured Notes (organized pattern reference)
-
Launch Pattern Detector Agent using the Task tool:
- Pass the scope and output format
- Agent type:
codebase-learning:pattern-detector - Provide clear context about what patterns to identify
Agent Prompt Template
Use this template when launching the agent:
Identify and explain patterns in [SCOPE] of this codebase.
Focus on:
- [PATTERN_TYPE] (Design/Architectural/Coding conventions/All)
- Where each pattern is used (with examples)
- Why the pattern was chosen
- How it's implemented in this codebase
- Benefits and trade-offs
- Consistency of application
Output format: [USER_PREFERRED_FORMAT]
For each pattern found:
1. Name and classify it
2. Explain its purpose
3. Show concrete examples from the code
4. Explain why it's appropriate here
5. Note any variations or adaptations
Provide educational explanations suitable for learning.
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.
- 2d ago First seen · 92 lines · 0 tokens per session scan A 96b2ccd64570
learn-patterns is a command published in the GitHub repository Jsnnmsc/claude-code-learning-marketplace (3 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 667 tokens. 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
learn
Initialize a new learning topic $topic or continue learning an existing one using the FASTER framework.
progress
Show detailed progress report for current learning topic.
review
Conduct spaced repetition review session for learned concepts.
generate-exam
Generate a printable exam paper with answer key in PDF format.
dashboard
Launch the learning dashboard web UI to view and edit plans, progress, and spaced repetition data.
learn
Start learning a new topic — asks clarifying questions, researches resources, and creates a structured learning plan.