/software-verification:detect-ai-smellsfrom software-verification
Assesses whether a codebase has gates to detect AI-generated code smells across 11 categories, including plausible fabrication, cargo-cult patterns, and shallow error handling. Produces a report with gap analysis and recommendations.
Ships in software-verification. 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.
Read when SKILL.md points to them.
Assess whether a codebase has gates in place to catch AI-generated code smells — patterns indicating output was produced for plausibility rather than understanding. Produce an ai-smells-gates-report.md with coverage of the 11 AI smell categories, gap analysis, recommendations for missing gates, and human review heuristics for what automation can't catch.
Load references/ai-smells-taxonomy.md for the 11 AI smell categories and their detection approaches.
These are the categories of AI-generated quality problems the codebase should be protected against:
Search for mechanisms that would catch AI smells:
Static analysis rules:
.semgrep/, semgrep.yml, semgrep configs in CICI quality gates:
stryker, mutmut, cargo-mutants (catches AI005 — tests mirroring implementation)knip, ts-prune, vulture (catches AI002/AI003 — unnecessary abstractions)jscpd, cpd, dupfinder (catches AI006 — symmetry without substance)Dependency/import validation:
depcheck, deptryError handling checks:
Pinning and drift prevention:
npm ci, pip install --require-hashes)actionlint, pin-github-action)^/~/* beyond patch)Hard-coded value detection:
no-magic-numbers, ruff PLR2004)Commit/PR hygiene:
commitlint, gitlint, conventional commits config.github/PULL_REQUEST_TEMPLATE.mdReview gates:
Load references/detection-patterns.md, references/detection-patterns-gates.md, and
references/detection-patterns-gates-formal.md for what patterns each gate should catch.
For each of the 11 AI smells, determine which existing gates provide coverage:
| Smell | Covered by | Coverage level |
|---|---|---|
| AI001: Plausible Fabrication | [existing gates or "None"] | Full / Partial / None |
| AI002: Cargo-Cult Patterns | ... | ... |
| AI003: Architecture Astronaut | ... | ... |
| AI004: Shallow Error Handling | ... | ... |
| AI005: Tests Mirroring Implementation | ... | ... |
| AI006: Symmetry Without Substance | ... | ... |
| AI007: Local Reasoning Violations | ... | ... |
| AI008: Implicit Drift | ... | ... |
| AI009: Happy-Path-Only Coverage | ... | ... |
| AI010: Vacuous Tests | ... | ... |
| AI011: Vacuous Formal Specs | ... | ... |
Coverage levels:
For AI001 (Plausible Fabrication) specifically: note that interface mocks alone do NOT protect against fabrication — an agent writing both code and mocks creates a closed loop of plausibility. Behavioral twins or contract tests against real API behavior are required for full coverage. If only interface mocks exist for third-party integrations, classify as "Partial" at best.
For AI004 (Shallow Error Handling): assess both traditional empty-catch detection AND silent success masking. If only empty-catch rules exist but no detection of catch { return [] } / catch { return null } patterns, classify as "Partial". Full coverage requires startup validation enforcement and boundary validation checks.
For AI008 (Implicit Drift): check for both the pin itself AND an automated update mechanism. Lockfile enforcement without Dependabot/Renovate is "Partial" — it prevents drift but accumulates staleness. Full coverage requires pinning + deliberate update process.
For AI009 (Happy-Path-Only Coverage): line coverage alone does NOT count — a suite can hit every line via success-case tests while never exercising an error branch. Require branch coverage or mutation testing plus the presence of error-path tests (assertRaises/toThrow/pytest.raises). Line coverage only, with no error-path assertions, is "Partial" at best.
For AI010 (Vacuous Tests): assertion-presence linting (eslint-plugin-jest expect-expect, custom AST checks) catches the crudest case — test bodies with no assertion — and is "Partial". Full coverage requires mutation testing, the only gate that catches tests which assert but cannot fail (asserting only on stubbed return values). Distinguish from AI005 (asserts on implementation mechanics) and AI009 (asserts only on the happy path): AI010 is the absence of any falsifiable assertion. A suite with high line coverage but a low mutation kill rate is the signature.
For AI011 (Vacuous Formal Specs): presence of *.tla, invariants, or (verified=…) markers alone is "Partial" at best. Full coverage requires anti-vacuity probes — a known-bad mutation each invariant must reject — plus presence⇒mandatory meta-gates so artifacts on disk cannot skip unwired. Empty secret-scanner rulesets, coverage scoped away from the verified core, and hand-written specs with no spec↔code sync gate are vacuous-gate signatures. Distinguish from AI010 (tests with no assertion) and AI008 (unpinned versions): AI011 is a gate or spec that runs green while checking nothing. Load ../design-strategy/references/gate-design-patterns.md for vacuous-gate patterns.
Load references/ci-integration.md for pipeline positioning and fitness function patterns.
For each existing gate, evaluate:
Load references/git-history-signals.md for vibe-coding signal patterns.
Check for mechanisms that enforce commit/PR quality:
Closes #, Fixes #)Check for mechanisms that support taste-based quality judgment:
If no human review heuristics exist, the report should recommend establishing them — these smells (proportionality, coherence, clarity, appropriateness) cannot be fully automated but can be systematized through review culture.
Load references/ai-smells-gates-report-template.md and write ai-smells-gates-report.md following that structure. Populate all sections with findings from Steps 1–6.
references/ai-smells-gates-report-template.md (opens in a new tab)references/ai-smells-taxonomy.md (opens in a new tab)references/ci-integration.md (opens in a new tab)references/detection-patterns-gates-formal.md (opens in a new tab)references/detection-patterns-gates.md (opens in a new tab)references/detection-patterns.md (opens in a new tab)references/git-history-signals.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ai-code-quality, code-smells, quality-gates, static-analysis, ci-gates
3 skills in this plugin
/assess-verificationAssess the current verification maturity of a codebase and identify gaps.
Trigger phrases: "assess verification", "verification maturity",
"how is my testing", "verification strategy assessment",
"what is my verification coverage", "audit my tests"
Optional argument: [path-to-codebase] (defaults to current directory)
/design-strategyDesign a verification strategy for specific components to unlock more autonomy.
Trigger phrases: "design verification strategy", "what verification do I need",
"verification plan", "how to verify this component",
"unlock autonomy for this module", "what tests should I add"
Optional argument: [component-name-or-path] (defaults to full codebase)
npx claudepluginhub krokoko/cairn --plugin software-verificationOther plugins' skills for the same job