01 / how it works

Static analysis for the file you already wrote.

ccmd does not run your agent. It reads your config file, scores it against a transparent rubric, and tells you which lines are silently bloating your context. The instant token math runs in your browser the moment you paste; the line-by-line rewrite runs on our Opus 4.7 endpoint, which is logged with an IP hash so we can keep the rubric honest. No signup to run it.

  1. 01

    Detect the file type

    We sniff for CLAUDE.md, AGENTS.md, .cursorrules, or .grokrules from the header tokens, language markers, and structural shape. The same rubric runs against all four. You do not pick a mode.

  2. 02

    Token math, in your browser

    The moment you paste, ccmd counts tokens with the cl100k_base encoder (a close approximation of Claude tokenization, within ~5% on prose and code), per line, and projects the dollar cost of re-sending the file across a 30-turn session at Opus 4.7 input rates ($15 per million tokens). This pass is pure client-side JavaScript: no network call, no upload.

  3. 03

    Karpathy 4-rule scorecard

    Four rules distilled from Andrej Karpathy by Forrest Chang: Think-Before-Coding, Simplicity-First, Surgical-Changes, Goal-Driven-Execution. A fast heuristic flags which ones your file already satisfies; the Opus pass refines that read. Community measurement: a 41% → 11% mistake-rate drop when the file covers all four.

    The four rules in full →
  4. 04

    Structural lints, per line

    A per-line scan for token bloat (lines over 28 words), vague terms (appropriate, properly, carefully), aspirational rules (always / never with no escape clause), missing-why prohibitions, exact duplicates, contradictions, and cache-busting timestamps near the top of the file. Each hit becomes an anchored callout on the line it fired.

  5. 05

    Opus rewrite, streamed as a marked-up diff

    Your file is sent to our Opus 4.7 endpoint and a rewrite streams back inline over your original: cuts struck through, rewrites in accent, each finding a callout tagged with severity and the rule it breaks. We log the upload and the rewrite with an IP hash so we can keep the rubric honest; reply "remove" to any email and we delete the record. No signup to run it.

  6. 06

    Take the result with you

    The sticky footer emails you the cleaned file. The paid tier adds continuous drift monitoring via GitHub webhook, a weekly drift email with a real diff and a token-savings number, PR diff comments on every CLAUDE.md change, and per-engineer Agent SDK cost attribution for teams.

what you get back

A scorecard, then the rewrite.

Four numbers sit above the marked-up diff. They are model-grounded projections off the rewrite, anchored to Opus 4.7 pricing, not measurements of your billing. A representative run on a ~6k-token CLAUDE.md:

1,840
31% lighter
tokens saved
$0.83
retries avoided
$ saved · per 1k msgs
12
per 1k messages
wasted turns avoided
18%
vs. the original
hallucination risk · reduced
→ Score your file