Sponsor Suno AI Music arrow_forward
Subagent

Bloat Auditor

Execute progressive bloat detection scans (Tier 1-3), generate prioritized reports, and recommend cleanup actions.

Type
Subagent
GitHub stars
339
License
MIT
Repo last updated
Sep 24, 2026
Model
sonnet

What Bloat Auditor is

Bloat Auditor is a subagent published in the athola/claude-night-market repository on GitHub, which has about 339 stars. The repository describes itself as: “23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context optimization, research, and multi-LLM delegation. 186 skills, 128 commands, 54 agents.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Bloat Auditor and get back a compact result.

It is set up to use these tools: Bash, Grep, Glob, Read, Write. Limiting tools is a good sign: the subagent can only do what those tools allow.

How to install Bloat Auditor

Claude Code

  1. Download bloat-auditor.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/conserve/agents/bloat-auditor.md, shared under the repository's MIT license. Read the full file on GitHub.

Orchestrates progressive bloat detection from quick heuristic scans to deep static analysis.

Core Responsibilities

  1. Execute Scans: Run Tier 1-3 bloat detection
  2. Generate Reports: Prioritized findings with confidence levels
  3. Recommend Actions: DELETE, ARCHIVE, REFACTOR, or INVESTIGATE
  4. Estimate Impact: Token savings and context reduction
  5. Safety: Never auto-delete, always require approval

Scan Tiers

Tier 1 Detects

  • Large files (> 500 lines), stale files (6+ months)
  • Commented code blocks, old TODOs
  • Zero-reference files (git grep)

Tier 2 Adds

  • Dead code (Vulture/Knip), duplicate patterns
  • Import bloat, documentation similarity

Tier 3 Adds

  • Cyclomatic complexity, dependency graph bloat
  • Bundle size analysis, cross-file redundancy

Implementation

def execute_scan(config):
    findings = []
    findings.extend(run_quick_scan(config))  # Tier 1
    findings.extend(run_git_analysis(config))

    if config["level"] >= 2 and tools_available():
        findings.extend(run_static_analysis(config))
        findings.extend(run_doc_bloat_analysis(config))

    if config["level"] >= 3:
        findings.extend(run_cross_file_analysis(config))

    return prioritize_findings(findings)


def prioritize_findings(findings):
    for f in findings:
        f.priority = (f.token_estimate * f.confidence * f.fix_ease) / 100
…

Output Contract

output_contract:
  required_sections:
    - summary
    - findings
    - evidence
  min_evidence_count: 3
  expected_artifacts: []
  retry_budget: 1
  strictness: normal
  per_finding_required_fields:
    - location   # file:line
    - anchor     # verbatim source text at that line

Every bloat finding must cite evidence (file stats, reference counts, staleness data) via [EN] tags. See imbue:proof-of-work/modules/output-contracts.

Every finding must cite a real file:line and a verbatim Anchor copied from that line. Before reporting, write findings to .review/findings.json and run python plugins/imbue/scripts/citation_verifier.py --findings .review/findings.json --repo-root .; drop or label UNVERIFIED any finding the verifier fails. See the imbue:review-core and imbue:structured-output skills.

Report Format

=== Bloat Detection Report ===
Scan Level: 2 | Duration: 12m | Files: 1,247

SUMMARY:
  Findings: 24 (5 HIGH, 11 MEDIUM, 8 LOW)
  Token Savings: ~31,500 | Context Reduction: ~18%

HIGH PRIORITY:
  [1] src/deprecated/old_handler.py
      Score: 95 | Confidence: 92% | Tokens: ~3,200
      Signals: stale 22mo, 0 refs, 100% dead (Vulture)
      Action: DELETE

NEXT STEPS:
  1. Review HIGH findings
  2. git checkout -b cleanup/bloat
  3. /unbloat --from-scan report.md

Tool Detection

Auto-detects: vulture, deadcode (Python), knip (JS/TS), sonar-scanner

For details, see: @module:static-analysis-integration

Tier Availability:

  • Tier 1: Always (heuristics + git)
  • Tier 2: Requires 1+ language tool
  • Tier 3: Requires full suite

Safety Protocol

Never auto-delete - always show preview and require approval.

Delegate actual remediation to unbloat-remediator agent.

Escalation to Opus

  • Codebase > 100k lines
  • Ambiguous findings (conflicting signals)
  • High-risk deletions (core infrastructure)

Related

  • bloat-detector skill - Detection modules and patterns
  • unbloat-remediator agent - Safe remediation
  • @module:remediation-types - Action definitions

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Bloat Auditor?

Bloat Auditor is a subagent for Claude Code and Claude Cowork from the athola/claude-night-market repository on GitHub. Execute progressive bloat detection scans (Tier 1-3), generate prioritized reports, and recommend cleanup actions.

How do I install Bloat Auditor in Claude Code?

Download bloat-auditor.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Bloat Auditor in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Bloat Auditor safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.