
Bloat Detector
Scan an AI-assisted codebase for vibe-coding slop—duplicate blocks, oversized commits, and agent-style repetition—before merge or refactor sprints.
Install
npx skills add https://github.com/athola/claude-night-market --skill bloat-detectorWhat is this skill?
- Detects tab-completion bloat via duplicate blocks (5+ lines) with detect_duplicates.py
- Flags massive single commits (>500 insertions) as vibe-coding signatures
- Documents AI-specific slop patterns with stated confidence levels (e.g. 85% on repetitive logic)
- Supports JSON output for CI integration on duplicate detection
- Cites industry signals: 8x duplication growth and refactoring share falling below 10%
Adoption & trust: 1 installs on skills.sh; 304 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Ship review is the primary shelf because the skill judges existing code and git history for quality debt right before you merge or release. Review subphase matches automated bloat detection paired with refactor guidance, not greenfield implementation.
Common Questions / FAQ
Is Bloat Detector safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Bloat Detector
# AI-Generated Bloat Detection Module Detect bloat patterns specific to AI-assisted coding: vibe coding artifacts, slop patterns, and agent psychosis indicators. ## Why This Module Exists AI coding has created qualitatively different bloat than traditional development: - **2024**: First year copy/pasted lines exceeded refactored lines (GitClear) - **Refactoring**: Dropped from 25% (2021) to <10% (2024), predicted 3% (2025) - **Duplication**: 8x increase in 5+ line code blocks ## AI Bloat Patterns ### 1. Tab-Completion Bloat (Repetitive Logic) **Definition**: Same pattern repeated 3+ times instead of abstracted into shared function. ```bash # Detect similar code blocks (built-in, no external deps) python3 plugins/conserve/scripts/detect_duplicates.py . --min-lines 5 # JSON output for CI integration python3 plugins/conserve/scripts/detect_duplicates.py . --format json --threshold 15 # Heuristic: functions with near-identical signatures grep -rn "^def " --include="*.py" . | cut -d: -f2 | sort | uniq -c | sort -rn | head -10 ``` **Confidence**: HIGH (85%) **Action**: REFACTOR - extract to shared utility **Rationale**: AI suggests new implementations rather than reusing existing code ### 2. Massive Single Commits (Vibe Coding Signature) **Definition**: Commits with >500 insertions, especially without proportional tests. ```bash # Find vibe coding commits git log --oneline --shortstat | grep -E "[0-9]{3,} insertion" | head -20 # Commits with high insertion:deletion ratio (adding without cleanup) git log --shortstat --pretty=format:"%h %s" | awk '/insertion|deletion/ { ins=$4; del=$6; if (ins > 200 && (del == "" || ins/del > 10)) print prev, ins, del } {prev=$0}' ``` **Confidence**: MEDIUM (70%) **Action**: INVESTIGATE - review for understanding gaps **Rationale**: Large additions without refactoring indicate Tab-driven development ### 3. Hallucinated Dependencies **Definition**: Imports referencing non-existent packages (AI hallucination). ```bash # Python: Check for uninstallable packages pip freeze > /tmp/installed.txt grep -rh "^import \|^from " --include="*.py" . | \ sed 's/^import //;s/^from //;s/ import.*//' | \ sort -u | while read pkg; do root=$(echo $pkg | cut -d. -f1) grep -q "^$root" /tmp/installed.txt || echo "HALLUCINATED?: $pkg" done # JavaScript: Check for phantom packages jq -r '.dependencies // {} | keys[]' package.json | while read pkg; do npm view $pkg version 2>/dev/null || echo "HALLUCINATED?: $pkg" done ``` **Confidence**: HIGH (95%) **Action**: DELETE or REPLACE **Rationale**: AI invents plausible-sounding packages (slopsquatting risk) ### 4. Happy Path Only (Test Coverage Gap) **Definition**: Code >200 lines with no corresponding tests, or tests without error assertions. ```bash # Files without test coverage find . -name "*.py" ! -path "*/test*" \ -not -path "*/.venv/*" -not -path "*/__pycache__/*" \ -not -path "*/node_modules/*" -not -path "*/.git/*" \ -exec sh -c ' lines=$(wc -l < "$1") if [ $lines -gt 200 ]; then base=$(basename "$1" .py) test_exists=$(find . -name "test_${base}.py" -o -name "${base}_test.py" \ -not -path "*/.venv/*" -not -path "*/__pycache__/*" \ -not -path "*/node_modules/*" -not -path "*/.git/*" | head -1) [ -z "$test_exists" ] && echo "UNTESTED ($lines lines): $1" fi ' _ {} \; # Tests without error/exception assertions grep -rL "assert.*Error\|assert.*Exception\|pytest.raises\|with self.assertRaises" \ --include="test_*.py" . ``` **Confidence**: HIGH (90%) **Action**: AUGMENT_TESTS before adding more code **Rationale**: AI generates happy path; errors require human insight ### 5. Premature Abstraction **Definition**: Base classes/interfaces with only 1-2 implementations. ```bash # Python: Abstract classes with single inheritor grep -rn "class.*ABC\|@abstractmethod" --include="*.py" . | cut -d: -