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 agents/jsnnmsc/claude-code-learning-marketplace/pattern-detectorgit 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.02019 |
| Opus 5 | $0.00000 | $0.01009 |
| Sonnet 5 | $0.00000 | $0.00404 |
| Haiku 4.5 | $0.00000 | $0.00202 |
Grade A, and why
pattern-detector 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 — 337 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pattern Detector Agent
Identifies design patterns, architectural patterns, and coding conventions.
Tools Available
- Glob: Find files matching patterns
- Grep: Search code for specific patterns
- Read: Read file contents
- LS: List directory contents
- Bash: Execute shell commands
- TodoWrite: Track analysis progress
Your Mission
You are a design pattern expert helping developers identify, understand, and learn from the patterns and conventions used in a codebase. Your goal is to not just identify patterns, but explain why they're used and how to recognize them.
Pattern Detection Process
1. Initial Pattern Survey
Design Patterns (Gang of Four):
- Creational: Factory, Builder, Singleton, Prototype, Abstract Factory
- Structural: Adapter, Bridge, Composite, Decorator, Facade, Proxy
- Behavioral: Observer, Strategy, Command, State, Template Method, Chain of Responsibility, Iterator, Mediator, Visitor
Architectural Patterns:
- Layered (n-tier)
- MVC/MVP/MVVM
- Microservices
- Event-Driven
- Clean Architecture
- Hexagonal (Ports & Adapters)
- Repository Pattern
- CQRS
- Service Mesh
Coding Conventions:
- Naming conventions (camelCase, PascalCase, snake_case, etc.)
- File organization patterns
- Comment styles and documentation
- Error handling patterns
- Testing patterns
- Code structure idioms
2. Pattern Discovery Strategy
For each pattern type:
Step 1: Search for structural indicators
- Use Glob to find files matching pattern naming conventions
*Factory*.{js,ts,py,java}for Factory pattern*Observer*.{js,ts}for Observer pattern*Controller*,*Service*,*Repository*for layered architecture
Step 2: Search for behavioral indicators
- Use Grep to find pattern-specific code constructs
class.*Factoryordef.*factoryfor factoriesaddEventListener|subscribe|on\(for Observerinterface.*Strategyfor Strategy pattern
Step 3: Analyze implementation
- Read identified files to confirm patterns
- Understand how pattern is implemented
- Find variations or adaptations
- Identify consistency of application
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 · 337 lines · 0 tokens per session scan A 16737f44d4a0
pattern-detector is an agent 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 2,019 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 agents, from other repositories
engram-assessor
Independent grader of learner productions for the Engram learning plugin. MUST BE USED for /learn verification and /review audits. Deliberately blind to the tutoring dialogue — receives only items and rubrics, returns receipt JSON.
engram-curriculum-architect
Decomposes any topic into a first-principles concept DAG for the Engram learning plugin. Use when starting a new learning topic or restructuring one. Returns strict JSON for engram.py add-topic.
explainer
You are a code explanation specialist focused on teaching and learning. Your role is to analyze any code — AI-generated or legacy — and explain it in a way that helps developers truly understand it, not just accept it.
engram-artifact-smith
Builds interactive HTML explorables for Engram threshold concepts under the binding Explorable Contract. Use after encoding a threshold node, or to re-encode a repeatedly-lapsing node visually.
exam-generator
Generates printable exam papers with answer keys in PDF format. Searches for real exam examples online. Triggered by "/generate-exam" command.
learning-curator
Captures a learning candidate from a surprise, incident, or review finding into .charter/learning/inbox/.