claude-crusts: Instructions file for Claude Code

CLAUDE.md

claude-crusts CLAUDE.md is an instructions file for Claude Code from Abinesh-L/claude-crusts. It costs 15,122 tokens per session, scanned B, original, MIT.

A set of instructions for Claude Code in the claude-crusts project, a tool that explains how an AI coding session uses its context window. It covers the command-line commands, project structure and output format.

In plain words
What is it for?
Use it to analyze context usage, find wasted space, review growth over time, list sessions and generate suggested fixes.
Why use it?
It gives the coding agent the project rules and explains how to inspect a session when its context window is filling up.

Instructions file for Claude Code

Written for Claude Code: UserPromptSubmit hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is Abinesh-L/claude-crusts's own configuration. It tells Claude Code how to work on claude-crusts itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-crusts configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Abinesh-L/claude-crusts. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Abinesh-L/claude-crusts/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Abinesh-L/claude-crusts

Made for: Claude Code.

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 claude-crusts CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/abinesh-l/claude-crusts/claude-md/github.svg)](https://agentmods.dev/instructions/abinesh-l/claude-crusts/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/abinesh-l/claude-crusts/claude-md"><img src="https://agentmods.dev/badge/instructions/abinesh-l/claude-crusts/claude-md/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 claude-crusts CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/abinesh-l/claude-crusts/claude-md"><img src="https://agentmods.dev/badge/instructions/abinesh-l/claude-crusts/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15,122 This file is loaded in full into every session.
When invoked 15,122 The same file — it is already loaded in full.
Security scan B 1 finding. 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.15122 $0.15122
Opus 5.5 $0.06049 $0.06049
Sonnet 5.5 $0.03024 $0.03024
Haiku 4.5 $0.01512 $0.01512

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

Security

Grade B, and why

claude-crusts CLAUDE.md scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- **scanner.ts**: Session discovery, JSONL streaming, config readers (MCP, memory, skills, settings models, compaction settings). `discoverSessions` fills `SessionInfo.claudeCodeVersion` via `readClaudeCodeVersion(path)`
CLAUDE.md · 285 lines

How it starts

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

CLAUDE.md — claude-crusts: Context Window Analyzer for Claude Code

Identity

You are working on claude-crusts (the npm package name and CLI binary). The framework is called CRUSTS (always uppercase). It analyzes Claude Code's context window by classifying every token into 6 categories: Conversation, Retrieved, User, System, Tools, State. It tells users WHY their context is filling up and WHAT to do about it. Fully offline, zero API calls.

CLI Commands

Binary name: claude-crusts. Entrypoint: src/index.ts.

Slash command: /crusts inside Claude Code (via .claude/commands/crusts.md) — runs analyze and gives actionable advice.

claude-crusts analyze [session-id]              — 6-category breakdown + waste detection + recommendations
claude-crusts waste [session-id]                — Detailed waste report with per-file analysis + top 5 consumers
claude-crusts fix [session-id]                  — 3 pasteable prompt blocks (session, CLAUDE.md, /compact)
claude-crusts timeline [session-id]             — Message-by-message context growth with compaction markers
claude-crusts list                              — All discovered sessions (age, size, project)
claude-crusts compare <session-a> <session-b>   — Side-by-side comparison with per-category deltas + insights
claude-crusts lost [session-id]                 — What was lost during compaction (files, conversations, tools, instructions)
claude-crusts watch [session-id]                — Live-monitor a session with compact dashboard
claude-crusts report [session-id]               — Generate standalone report (HTML or Markdown)
claude-crusts calibrate                         — Cross-reference against /context output
claude-crusts trend                              — Cross-session trends (sparkline, averages, direction)
claude-crusts tui [session-id]                   — Interactive REPL shell with tab completion + clipboard copy
claude-crusts status [session-id] [--hook]       — One-line context health (fast path); --hook is the Stop hook body (payload on stdin, one {"systemMessage"} object out)
claude-crusts hooks enable|disable|status        — Manage the Stop status hook (enable moves the old Notification entry)
claude-crusts statusline                         — Render statusline glyph (reads Claude Code JSON on stdin)
claude-crusts statusline install|uninstall|status — Manage Claude Code statusline integration
claude-crusts optimize [session-id]              — Ranked actionable fixes with token-savings ROI (--apply to write changes)
claude-crusts models [session-id]                — Per-session model usage snapshot (one row per contiguous same-model segment)
claude-crusts doctor                             — Sanity-check the install (Claude Code, hooks, statusline, backups)
claude-crusts diff [session-id] --from <n> --to <n>  — Intra-session diff: per-category delta between two message cutpoints
claude-crusts trend --format csv [--output <path>]   — Export trend history as CSV for external analysis
claude-crusts hooks auto-inject enable|disable|status|log — Manage hook-triggered fix injection (UserPromptSubmit); `log` shows history at ~/.claude-crusts/auto-inject.log; `status` also counts the session summaries in ~/.claude-crusts/sessions
claude-crusts auto-inject                        — Internal hook target (reads stdin; emits additionalContext when hot)
claude-crusts bench compact [session-id]         — Tail the session JSONL for a /compact event; write before/after delta to JSON
claude-crusts bench reextract <result.json>      — Re-run the file-ref extractor against an existing bench result (no recompact)
claude-crusts bench compare <a.json> <b.json>    — Diff two bench-compact results (survivor file-ref set + token metrics)
claude-crusts completion <bash|zsh|pwsh>         — Emit a shell completion script (TAB completes subcommands + session IDs)

Read the full file on GitHub · 285 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. 2d ago Changed · +31 lines · +5,529 tokens per session cede9f27be81
  2. 10d ago Changed · +19 lines · +2,441 tokens per session 8ed3e9287281
  3. 1mo ago Changed · +7 lines · +1,713 tokens per session 03ecfd48a8dc
  4. 1mo ago First seen · 228 lines · 5,439 tokens per session scan B b4ab5aceaf5f

Subscribe to this mod's changes

claude-crusts CLAUDE.md is an instructions file published in the GitHub repository Abinesh-L/claude-crusts (82 stars, last pushed 3d ago), licensed MIT. It adds 15,122 tokens to every session, about $0.0605 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories