codebase-consistency
Checks a change against the BROADER codebase beyond the diff — missed propagation (a renamed or changed entity not updated everywhere), stale references, inconsistent patterns, logic duplicated instead of reusing existing helpers, and docs/types/configs that drift from the change. Replicates the senior reviewer who holds the whole repo in their head. Use this whenever you implement or review a change, especially one touching a shared entity used across files. Auto-activates during /hv:build-feature and /hv:review-pr.
What this skill does
# Codebase Consistency A senior reviewer carries the whole codebase in their head: reading a diff, they instantly know which *other* files should have changed too. A model only sees the diff. This skill rebuilds that mental map from the diff outward, so the change stays consistent with the repo. Where the design deliberately deviates from an existing pattern, that is fine, but the deviation must be explicit and documented, never a silent inconsistency that looks like an oversight. Apply this both while implementing (so you propagate your own change) and while reviewing (so you catch what the author missed). The value scales with PR size and how cross-cutting the change is. ## Workflow Track progress with this checklist: ``` - [ ] 1. Build codebase context (intent + changed entities + usage graph) - [ ] 2. Run build / lint / typecheck - [ ] 3. Trace change propagation - [ ] 4. Inspect files outside the diff - [ ] 5. Verify cross-layer consistency - [ ] 6. Compile findings ``` ### Step 1 — Build codebase context 1. Read the PR/task description to understand **intent** — what is this change for? 2. From the diff, extract the **changed entities**: renamed identifiers, modified types/interfaces, altered DB schemas, changed API contracts or function signatures, modified config keys. 3. For each entity, `Grep`/`Glob` its **usage graph** — every file that imports, calls, extends, or references it. 4. Subtract the diff's file list from that usage graph. Files in the graph but NOT in the diff are **suspects for missed updates**. This is the most important step — the usage graph is exactly what the senior reviewer holds in their head. ### Step 2 — Run build / lint / typecheck Detect and run the project's commands (Makefile, `package.json` scripts, `pyproject.toml`, `Cargo.toml`, `go.mod`, etc.). The compiler is a mechanical safety net: it catches every compile-time inconsistency that reading alone can miss. Categorize errors by file and cause. (In dynamic languages without a compiler, lean harder on Steps 3–4.) ### Step 3 — Trace change propagation For each changed entity, confirm the change reached *everything* downstream: - **Data model** → query code, serializers, API responses, form fields, validators, test fixtures, mock/seed data. - **API contract / signature** → all callers, frontend clients, integration tests, generated clients, docs. - **Schema / migration** → list migrations in execution order; ensure none running *after* a rename/drop still references the old name. Check migrations added on the base branch since this branch forked. - **Type / interface** → implementers, callers, casts, type assertions. - **Config key / flag / env var** → every reader, plus environment-specific configs and example/`.env.sample` files. ### Step 4 — Inspect files outside the diff For each suspect file from Step 1: `Read` it, check whether it still uses the old form of any changed entity, and if so report it as a missed change with `file:line` and what to update. Also catch **partial updates inside the diff** — e.g. a symbol renamed in code but the old name lingers in string literals, log messages, error text, comments, doc comments, or serialized keys. These compile fine and slip through tests, which is exactly why they need a human-like sweep. ### Step 5 — Verify cross-layer consistency Confirm the change is coherent across layers: - **DB ↔ model/ORM**: schema reflected in model definitions, relations, queries. - **Backend ↔ API contract**: changed types/routes reflected in specs and response shapes. - **API contract ↔ frontend**: changed responses reflected in frontend types, forms, display logic. - **Code ↔ tests**: changed behavior reflected in unit/integration/E2E tests and fixtures. - **Code ↔ docs/config**: changed behavior reflected in README, docstrings, config, feature flags. Also watch for **reinvented logic** — if the change adds a helper that duplicates an existing one (`Grep` for similar names/signatures), flag it to reuse the existing one. Duplicated logic drifts apart and is how two code paths silently disagree. ### Step 6 — Compile findings ``` INTENT: one-line summary of the change's goal CHANGED_ENTITIES: entities modified by the diff BUILD_ERRORS: categorized list, or "none" MISSED_FILES: file:line + what to update, or "none" PARTIAL_UPDATES: file:line + what was missed, or "none" CROSS_LAYER_ISSUES: list, or "none" DUPLICATED_LOGIC: existing helper that should be reused, or "none" MIGRATION_ORDERING: conflicts, or "none" ``` ## Report format For each finding: - **Severity**: Critical / High / Medium / Low - **Location**: `file:line` - **Issue**: what is inconsistent and why it matters - **Suggestion**: the specific update to make
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.