bloat-scan

bloat-scan is a command for Claude Code from athola/claude-night-market. It costs 0 tokens per session (2,521 once invoked), scanned A, original, MIT.

A codebase scanner that looks for dead code, repeated code, oversized classes, documentation waste, dependency issues, and growth over time.

In plain words
What is it for?
Use it for quick, targeted, or deep scans of code, documentation, dependencies, or codebase growth, with optional reports and dry runs.
Why use it?
It gives you a structured view of unnecessary complexity before you decide what to remove or change.

Command for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: mentions Claude Code.

Part of the conserve plugin — 15 skills, 6 commands, 5 agents shipped together

Good fit Use it for quick, targeted, or deep scans of code, documentation, dependencies, or codebase growth, with optional reports and dry runs.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/athola/claude-night-market/bloat-scan
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/athola/claude-night-market

Made for: Claude Code.

Or install conserve, the plugin that ships this one along with the rest of its 15 skills, 6 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bloat-scan

README.md
[![agentmods](https://agentmods.dev/badge/commands/athola/claude-night-market/bloat-scan/github.svg)](https://agentmods.dev/commands/athola/claude-night-market/bloat-scan)
Your own site
<a href="https://agentmods.dev/commands/athola/claude-night-market/bloat-scan"><img src="https://agentmods.dev/badge/commands/athola/claude-night-market/bloat-scan/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bloat-scan

Your own site · 80×15
<a href="https://agentmods.dev/commands/athola/claude-night-market/bloat-scan"><img src="https://agentmods.dev/badge/commands/athola/claude-night-market/bloat-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,521 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02521
Opus 5 $0.00000 $0.01260
Sonnet 5 $0.00000 $0.00504
Haiku 4.5 $0.00000 $0.00252

Measured 8d ago against content hash 072409a73ad1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

bloat-scan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/conserve/commands/bloat-scan.md · 362 lines

How it starts

The opening of the file, as written. The whole thing — 362 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bloat Scan Command

Execute progressive bloat detection across code, documentation, and dependencies.

Usage

# Quick scan (Tier 1, default)
/bloat-scan

# Targeted analysis (Tier 2)
/bloat-scan --level 2
/bloat-scan --level 2 --focus code
/bloat-scan --level 2 --focus docs

# Deep audit (Tier 3)
/bloat-scan --level 3 --report audit-report.md

# Dry run (no changes)
/bloat-scan --dry-run

Options

Option Description Default
`--level <1 2 3>`
--focus <type> Focus area: code, docs, deps, or all all
--report <file> Save report to file stdout
--dry-run Preview findings without taking action false
--exclude <pattern> Additional exclude patterns beyond defaults .bloat-ignore
--growth [path] Run growth velocity analysis on path cwd
--threshold <lines> Override default line limit for threshold alerts varies by file type
--compare Compare before/after optimization (use with --growth) false

Note: Cache directories (.venv/, node_modules/, .pytest_cache/, etc.) are automatically excluded from all scans.

Scan Tiers

Tier 1: Quick Scan (2-5 min)

Detects:

  • Large files (> 500 lines)
  • Stale files (unchanged 6+ months)
  • Commented code blocks
  • Old TODOs (> 3 months)
  • Zero-reference files

Requirements: None (heuristics and git)

Tier 2: Targeted Analysis (10-20 min)

Detects:

  • Dead code (static analysis)
  • Duplicate patterns
  • Import bloat
  • Documentation similarity
  • Code churn hotspots

Requirements: Optional static analysis tools (Vulture, Knip)

Tier 3: Deep Audit (30-60 min)

Detects:

  • All Tier 1 + Tier 2
  • Cyclomatic complexity
  • Dependency graphs
  • Bundle size analysis
  • Readability metrics

Requirements: Full tooling suite

Workflow

  1. Invoke Command

    /bloat-scan --level 2 --focus code
    
  2. Agent Executes Scan

    • Dispatches bloat-auditor agent
    • Loads bloat-detector skill modules
    • Runs detection algorithms

Read the full file on GitHub · 362 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 362 lines · 0 tokens per session scan A 072409a73ad1

Subscribe to this mod's changes

bloat-scan is a command published in the GitHub repository athola/claude-night-market (337 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,521 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.