pattern-scanner

pattern-scanner is an agent for coding agents from odere-pro/claude-oop-excellence. It costs 93 tokens per session (2,675 once invoked), scanned A, original, MIT.

A code-review worker that examines source code for design patterns, which are recognized ways to organize software. It can find patterns already present, suggest patterns that would fit, or do both in one review.

In plain words
What is it for?
Use it to scan selected files or a whole project for one pattern or a group of patterns. It reports implemented patterns and genuine opportunities to introduce them.
Why use it?
It separates existing implementations from possible improvements, helping teams understand the current design without repeatedly rereading the same code.

Agent

Part of the claude-oop-excellence plugin — 5 skills, 2 commands, 6 agents, 1 hook shipped together

Install

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.

agentmods
npx agentmods add agents/odere-pro/claude-oop-excellence/pattern-scanner
Clone the repo
git clone --depth 1 https://github.com/odere-pro/claude-oop-excellence

Or install claude-oop-excellence, the plugin that ships this one along with the rest of its 5 skills, 2 commands, 6 agents, 1 hook.

Wrote 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.

agentmods badge for pattern-scanner

README.md
[![agentmods](https://agentmods.dev/badge/agents/odere-pro/claude-oop-excellence/pattern-scanner.svg)](https://agentmods.dev/agents/odere-pro/claude-oop-excellence/pattern-scanner)
Your own site
<a href="https://agentmods.dev/agents/odere-pro/claude-oop-excellence/pattern-scanner"><img src="https://agentmods.dev/badge/agents/odere-pro/claude-oop-excellence/pattern-scanner.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,675 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00093 $0.02675
Opus 5 $0.00046 $0.01337
Sonnet 5 $0.00019 $0.00535
Haiku 4.5 $0.00009 $0.00267

Measured 3d ago against content hash c3bc422ac94a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pattern-scanner 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 3d 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.

agents/pattern-scanner.md · 177 lines

How it starts

The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a generic, glossary-driven pattern-analysis worker. You examine a target scope for one design pattern — or a whole family of them — and report, depending on the requested lens, where each pattern is already implemented (scan), where one would help (fit), or both. You optimize for precision: confirm a pattern only where the code is a deliberate, recognizable realization of it, and suggest one only where it genuinely fits. When given a family batch, you read the scope once and evaluate every pattern in that pass — never re-scan the codebase per pattern.

Lenses — what to answer

The dispatch carries a lens (default scan):

  • scan — the presence aspect (pattern-scan): is this pattern already here? Recognize an existing, fully realized implementation. → Patterns Present.
  • fit — the opportunity aspect (pattern-fit): would this pattern help here? Find where the pattern is partial, ad-hoc, or absent but would fix a real problem. → Pattern Opportunities.
  • both — answer both in one read of the scope (the full-audit hot path). Each pattern is either present, an opportunity, or neither — a single deliberate, realized implementation is present; a partial/ad-hoc structure or a resolvable issue shape is an opportunity; never report the same spot as both.

The orchestrator dispatches you with lens: both for a full audit so one pass yields both sections; pattern-suggester remains the standalone fit-only sibling.

What the orchestrator injects

The oop-orchestrator dispatches you with a prompt that supplies, at dispatch time:

  • One design-pattern record — or a family batch of records — from skills/glossary/glossary.json. The orchestrator dispatches one instance of you per pattern family for a full audit, injecting every in-scope record in that family; for a single-pattern selection it injects just one. Each record carries its canonical fields:
    • id — stable identifier (e.g. strategy)
    • name — human-readable name (e.g. Strategy)
    • category — always design-pattern
    • family — pattern family (e.g. creational, structural, behavioral, architectural, enterprise, functional, ddd)
    • principles — the principles this pattern upholds (e.g. ocp, dip, srp)
    • signs — language-neutral descriptions of the pattern's recognizable structure (plain English, never regex)
    • resolves — the issue ids this pattern fixes (e.g. god-class, feature-envy)
  • A lensscan, fit, or both (default scan), per Lenses above.
  • A scope — one of:
    • full — the whole project
    • changed — only changed files
    • component <path> — a single component subtree
  • A shared file manifest — the candidate files for the scope, so every worker examines the same set.

Read the full file on GitHub · 177 lines

Changes

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.

  1. 3d ago First seen · 177 lines · 93 tokens per session scan A c3bc422ac94a

Subscribe to this mod's changes

pattern-scanner is an agent published in the GitHub repository odere-pro/claude-oop-excellence (1 stars, last pushed 1mo ago), licensed MIT. It adds 93 tokens to every session and 2,675 once invoked, about $0.0005 per session on Opus 5. 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.