Bloat Auditor
Execute progressive bloat detection scans (Tier 1-3), generate prioritized reports, and recommend cleanup actions.
- Type
- Subagent
- Repository
- athola/claude-night-market
- GitHub stars
- 339
- License
- MIT
- Repo last updated
- Sep 24, 2026
- Source file
- plugins/conserve/agents/bloat-auditor.md
- 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
- 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.
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.
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
- Execute Scans: Run Tier 1-3 bloat detection
- Generate Reports: Prioritized findings with confidence levels
- Recommend Actions: DELETE, ARCHIVE, REFACTOR, or INVESTIGATE
- Estimate Impact: Token savings and context reduction
- 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 lineEvery 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.mdTool 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
- Workflow Improvement Implementer Agent Implements agreed workflow improvements across skills, agents, commands, Subagent · athola/claude-night-market
- Voice Learn Run learning pass on manually edited text to improve voice profile Slash Command · athola/claude-night-market
- Workflow Improvement Planner Agent Converges on the best workflow improvement approach, defines acceptance Subagent · athola/claude-night-market
- Workflow Improvement Validator Agent Validates that workflow improvements make a substantive difference by Subagent · athola/claude-night-market
- Code Refiner Orchestrate code quality refinement: analyze living code for duplication, algorithmic inefficiency, clean code violations, and architectural misfit. Generate concrete refactoring plans with before/after examples. Use PROACTIVELY for: code quality improvement, refactoring sprints, anti-slop remediation PRE-INVOCATION CHECK (parent must verify BEFORE calling): - "Fix this one function"? -> Parent… Subagent · athola/claude-night-market
- Blast Radius Reviewer Review code changes using blast radius analysis from the code knowledge graph. Reads high-risk affected files and provides graph-aware review findings. Subagent · athola/claude-night-market
- Code Review Mode Main thread configuration for evidence-based code review sessions. Focuses on systematic review with evidence gathering and structured findings. Use via: claude --agent code-review-mode Or set in .claude/settings.json: { "agent": "code-review-mode" } Subagent · athola/claude-night-market
- Architecture Reviewer Architecture review for system design, ADR compliance, and coupling analysis. Use for major refactors. Subagent · athola/claude-night-market