Claude-skill-registry bloat-detector
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/bloat-detector" ~/.claude/skills/majiayu000-claude-skill-registry-bloat-detector && rm -rf "$T"
manifest:
skills/data/bloat-detector/SKILL.mdsource content
Bloat Detector
Systematically detect and eliminate codebase bloat through progressive analysis tiers.
Bloat Categories
| Category | Examples |
|---|---|
| Code | Dead code, God classes, Lava flow, duplication |
| AI-Generated | Tab-completion bloat, vibe coding, hallucinated deps |
| Documentation | Redundancy, verbosity, stale content, slop |
| Dependencies | Unused imports, dependency bloat, phantom packages |
| Git History | Stale files, low-churn code, massive single commits |
Quick Start
Tier 1: Quick Scan (2-5 min, no tools)
/bloat-scan
Detects: Large files, stale code, old TODOs, commented blocks, basic duplication
Tier 2: Targeted Analysis (10-20 min, optional tools)
/bloat-scan --level 2 --focus code # or docs, deps
Adds: Static analysis (Vulture/Knip), git churn hotspots, doc similarity
Tier 3: Deep Audit (30-60 min, full tooling)
/bloat-scan --level 3 --report audit.md
Adds: Cross-file redundancy, dependency graphs, readability metrics
When to Use
| Do | Don't |
|---|---|
| Context usage > 30% | Active feature development |
| Quarterly maintenance | Time-sensitive bugs |
| Pre-release cleanup | Codebase < 1000 lines |
| Before major refactoring | Tools unavailable (Tier 2/3) |
Confidence Levels
| Level | Confidence | Action |
|---|---|---|
| HIGH | 90-100% | Safe to remove |
| MEDIUM | 70-89% | Review first |
| LOW | 50-69% | Investigate |
Prioritization
Priority = (Token_Savings × 0.4) + (Maintenance × 0.3) + (Confidence × 0.2) + (Ease × 0.1)
Module Architecture
Tier 1 (always available):
- Heuristics, no tools@module:quick-scan
- Staleness, churn, vibe coding signatures@module:git-history-analysis
Tier 2 (optional tools):
- Anti-patterns (God class, Lava flow)@module:code-bloat-patterns
- AI-specific patterns (Tab bloat, hallucinations)@module:ai-generated-bloat
- Redundancy, readability, slop detection@module:documentation-bloat
- Vulture, Knip@module:static-analysis-integration
Shared:
- DELETE, REFACTOR, CONSOLIDATE, ARCHIVE@module:remediation-types
Auto-Exclusions
Always excludes:
.venv, __pycache__, .git, node_modules, dist, build, vendor
Also respects:
.gitignore, .bloat-ignore
Safety
- Never auto-delete - all changes require approval
- Dry-run support -
for previews--dry-run - Backup branches - created before bulk changes
Related
agent - Executes scansbloat-auditor
agent - Safe remediationunbloat-remediator
skill - MECW principlescontext-optimization