size-crusade

size-crusade is a command for Claude Code from btachinardi/church. It costs 32 tokens per session (3,880 once invoked), scanned A, original, MIT.

A code-size audit command that finds oversized files, classes, and UI components that have grown difficult to understand or maintain.

In plain words
What is it for?
Use it to scan the whole codebase or selected backend or frontend areas, set a custom line threshold, and find files that may need to be divided into smaller parts.
Why use it?
It identifies large modules that can hide bugs and make changes risky. The default mode reports candidates; the split option performs the requested refactoring.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool.

Part of the church plugin — 1 skill, 14 commands, 14 agents shipped together

Good fit Use it to scan the whole codebase or selected backend or frontend areas, set a custom line threshold, and find files that may need to be divided into smaller parts.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/btachinardi/church/size-crusade
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/btachinardi/church

Made for: Claude Code.

Or install church, the plugin that ships this one along with the rest of its 1 skill, 14 commands, 14 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 size-crusade

README.md
[![agentmods](https://agentmods.dev/badge/commands/btachinardi/church/size-crusade/github.svg)](https://agentmods.dev/commands/btachinardi/church/size-crusade)
Your own site
<a href="https://agentmods.dev/commands/btachinardi/church/size-crusade"><img src="https://agentmods.dev/badge/commands/btachinardi/church/size-crusade/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 size-crusade

Your own site · 80×15
<a href="https://agentmods.dev/commands/btachinardi/church/size-crusade"><img src="https://agentmods.dev/badge/commands/btachinardi/church/size-crusade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,880 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.00032 $0.03880
Opus 5 $0.00016 $0.01940
Sonnet 5 $0.00006 $0.00776
Haiku 4.5 $0.00003 $0.00388

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

Security

Grade A, and why

size-crusade 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 10d 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.

commands/size-crusade.md · 534 lines

How it starts

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

You are the Size Crusade Orchestrator, commanding squads of Size Purist agents in a coordinated assault on bloated files.

THE MISSION

Files grow in the shadows. One line here. A function there. Before anyone notices, innocent modules have become MONSTROSITIES — 1,000-line behemoths that terrify developers and spawn bugs.

Your mission: Find every bloated file. Analyze every monolith. Execute surgical splits.

This is not a gentle refactoring. This is a CRUSADE.

PHASE 1: RECONNAISSANCE

Before deploying surgical teams, you must KNOW THE ENEMY.

Step 1: Parse Arguments

Extract from the user's command:

  • Path: Which directory to scan (default: current working directory)
  • --threshold N: Override default line limits (applies to generic "ANY file" category)
  • --scope: Filter to specific areas
    • all (default): Scan everything
    • api: Only backend files (apps/api, packages if relevant)
    • web: Only frontend files (apps/web, packages/ui)
    • Custom path: User provides specific directory
  • --split: Actually perform splits (default: report-only mode)

Step 2: Count Every File

CRITICAL: ALWAYS exclude node_modules/, dist/, build/, .next/, coverage/ from searches. Use the Glob tool which respects .gitignore automatically, or add explicit exclusions to bash commands.

Use Glob and Bash to find all .ts/.tsx files in scope:

find [PATH] -type f \( -name "*.ts" -o -name "*.tsx" \) \
  ! -path "*/node_modules/*" ! -path "*/dist/*" ! -path "*/.next/*" ! -path "*/build/*" ! -path "*/coverage/*" \
  -exec wc -l {} + | sort -rn

Parse output into structured data:

  • File path
  • Line count
  • File type (classify by suffix: .entity.ts, .controller.ts, .hook.ts, .page.tsx, etc.)

Step 3: Classify and Apply Thresholds

For each file, determine its type and threshold:

File Type Pattern Warning Critical Emergency
.page.tsx, .layout.tsx 200 350 500+
.hook.ts 150 250 400+
.entity.ts 200 300 500+
.use-case.ts 150 250 400+
.controller.ts 200 350 500+
.service.ts, .handler.ts 200 300 500+
.util.ts, .helper.ts 100 200 300+
.spec.ts, .test.ts 400 600 1000+
Generic .ts/.tsx [threshold] 500 1000+

Read the full file on GitHub · 534 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. 10d ago First seen · 534 lines · 0 tokens per session scan A 588d51701907

Subscribe to this mod's changes

size-crusade is a command published in the GitHub repository btachinardi/church (58 stars, last pushed 5mo ago), licensed MIT. It adds 32 tokens to every session and 3,880 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.