/nlsmdn:review-consistency [--staged | --unpushed | --changed | --all]from nlsmdn
Review whether changes follow the patterns the codebase already uses — compare each added or changed construct with its existing siblings for naming, placement, mechanisms (error handling, logging, config, helpers), shape, and registration, and cite the precedent for every divergence. Triggers "review consistency", "consistency review", "does this follow existing patterns", "is this consistent with the codebase", "match the conventions", "pattern drift", "check conventions". Not for style a formatter or linter decides, or for judging whether the existing pattern is any good (use review-cleancode).
Ships in nlsmdn. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Language-agnostic review of one question: does the change do things the way this codebase already does them? Every finding names the precedent it diverges from. A divergence without a cited precedent is an opinion, not a finding.
Use only these finding priorities, in descending order:
Grade the demonstrated consequence, realistic reachability, and available recovery against project priorities. A category, missing convention, hypothetical future problem, or confidence that a claim is true does not set its priority. Do not assign automatic severity floors or ceilings. Keep unverified claims in validation gaps, outside the graded finding count; distinguish suggestions from defects. For plans, trace the consequence if implemented and state the assumptions.
Use the short labels Must Fix, Should Fix, and Nice to Have in summaries and ledgers.
Keep effort, verification status, user-facing change size, and tool/vendor diagnostic ratings
separate. When called by code-review, return its requested evidence and impact fields; the parent
owns scoring and final triage. Otherwise apply this rubric directly. Omit empty priority sections.
/review-consistency # Review context-related code
/review-consistency --staged # Review staged changes
/review-consistency --unpushed # Review files changed across all unpushed commits
/review-consistency --changed # Review unstaged changes
/review-consistency --all # Whole-repo audit for competing patterns
| Flag | Scope | Method |
|---|---|---|
| (none) | Context-related code | Files from the current conversation context. If no context, ask the user to specify files or use --staged/--changed/--all. |
--staged | Staged changes | git diff --cached |
--unpushed | Changes across unpushed commits | git diff $(git rev-list HEAD --not --remotes | tail -1)^..HEAD |
--changed | Unstaged changes | git diff |
--all | Full codebase | git ls-files, grouped by directory and construct kind |
--unpushed derives its range from git rev-list HEAD --not --remotes (oldest unpushed commit's parent → HEAD). If nothing is unpushed, or there is no remote/upstream (or the range walks back to the root commit) so it can't be determined reliably, stop and ask the user to pick another scope.
The diff scopes review the diff against the rest of the repo: the precedents are almost always outside the scoped files, so search the whole checkout for them.
AGENTS.md, CLAUDE.md, CONTRIBUTING.md or a doc says "new code uses X", code that uses X is correct even when most existing code does Y. Never flag a change for following a documented migration.git log -S '<construct>' --format='%h %ad %s' --date=short for which one recent commits add. The one being adopted is the convention; the other is legacy.--all).vendor/, third_party/, node_modules/, snapshots and test fixtures when collecting precedents.AGENTS.md / CLAUDE.md in the root and the touched directories, CONTRIBUTING.md, and any docs they point to for conventions. Note each stated rule; these override precedent.add_argument calls, other raise AppError, other logger. calls, other os.environ reads).file:line. If you find fewer than two agreeing precedents and no written rule, drop the unit.file:line to confirm before keeping the finding.For more than five files or with --all, split the units into groups of related kinds and give each group to one sub-agent; merge and deduplicate their findings.
Dispatch workers that return findings without editing files. Disable delegation tools where supported; read-only access alone does not prevent delegation. Any coordinating role needs explicit subtasks, a descendant limit, and a stopping condition in its brief.
get_x vs fetch_x, --dry-run vs --dryrun, FOO_ENABLED vs ENABLE_FOO).account vs user, remove vs delete).index barrel, tests/ mirror of src/).factories/ or fixtures/ folder, a shared helpers module), not inline in one test file.Result, exit codes, error message format).file:line.patch or inline builder where one already exists.These are never findings here. Do not report them, and do not mention them as "worth considering".
| Not a finding | Why |
|---|---|
| Whitespace, quotes, import order, line length, anything a configured formatter or linter decides | review-tidy runs the formatter and lint autofixes |
| Whether the existing pattern is a good one | review-cleancode / review-architecture. A change that faithfully copies a weak pattern is consistent |
| Layering and module boundaries across the system | review-architecture |
| Docs and references the change left stale by renaming or removing something | review-tidy |
| Version-specific library API usage | review-library-use |
| Test assertion quality and coverage gaps | test --review; this skill checks only that tests exist where siblings have them, in their style |
| Inconsistencies between existing files the change did not touch | Report only what the scoped diff introduces, except with --all |
| A deliberate improvement that replaces the old pattern everywhere in the change's reach | That is a migration, not drift. It becomes a finding only if it leaves two ways to do the same job — then grade the demonstrated cost, cite both, and recommend which to keep |
Some fixes are safe to apply without a separate decision: they cannot change production behaviour, any change in what a test executes is proven by running tests, and a wrong call shows in the diff and is cheap to revert. Spotting the pattern is still a judgment; that is fine, as it is for comment cleanup. Tag exactly these:
| Fix | Tag |
|---|---|
| Rename an unexported identifier to the pattern its same-kind identifiers use, updating every reference grep finds, string literals included | autofix |
Add a missing entry to a documentation list that holds only names (usage synopsis, argument-hint, flag list) | autofix |
| Move test code (builders, test data, helpers) unchanged to where its siblings keep it, and import it | autofix, verify: suite |
| Replace a test's ad-hoc mock or setup with the established fixture or helper | autofix, verify: mutation |
verify: suite means the full test suite must pass with the fix applied: a moved builder can collide with or shadow a name in the shared module. verify: mutation means the affected tests must pass, and must still fail once the behaviour they assert is deliberately broken: a substituted fixture can leave a test passing for the wrong reason, which a green run alone does not reveal.
Never tag public names, flags, env vars or config keys; registrations; production code moves or mechanism swaps; anything that needs new prose; a move into a conftest.py or any other change that widens fixture scope; or a move of code that resolves paths relative to its own file.
Under code-review, the main thread runs the checks and applies the items that pass. Standalone, this skill only reports; the tag marks a fix that can be applied without further discussion.
## Consistency Review: {scope}
### Critical Issues (Must Fix)
- {file}:{line} — {verified severe consequence and why recovery is inadequate}
**Precedent:** {file:line}, {file:line}
**Fix:** {repair}
### Improvements (Should Fix)
- {file}:{line} - {category}: {what the change does}
**Precedent:** {file:line}, {file:line} — {what they do}
**Fix:** {the change that brings it in line}
### Suggestions (Nice to Have)
- {file}:{line} - {category}: {what the change does}
**Precedent:** {file:line}, {file:line} — {what they do}
**Fix:** {the change that brings it in line}
Append the tag from Autofix to every finding that qualifies, e.g. [autofix, verify: suite].
With --all, add a section for clusters where the codebase itself disagrees:
### Competing Patterns
- {kind}: {pattern A} in {N} places ({file:line}, …) vs {pattern B} in {M} places ({file:line}, …). Newer: {A or B, from git log}.
If nothing survives the filter, say so plainly and stop. An empty result is normal for a change that was written by copying its siblings.
A new CLI subcommand that skipped the registry:
/review-consistency --staged
The diff adds cmd_export in cli/export.py. Every sibling in cli/ is listed in cli/__init__.py:COMMANDS and has a tests/cli/test_<name>.py; export has neither. Reports Should Fix (unreachable from the CLI) with both siblings cited. Also finds export reading os.environ["EXPORT_DIR"] where the other commands call config.get() (cli/sync.py:14, cli/import_.py:22) — Nice to Have unless the divergence creates a concrete behavioral or maintenance cost. And tests/cli/test_export.py builds its records with an inline make_record() where every other CLI test imports builders from tests/factories/ — Nice to Have, tagged [autofix, verify: suite].
Following a documented migration:
/review-consistency --changed
The change logs through structlog while 40 files still use logging.getLogger. AGENTS.md says "new code uses structlog", and git log -S structlog shows it being adopted over the last month. No finding.
Whole-repo audit:
/review-consistency --all
Groups the repo by construct kind and reports Competing Patterns: HTTP handlers return errors as {"error": msg} in 12 places and {"detail": msg} in 5, with detail the newer. No per-instance graded findings, since --all reports existing drift as clusters rather than blaming individual files.
Cause: The precedents are drawn from too wide a net — a different subsystem, an older layer, or test code standing in for production code.
Solution: Restrict precedents to siblings of the same kind in the same subsystem, and re-check each cited file:line agrees with the others.
Cause: Step 2 was skipped or the rule lives in a nested AGENTS.md/CLAUDE.md.
Solution: Read the instruction files in every touched directory, not only the root. A written rule always wins.
Cause: The unit is the first of its kind, or the search term was wrong. Solution: Try the construct's marker (decorator, base class, registry name) rather than the new unit's own name. If it really is the first of its kind, it cannot be inconsistent — drop it.
What SKILL.md sets; muted values are Claude Code's defaults
highOther plugins' skills for the same job
65 skills in this plugin
/blind-spotsSurface consequential decisions a plan, design, or research brief left silently assumed, by interviewing the user in dependency order. Use when the user says "blind spots", "grill me", "stress-test this plan", "poke holes in this", "what am I missing", "interrogate this design", "what haven't I decided", or needs a loose idea or research brief clarified before work begins. Do NOT use for a clear factual lookup, to explain a previous reply in more detail (use `huh`), to generate ideas when it is unclear what to build (use `ideation`), or to review an already-written plan with agents (use `review-plan`)./brainstormWork out how to solve a problem the user can already name — interview them with `blind-spots` to understand it, generate structurally different approaches, validate each with an independent critic, then present the survivors with trade-offs and a recommendation. Use when the user says "brainstorm", "brainstorm approaches", "how should we solve/approach/tackle X", "what are our options", "compare approaches", "think this through with me", or wants solutions weighed before committing. Works on any topic, with codebase recon when a repo is involved; `--debate` adds external advisors for high-stakes calls. Do NOT use when stuck on what to build or what the problem is (use `ideation`), to probe an already-chosen plan (use `blind-spots`), or to pick a library or service (use `evaluate-tech`).npx claudepluginhub nielsmadan/skills --plugin nlsmdn