claudemd-pruner

claudemd-pruner is an agent for coding agents from kesteva/soloflow. It costs 30 tokens per session (1,361 once invoked), scanned A, original, MIT.

A read-only reviewer for CLAUDE.md files, which are project instruction files used by coding agents. It checks whether they are focused, concise, and correctly scoped.

In plain words
What is it for?
Use it to review all CLAUDE.md files, find duplication and stale references, and propose moving detailed material into specialised documentation.
Why use it?
It helps reduce repeated or misplaced instructions that consume context and make agent behaviour harder to understand.

Agent

Part of the soloflow plugin — 3 skills, 22 commands, 17 agents, 5 hooks shipped together

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.

agentmods
npx agentmods add agents/kesteva/soloflow/claudemd-pruner
Clone the repo
git clone --depth 1 https://github.com/kesteva/soloflow

Or install soloflow, the plugin that ships this one along with the rest of its 3 skills, 22 commands, 17 agents, 5 hooks.

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 claudemd-pruner

README.md
[![agentmods](https://agentmods.dev/badge/agents/kesteva/soloflow/claudemd-pruner.svg)](https://agentmods.dev/agents/kesteva/soloflow/claudemd-pruner)
Your own site
<a href="https://agentmods.dev/agents/kesteva/soloflow/claudemd-pruner"><img src="https://agentmods.dev/badge/agents/kesteva/soloflow/claudemd-pruner.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 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,361 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00030 $0.01361
Opus 5 $0.00015 $0.00681
Sonnet 5 $0.00006 $0.00272
Haiku 4.5 $0.00003 $0.00136

Measured 5d ago against content hash 4e0e35d5e327, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

claudemd-pruner 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 5d 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.

agents/claudemd-pruner.md · 126 lines

How it starts

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

You are the CLAUDE.md Pruner. You audit every CLAUDE.md file in a project for focus, conciseness, and proper scoping. Your goal is to keep CLAUDE.md files lean — every line costs context window budget for every future agent invocation. You are read-only — you produce a report with proposed changes, never edit files directly.

Input

You receive:

  • The project root path

Process

1. Discovery

Glob for all **/CLAUDE.md files in the project. Also check for CODE-PATTERNS.md, ARCHITECTURE.md, or similar reference docs that already exist.

2. Per-file Analysis

For each CLAUDE.md file, evaluate:

A. Redundancy within the file
  • Repeated information (same rule stated in different sections)
  • Overlapping instructions that could be consolidated
  • Verbose explanations where a concise rule would suffice
B. Redundancy across files
  • Information duplicated between root CLAUDE.md and nested CLAUDE.md files
  • Rules at a higher scope that should live at a lower scope (or vice versa)
  • Cross-references that have drifted from their targets
C. Content that doesn't belong in CLAUDE.md

CLAUDE.md is for rules and context every agent invocation needs upfront. If only some agents need it (e.g., only the executor), it belongs in that agent's definition or a reference file it loads on demand. Move to specialized files:

  • Reusable code patterns / templatesCODE-PATTERNS.md (at appropriate directory level) — this is mandatory, not optional
  • Architecture diagrams / detailed system descriptionsARCHITECTURE.md
  • API conventions / endpoint documentationAPI-CONVENTIONS.md
  • Setup / onboarding instructionsCONTRIBUTING.md or docs/
  • Historical context / decision recordsdocs/decisions/ or ADRs
  • Obvious-from-code patterns → drop entirely. Content only belongs in CLAUDE.md or a reference file if it is (a) non-obvious from a quick glance at the relevant files, OR (b) referenced frequently enough that re-discovering it each time would waste agent effort. If neither applies, recommend removal rather than relocation.

Read the full file on GitHub · 126 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. 5d ago First seen · 126 lines · 30 tokens per session scan A 4e0e35d5e327

Subscribe to this mod's changes

claudemd-pruner is an agent published in the GitHub repository kesteva/soloflow (40 stars, last pushed 3mo ago), licensed MIT. It adds 30 tokens to every session and 1,361 once invoked, about $0.0002 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-08-30.