← Browse

@majiayu000/bloat-detector

B

Detect codebase bloat through progressive analysis: dead code, duplication, complexity, documentation bloat. Triggers: bloat detection, dead code, code cleanup, duplication, technical debt, unused code Use when: context usage high, quarterly maintenance, pre-release cleanup, before refactoring DO NOT use when: active feature development, time-sensitive bugs, codebase < 1000 lines

skillclaude

Install

agr install @majiayu000/bloat-detector --target claude

Writes 2 files into .claude/skills/, pinned to git-02ca9ca5.

  • .claude/skills/bloat-detector/SKILL.md
  • .claude/skills/bloat-detector/metadata.json

Document


name: bloat-detector description: | Detect codebase bloat through progressive analysis: dead code, duplication, complexity, documentation bloat.

Triggers: bloat detection, dead code, code cleanup, duplication, technical debt, unused code

Use when: context usage high, quarterly maintenance, pre-release cleanup, before refactoring DO NOT use when: active feature development, time-sensitive bugs, codebase < 1000 lines category: conservation tags: [bloat, cleanup, static-analysis, technical-debt, optimization] tools: [Bash, Grep, Glob, Read] modules:

  • quick-scan
  • git-history-analysis
  • code-bloat-patterns
  • ai-generated-bloat
  • documentation-bloat
  • static-analysis-integration
  • remediation-types progressive_loading: true estimated_tokens: 400

Bloat Detector

Systematically detect and eliminate codebase bloat through progressive analysis tiers.

Bloat Categories

CategoryExamples
CodeDead code, God classes, Lava flow, duplication
AI-GeneratedTab-completion bloat, vibe coding, hallucinated deps
DocumentationRedundancy, verbosity, stale content, slop
DependenciesUnused imports, dependency bloat, phantom packages
Git HistoryStale 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

DoDon't
Context usage > 30%Active feature development
Quarterly maintenanceTime-sensitive bugs
Pre-release cleanupCodebase < 1000 lines
Before major refactoringTools unavailable (Tier 2/3)

Confidence Levels

LevelConfidenceAction
HIGH90-100%Safe to remove
MEDIUM70-89%Review first
LOW50-69%Investigate

Prioritization

Priority = (Token_Savings × 0.4) + (Maintenance × 0.3) + (Confidence × 0.2) + (Ease × 0.1)

Module Architecture

Tier 1 (always available):

  • @module:quick-scan - Heuristics, no tools
  • @module:git-history-analysis - Staleness, churn, vibe coding signatures

Tier 2 (optional tools):

  • @module:code-bloat-patterns - Anti-patterns (God class, Lava flow)
  • @module:ai-generated-bloat - AI-specific patterns (Tab bloat, hallucinations)
  • @module:documentation-bloat - Redundancy, readability, slop detection
  • @module:static-analysis-integration - Vulture, Knip

Shared:

  • @module:remediation-types - DELETE, REFACTOR, CONSOLIDATE, ARCHIVE

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 - --dry-run for previews
  • Backup branches - created before bulk changes

Related

  • bloat-auditor agent - Executes scans
  • unbloat-remediator agent - Safe remediation
  • context-optimization skill - MECW principles

Repository README

Describes majiayu000/claude-skill-registry-data as a whole, which may contain artifacts other than this one. Where this artifact had no useful description of its own, its summary was taken from here.

Claude Skill Registry (Data)

This repo contains the archived skill contents (the heavy, browsable skill files).

Canonical layout

  • Category folders at repo root (e.g. development/, documents/, data/, ...)
  • Each skill lives under a category: <category>/<skill>/SKILL.md + <category>/<skill>/metadata.json
  • Case conflicts are resolved with {name}-{owner}-{repo} suffixes (fallback: -{short-hash}).

Archive status

  • Live badges above are sourced from claude-skill-registry-core stats.json.
  • Counts in this README are intentionally dynamic, not hardcoded.
  • If the badges look stale, refresh the core build/index pipeline rather than editing numbers here.

Where the index + site live

Trustgrade B

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • warnLicenseno SPDX license detected

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-02ca9ca50b942026-07-31