implement-patterns

A command for applying selected software design patterns—reusable ways to structure code—to a chosen part of a repository.

In plain words
What is it for?
Use it to apply one pattern, a pattern category, or all available patterns to the full repository, changed files, or a specific component; it also supports planning without edits.
Why use it?
It turns a recommended pattern into a controlled refactoring and runs the project's tests at each checkpoint to catch regressions.

Command

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 commands/odere-pro/claude-oop-excellence/implement-patterns
Clone the repo
git clone --depth 1 https://github.com/odere-pro/claude-oop-excellence
Per session 94 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,746 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.00094 $0.01746
Opus 5 $0.00047 $0.00873
Sonnet 5 $0.00019 $0.00349
Haiku 4.5 $0.00009 $0.00175

Measured yesterday against content hash 517a45c40d04, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

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.

commands/implement-patterns.md · 143 lines

How it starts

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

Run the implement verb against this repository. This is the gated IMPLEMENT action front door — the command the /audit report's Recommended Actions section hands off to for a high-confidence pattern opportunity (/implement-patterns <selection> <scope>). It writes to your source tree, so it is user-invoked only. It resolves your selection against the glossary (skills/glossary/glossary.json) and delegates to the pattern-implement skill, which drives the oop-orchestrator in pattern-implement mode (one pattern-implementer per in-scope design pattern). Each implementer applies its one injected pattern through the safe 4-step refactoring sequence, running the project's own detected tests at every checkpoint.

Selection grammar

[<pattern-id> | <category> | all] [full | changed | component <path>] [--plan-only]
  • Selection (default all) — a single design-pattern id (e.g. strategy, facade, repository), a pattern category (creational, structural, behavioral, architectural, concurrency, enterprise, functional, ddd), or all design patterns.
  • Scope (default full) — full, changed (vs the base branch), or component <path>.
  • --plan-only (or a leading plan token) — produce the implementation plan and make no edits. Use it to preview the change set before committing to it.

Only design-pattern entities are in scope for this verb — issue entities belong to /fix-risks.

Phase 1 — Parse and acquire context

  1. Parse $ARGUMENTS into a selection (default all), a scope (default full), and the optional --plan-only flag (set it when --plan-only or a leading plan token is present).

  2. If this run was handed off from an /audit report's Recommended Actions (the selection and scope came straight from a named Pattern Opportunities row), use that opportunity's fit confidence to prioritise which patterns have the strongest signal. If you arrived here directly, proceed — the implement verb evaluates fit within scope. For a fresh read of which patterns would help, run /audit pattern-fit <scope> first.

Read the full file on GitHub · 143 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. yesterday First seen · 143 lines · 94 tokens per session scan A 517a45c40d04

Subscribe to this mod's changes

implement-patterns is a command published in the GitHub repository odere-pro/claude-oop-excellence (1 stars, last pushed 1mo ago), licensed MIT. It adds 94 tokens to every session and 1,746 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.