unbloat

unbloat is a command for Claude Code from athola/claude-night-market. It costs 27 tokens per session (1,703 once invoked), scanned A, original, MIT.

A cleanup command that removes approved dead code, duplicate files, and unused dependencies while creating a backup first.

In plain words
What is it for?
Use it after a bloat scan, or let it scan first, preview proposed changes, apply approved cleanup, and focus on a chosen area.
Why use it?
It makes codebase cleanup safer by requiring approval, starting with lower-risk changes, and providing a way to undo the work.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

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

Good fit Use it after a bloat scan, or let it scan first, preview proposed changes, apply approved cleanup, and focus on a chosen area.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/athola/claude-night-market/unbloat
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 unbloat

README.md
[![agentmods](https://agentmods.dev/badge/commands/athola/claude-night-market/unbloat/github.svg)](https://agentmods.dev/commands/athola/claude-night-market/unbloat)
Your own site
<a href="https://agentmods.dev/commands/athola/claude-night-market/unbloat"><img src="https://agentmods.dev/badge/commands/athola/claude-night-market/unbloat/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 unbloat

Your own site · 80×15
<a href="https://agentmods.dev/commands/athola/claude-night-market/unbloat"><img src="https://agentmods.dev/badge/commands/athola/claude-night-market/unbloat.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,703 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.00027 $0.01703
Opus 5 $0.00014 $0.00851
Sonnet 5 $0.00005 $0.00341
Haiku 4.5 $0.00003 $0.00170

Measured 7d ago against content hash b1a2e9f1c709, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

unbloat 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 7d 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/unbloat.md · 210 lines

How it starts

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

Unbloat Command

Execute safe bloat remediation workflows with user approval at each step.

When To Use

Use this command when you need to:

  • After bloat-scan identifies remediation targets
  • Preparing for release
  • Reducing codebase complexity

When NOT To Use

  • Quick fixes that don't need structured workflow
  • Already know the specific issue - fix it directly

Philosophy

  • Safety First: Every change requires explicit approval (no auto-changes without review)
  • Progressive: Start with high-confidence, low-risk changes first
  • Reversible: Creates backup branches with clear rollback instructions

Usage

# Integrated workflow: scan + remediate
/unbloat

# Use existing bloat-scan report
/unbloat --from-scan bloat-report.md

# Auto-approve low-risk changes (still shows preview)
/unbloat --auto-approve low

# Preview changes without executing
/unbloat --dry-run

# Focus on specific area
/unbloat --focus code

Options

Option Description Default
--from-scan <file> Use existing bloat-scan report Run new scan
--auto-approve <level> Auto-approve: low, medium, none none
--dry-run Preview all changes without executing false
--focus <area> Focus: code, docs, deps, or all all
--backup-branch <name> Custom backup branch name backup/unbloat-{date}
--no-backup Skip backup branch creation false

Workflow Overview

  1. Scan/Load: Run integrated Tier 1 scan or load from --from-scan report
  2. Prioritize: Group by type (DELETE, REFACTOR, CONSOLIDATE, ARCHIVE) and risk
  3. Backup: Create timestamped backup branch
  4. Remediate: Interactive approval for each finding with preview
  5. Verify: Run tests after each change, rollback on failure
  6. Summary: Report actions, token savings, rollback instructions

For remediation type definitions and risk assessment, see: @module:remediation-types

Interactive Prompts

Read the full file on GitHub · 210 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. 7d ago First seen · 210 lines · 27 tokens per session scan A b1a2e9f1c709

Subscribe to this mod's changes

unbloat is a command published in the GitHub repository athola/claude-night-market (337 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 1,703 once invoked, about $0.0001 per session on Opus 5. 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.