mcpbeat Sign in

Bloat Detector Skill for Claude

Detects codebase bloat via dead code, duplication, complexity, and doc bloat scans. Use when codebase feels large or before a release.

12k tokens
context cost
the whole folder, loaded on every use
9
files
instructions only
0
copies elsewhere
how many repositories repackaged it
324
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/athola/claude-night-market --skill bloat-detector

The instruction itself

21 sections, as written by the author

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) |

When NOT To Use

  • Active feature development
  • Time-sensitive bugs
  • Codebase < 1000 lines

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):

  • See modules/quick-scan.md - Heuristics, no tools
  • See modules/git-history-analysis.md - Staleness, churn, vibe coding signatures
  • See modules/growth-analysis.md - Growth velocity, forecasts, threshold alerts

Tier 2 (optional tools):

  • See modules/code-bloat-patterns.md - Anti-patterns (God class, Lava flow)
  • See modules/ai-generated-bloat.md - AI-specific patterns (Tab bloat, hallucinations)
  • See modules/documentation-bloat.md - Redundancy, readability, slop detection
  • See modules/static-analysis-integration.md - Vulture, Knip

Shared:

  • See modules/remediation-types.md - DELETE, REFACTOR, CONSOLIDATE, ARCHIVE

Ecosystem-Level Detection

Patterns that span plugin boundaries or manifest configuration,

discovered through ecosystem-wide audits.

alwaysApply Accumulation

Flag plugins with 3+ skills where alwaysApply: true.

Each always-on skill injects its full text into every session,

creating a baseline token floor before the user types anything.

Sum the estimated_tokens fields to report total per-session cost.

Hook Registration Gaps

Compare hooks declared in plugin.json or openpackage.yml

against entries in hooks.json. A hook present in hooks.json

but absent from the manifest is invisible to the plugin loader

and cannot be audited, versioned, or disabled through normal

plugin management.

Scan skill files for identical multi-line text blocks repeated

across 10+ files (e.g., generic troubleshooting sections like

"Command not found / Permission errors / Unexpected behavior").

These are copy-paste artifacts that inflate token cost without

adding skill-specific value.

ToC Bloat in Skills

Skills loaded into model context gain nothing from HTML-style

Tables of Contents. Detect ## Table of Contents followed by

bulleted anchor-link lists. These waste tokens since

the model reads sequentially, not via hyperlinks.

Unregistered Module Subdirectories

Compare files on disk in skills/*/modules/ against the

modules: list in each skill's SKILL.md frontmatter. Files

that exist on disk but are not listed in the manifest are

invisible to progressive loading and may be dead weight or

missing from the load path.

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
  • bloat-auditor agent - Executes scans
  • unbloat-remediator agent - Safe remediation
  • context-optimization skill - MECW principles
  • /bloat-scan command - User-facing slash command that invokes this

skill; there is no separate bloat-scan skill

Exit Criteria

  • [ ] At least one tier of scan (Tier 1, 2, or 3) completed and

findings listed per bloat category (Code, AI-Generated,

Documentation, Dependencies, Git History)

  • [ ] Each finding assigned a confidence level (HIGH/MEDIUM/LOW) and

a priority score computed from the formula

`(Token_Savings × 0.4) + (Maintenance × 0.3) + (Confidence × 0.2)

+ (Ease × 0.1)`

  • [ ] No auto-deletions executed without explicit user approval;

every proposed removal documented as DELETE, REFACTOR,

CONSOLIDATE, or ARCHIVE per modules/remediation-types.md

  • [ ] Ecosystem-level patterns checked (alwaysApply accumulation,

hook registration gaps, boilerplate footers, ToC bloat) if the

scan target contains plugin directories

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take athola/bloat-detector from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.