From claude-skills
Reviews internal consistency of code, documents, diffs, or any structured content. Catches contradictions, forgotten propagation, semantic drift, stale references, implausible claims, argument incoherence, convention breaks, and incomplete changes. Use when the user asks to review consistency, check for contradictions, verify a change is complete, audit docs vs. code alignment, or validate logical coherence of any material.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-skills:review-consistencyThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. [Purpose](#purpose)
This skill provides stateful, systematic consistency review with persistent tracking of coverage, claims, and findings. Each review persists its state to disk, enabling:
The core insight: inconsistency is relational — it exists between two or more statements, not within one. The methodology: extract claims from each file, then systematically compare claims across files.
READ-ONLY: This skill MUST ONLY review and report findings. NEVER fix, edit, modify, or apply changes to the reviewed material. Output is a report — the user decides what to fix.
MANDATORY: Read
references/taxonomy.mdto understand the 8 inconsistency classes and claim categories before starting any review.
| Task | Script | What it does |
|---|---|---|
| Enumerate files | inventory.py | Walks paths, computes SHA-256 hashes, outputs JSON file list |
| Initialize/resume review | state.py init | Creates or resumes a review session |
| Register file chunks | state.py add-chunks | Adds inventory output as trackable chunks |
| Mark chunk status | state.py update-chunk | Sets chunk to extracted or reviewed |
| Record extracted claims | state.py add-claims | Persists claims with chunk attribution |
| Record findings | state.py add-findings | Adds findings, deduped by fingerprint |
| Update finding status | state.py update-finding | Marks finding as open/fixed/wont-fix/false-positive |
| Show pending work | state.py pending | Lists chunks still needing extraction/review |
| Advance phase | state.py update-phase | Moves to next review phase |
| Purge stale claims | state.py purge-stale-claims | Removes claims from changed files |
| Check progress | state.py status | Returns coverage summary |
| Export full state | state.py export | Dumps complete review state as JSON |
# 1. Inventory target files:
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/inventory.py /path/to/repo --exclude tests fixtures --ext .py .ts .md
# 2. Initialize review session:
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/state.py init --review-id "my-review" --scope "Review consistency of src/ module"
# 3. Register chunks (pipe inventory output):
# Write /tmp/chunks.json from inventory output
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/state.py add-chunks --review-id "my-review" --file /tmp/chunks.json
# 4. Check what needs review:
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/state.py pending --review-id "my-review"
# 5. After extracting claims from a file, record them:
# Write /tmp/claims.json with claims array
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/state.py add-claims --review-id "my-review" --file /tmp/claims.json
# 6. Mark chunk as extracted:
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/state.py update-chunk --review-id "my-review" --chunk-id c1 --status extracted
# 7. Record findings from cross-checking:
# Write /tmp/findings.json with findings array
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/state.py add-findings --review-id "my-review" --file /tmp/findings.json
# 8. Check progress:
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/state.py status --review-id "my-review"
# 9. Export full state for report generation:
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/state.py export --review-id "my-review"
# Custom state directory:
uv run --no-config ${CLAUDE_SKILL_DIR}/scripts/state.py init --review-id "my-review" --scope "..." --state-dir /path/to/dir
Note: The Quick Start omits
update-phasecalls for brevity. In practice, advance the phase after each stage completes — see the detailed Phase 1–4 workflow below.
The LLM drives each phase. Scripts handle persistence; the LLM does all reasoning.
inventory.py on the target paths to get the file list with hashesstate.py init to create (or resume) the review sessionstate.py add-chunksstate.py update-phase --phase extractScope guidance: When the user provides a directory, inventory ALL relevant files. Use --ext to filter to relevant file types and --exclude to skip test fixtures, build outputs, and vendored code.
For each unextracted chunk (use state.py pending to get the list):
references/taxonomy.md:
state.py add-claimsstate.py update-chunk --chunk-id cN --status extractedstate.py update-phase --phase cross-checkClaim format (JSON array for add-claims --file):
[
{"chunk_id": "c1", "text": "function validate() returns boolean", "category": "contract", "location": "line 42"},
{"chunk_id": "c1", "text": "all errors logged via logger.error()", "category": "convention", "location": "lines 10-50"}
]
Extract in batches: Process 3–5 chunks per batch to avoid context saturation. After each batch, persist claims before proceeding.
This is where inconsistencies are found. After all claims are extracted:
state.py export → read all persisted claimsreferences/taxonomy.mdstate.py add-findingsstate.py update-chunk --chunk-id cN --status reviewedstate.py update-phase --phase reportCross-check in groups: Don't try to compare all claims at once. Group by:
Finding format (JSON array for add-findings --file):
[
{
"fingerprint": "contradiction-auth-return-type-v1",
"class": "internal-contradiction",
"severity": "critical",
"title": "Auth handler return type mismatch",
"where": "src/auth.py:42, src/routes.py:18",
"what": "auth.py returns dict, routes.py expects AuthResult object",
"why": "Runtime AttributeError when accessing .user_id on dict",
"suggestion": "Return AuthResult from auth.py or update routes.py to handle dict",
"chunk_ids": ["c1", "c3"],
"claim_ids": ["cl2", "cl15"]
}
]
Fingerprint: Use a stable, descriptive string that won't change across runs. Good: "contradiction-auth-return-type-v1". Bad: "issue-1" or a random hash. This enables deduplication across runs.
state.py export for the final statestate.py status to confirm coverage (all chunks should be reviewed)state.py update-phase --phase reportThe skill works with any textual material, not just code files on disk. The inventory phase adapts:
Default path — run inventory.py directly on the target paths.
git diff --name-only main...HEAD (or use the PR's changed files list)inventory.py on those changed files specificallyWhen the user pastes text or provides content inline (not on disk):
/tmp/review-chunk-1.md, /tmp/review-chunk-2.md, etc.inventory.py on the temp filesdownload.py if available)inventory.py on the downloaded filesCombine approaches: inventory code files directly, save pasted text to temp files, download URLs. Add all chunks to the same review session. Cross-check across material boundaries (e.g., do docs match the code? does the design doc match the implementation?).
Context determines which cross-checking strategy to use. The extract phase is the same regardless.
Focus extraction on changed files. Cross-check changed claims against all existing claims from unchanged files. Key for PR reviews: also read and extract from files that consume/depend on the changed interfaces, even if they weren't modified.
Extract all factual and prescriptive claims. Cross-check every pair — can both be true simultaneously? Works identically for legal docs, specifications, meeting notes, API docs, or any structured text.
Identify contracts (interfaces, types, schemas) first. Cross-check all consumers against each contract.
Extract claims from docs and code separately. Cross-check doc claims against code claims — where do they disagree?
Report each finding as:
### [SEVERITY] Inconsistency Class — Short title
**Where**: file(s) and location(s)
**What**: describe the two (or more) things that conflict
**Why it matters**: what could go wrong
**Suggestion**: how to resolve (if obvious)
Group findings by severity. Lead with a summary count:
## Consistency Review Summary
Reviewed N files, extracted M claims, found K issues.
- X critical findings
- Y major findings
- Z minor findings
- W nits
(or "No inconsistencies found" — but double-check before saying this)
| Severity | Meaning | Examples |
|---|---|---|
| Critical | Will cause runtime failure, data loss, or security vulnerability | Type mismatch, missing propagation that breaks callers, contradictory access control rules |
| Major | Will cause confusion, wrong behavior in edge cases, or maintenance burden | Semantic drift across modules, stale references that mislead, implausible claims in docs |
| Minor | Cosmetic or low-impact but still technically inconsistent | Convention breaks, slightly outdated comments, minor terminology drift |
| Nit | Stylistic inconsistency, not functionally wrong | Formatting differences, comment style variations |
When re-reviewing after fixes (critical for catching everything):
inventory.py again on the same pathsstate.py add-chunks — same review-id. Changed files (different hash) get their status reset to unreviewed automatically. Unchanged files keep their extracted/reviewed status.state.py purge-stale-claims — removes claims from changed filesstate.py pending shows only files that need re-extractionstate.py update-finding --finding-id fN --status fixedThis ensures:
The #1 cause of inconsistent reviews is context window saturation. These rules prevent it:
state.py status before generating the report. If unreviewed_chunks > 0, go back and finish.state.py pending to verify nothing was skipped.npx claudepluginhub dmitrykrivaltsevich/claude-skills --plugin claude-skillsReviews code changes from MRs/PRs, local commits, or uncommitted files for document compliance, content quality (architecture, tests, observability), and end-to-end consistency (User Story to observability).
Reviews generated/updated documentation (MD files, beads issues, specs, task lists) with multi-LLM parallel analysis for inconsistencies, codebase mismatches, gaps. Interactive synthesis and fixes.
Focused review of code, documents, or architecture — one deep pass with evidence-based findings and clear verdict. Auto-detects what you're reviewing: branch diff, PR, file path, plan, brainstorm, or spec. One reviewer that reads carefully beats nine that skim. Triggers: review, code review, review PR, review diff, review plan, review brainstorm, review spec, review document, evaluate, check.