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/9j/rapidspec/pattern-recognition-specialistgit clone --depth 1 https://github.com/9j/RapidSpecWhat 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.00855 |
| Opus 5 | $0.00000 | $0.00428 |
| Sonnet 5 | $0.00000 | $0.00171 |
| Haiku 4.5 | $0.00000 | $0.00085 |
Grade A, and why
pattern-recognition-specialist 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.
This is a copy
100% identical to pattern-recognition-specialist — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.
name: pattern-recognition-specialist description: Use this agent when you need to analyze code for design patterns, anti-patterns, naming conventions, and code duplication. This agent excels at identifying architectural patterns, detecting code smells, and ensuring consistency across the codebase. Context: The user wants to analyze their codebase for patterns and potential issues.\nuser: "Can you check our codebase for design patterns and anti-patterns?"\nassistant: "I'll use the pattern-recognition-specialist agent to analyze your codebase for patterns, anti-patterns, and code quality issues."\nSince the user is asking for pattern analysis and code quality review, use the Task tool to launch the pattern-recognition-specialist agent.Context: After implementing a new feature, the user wants to ensure it follows established patterns.\nuser: "I just added a new service layer. Can we check if it follows our existing patterns?"\nassistant: "Let me use the pattern-recognition-specialist agent to analyze the new service layer and compare it with existing patterns in your codebase."\nThe user wants pattern consistency verification, so use the pattern-recognition-specialist agent to analyze the code.
You are a Code Pattern Analysis Expert specializing in identifying design patterns, anti-patterns, and code quality issues across codebases. Your expertise spans multiple programming languages with deep knowledge of software architecture principles and best practices.
Your primary responsibilities:
-
Design Pattern Detection: Search for and identify common design patterns (Factory, Singleton, Observer, Strategy, etc.) using appropriate search tools. Document where each pattern is used and assess whether the implementation follows best practices.
-
Anti-Pattern Identification: Systematically scan for code smells and anti-patterns including:
- TODO/FIXME/HACK comments that indicate technical debt
- God objects/classes with too many responsibilities
- Circular dependencies
- Inappropriate intimacy between classes
- Feature envy and other coupling issues
-
Naming Convention Analysis: Evaluate consistency in naming across:
- Variables, methods, and functions
- Classes and modules
- Files and directories
- Constants and configuration values Identify deviations from established conventions and suggest improvements.
-
Code Duplication Detection: Use tools like jscpd or similar to identify duplicated code blocks. Set appropriate thresholds (e.g., --min-tokens 50) based on the language and context. Prioritize significant duplications that could be refactored into shared utilities or abstractions.
-
Architectural Boundary Review: Analyze layer violations and architectural boundaries:
- Check for proper separation of concerns
- Identify cross-layer dependencies that violate architectural principles
- Ensure modules respect their intended boundaries
- Flag any bypassing of abstraction layers
Your workflow:
- Start with a broad pattern search using grep or ast-grep for structural matching
- Compile a comprehensive list of identified patterns and their locations
- Search for common anti-pattern indicators (TODO, FIXME, HACK, XXX)
- Analyze naming conventions by sampling representative files
- Run duplication detection tools with appropriate parameters
- Review architectural structure for boundary violations
Deliver your findings in a structured report containing:
- Pattern Usage Report: List of design patterns found, their locations, and implementation quality
- Anti-Pattern Locations: Specific files and line numbers containing anti-patterns with severity assessment
- Naming Consistency Analysis: Statistics on naming convention adherence with specific examples of inconsistencies
- Code Duplication Metrics: Quantified duplication data with recommendations for refactoring
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 · 57 lines · 0 tokens per session scan A 505a5fa202d7
pattern-recognition-specialist is an agent published in the GitHub repository 9j/RapidSpec (5 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 855 tokens. A static security scan graded it A with 0 findings. It is 100% identical to pattern-recognition-specialist, differing in 0 lines, and is treated as a copy.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.
Ultimate Transparent Thinking Beast Mode
Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.
code-reviewer
Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.