pattern-review

pattern-review is a skill for Claude Code, Codex from datatorag/mcp-gateway. It costs 85 tokens per session (3,054 once invoked), scanned A, original, MIT.

A repository-aware review process for checking a code change against the project's established patterns. It looks for duplicated sources of truth, misplaced logic and differences from similar existing code.

In plain words
What is it for?
Reviewing diffs, finding pattern drift, spotting duplicated or diverging implementations and checking substantial changes before a push.
Why use it?
Generic code review may miss rules that are specific to this repository. This process checks whether a new change fits the codebase before it ships.

Skill for Claude CodeCodex

Part of the datatorag plugin — 16 skills, 4 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 skills/datatorag/mcp-gateway/pattern-review
Any agent
npx skills add datatorag/mcp-gateway --skill pattern-review
Clone the repo
git clone --depth 1 https://github.com/datatorag/mcp-gateway

Made for: Claude Code, Codex.

Or install datatorag, the plugin that ships this one along with the rest of its 16 skills, 4 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-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/datatorag/mcp-gateway/pattern-review.svg)](https://agentmods.dev/skills/datatorag/mcp-gateway/pattern-review)
Your own site
<a href="https://agentmods.dev/skills/datatorag/mcp-gateway/pattern-review"><img src="https://agentmods.dev/badge/skills/datatorag/mcp-gateway/pattern-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,054 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.00085 $0.03054
Opus 5 $0.00043 $0.01527
Sonnet 5 $0.00017 $0.00611
Haiku 4.5 $0.00009 $0.00305

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

Security

Grade A, and why

pattern-review 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 4d 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.

.claude/skills/pattern-review/SKILL.md · 253 lines

How it starts

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

Pattern Review

The bundled /simplify reviews a diff for reuse, simplification, efficiency and altitude. It is good and it knows nothing about this codebase. This skill is the half it cannot supply: what OUR layering is, where things belong here, and the specific ways code generated against this repo has drifted from it before.

It does not restate the architecture. codebase-map and gateway-dev own that, and a second copy here would drift from them — which is the exact defect this skill exists to find. Load them; this file only tells you what to DO with them.

Relationship to the design-time check

codebase-map has a "Quality pass — design-time, not post-hoc" section ruling that agent fan-out review does not run on every change by default, and giving four questions to answer inline before implementing instead. That rule stands and this skill does not compete with it:

  • Before writing code → answer those four questions inline. Cheaper, and it shapes the code instead of criticising it.
  • After a diff exists, on request or before a substantial push → this skill. One pass, scoped to the diff, no four-agent fan-out.

If you find yourself running this on every two-line edit, the design-time check is the one you skipped.

The failure mode this repo actually has

Not "the code is too complicated". Every quality pass in this repo's history converged on one mechanism: new code is started by copying the nearest sibling, and the copy and the original then diverge. From the log:

  • cf5cb4f — the playground had hand-copied the tool-visibility policy from mcp-server.ts, and the copy had silently dropped a branch the original had (DOCKER_HOST_OVERRIDE). Nothing failed; one environment was just wrong.
  • 7c168ff — the Agent route copy-pasted the accounts fetch from the dashboard, and the two diverged inside the same branch: one grew a refetch the other did not, so the same user saw a connected account on one screen and not the other.
  • 7911d23 — the home page carried a hardcoded connector list parallel to the docs frontmatter that had already drifted from it.
  • 4bcd6ee — the 401 challenge and the discovery router each spelled the same path, free to drift apart.
  • 28f723c — a hand-written interface asserted over a vendor's, so tsc could not see a signature mismatch. Delete silently deleted nothing and reported success.

Read the full file on GitHub · 253 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. 4d ago First seen · 253 lines · 85 tokens per session scan A 493d1ba891ba

Subscribe to this mod's changes

pattern-review is a skill published in the GitHub repository datatorag/mcp-gateway (3 stars, last pushed today), licensed MIT. It adds 85 tokens to every session and 3,054 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens