Enforces code quality gates on PRs by detecting code smells, blocking merges when smell density exceeds thresholds, and tracking maintainability trends over time.
Ships in code-smell-detector. 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.
Quality gates on every PR. Trend tracking over time.
/code-smell-detector setup — configure CI quality gate
/code-smell-detector pr — analyze smells introduced in current PR
/code-smell-detector trend — show smell density trend (last 30 days)
/code-smell-detector hotspots — files with worst smell density
/code-smell-detector report — weekly maintainability report
Blocks merge if PR introduces:
3 new magic numbers
CODE SMELL PR CHECK — PR #247
================================
⚠️ 2 new smells introduced (non-blocking, warning)
❌ 1 critical smell introduced (BLOCKING)
[BLOCK] src/services/PaymentService.ts — GOD CLASS
File grew from 180 → 520 lines in this PR
Added 8 new methods across 4 different concerns
→ Break into: PaymentGatewayService, RefundService, InvoiceService
[WARN] src/utils/checkout.ts:45 — method too long (78 lines)
[WARN] src/utils/checkout.ts:12 — magic number 86400 (seconds/day?)
→ const SECONDS_PER_DAY = 86_400
SMELL TREND — last 30 days
============================
Smell density: 2.4 → 2.1 smells/100 lines ✅ (improving)
HOTSPOT FILES (by smell density)
src/services/UserService.ts 4.8/100 ↑ worsening
src/api/checkout.ts 3.2/100 → stable
src/components/AdminPanel.tsx 2.9/100 ↓ improving
Generated every Monday:
Pairs with /code-smell skill for deep interactive analysis.
What SKILL.md sets; muted values are Claude Code's defaults
/code-smell-detector:code-smell-detectorfrom code-smell-detector
npx claudepluginhub andersonlimahw/lemon-ai-hub --plugin code-smell-detectorOther plugins' skills for the same job