Skip to content

docs: migrate CLAUDE.md command reference to lazy-loaded sc-cli-reference skill - #69

Merged
tonibergholm merged 1 commit into
mainfrom
docs/claude-md-command-skill
Jul 15, 2026
Merged

tonibergholm merged 1 commit into
mainfrom
docs/claude-md-command-skill

Conversation

@tonibergholm

Copy link
Copy Markdown
Member

Why

A /doctor audit flagged the root CLAUDE.md at 49,338 chars — over the ~40k large-memory-file warning threshold, costing ~12k est. tokens of context in every session. Over half of that was the 344-line annotated command reference.

What

  • Migrate the ## Commands block to .claude/skills/sc-cli-reference/SKILL.md (content byte-preserved). Only the skill's one-line description stays resident; the full reference loads on demand when working with sc commands or demos.
  • Keep in the root: the two zero-residue proof commands (sc demo, demo/run_demo.sh — they guard the Phase 1 disk invariant), the CARGO_TARGET_DIR note, and a pointer to the skill. All invariants, standing boundaries, and the capability map are untouched.
  • Trim derivable content: the crate-layout tree diagram (reconstructable from ls crates/ + Cargo.toml; every dependency-direction rule kept verbatim) and three manifest-standard commands (cargo test, npm ci, npm run typecheck && npm test).

Result

CLAUDE.md: 49,338 → 19,193 chars (~7.5k est. tokens/session saved; warning cleared).

Note for reviewers: if sc command semantics change from here on, update the skill file rather than re-adding command tables to CLAUDE.md.

…ence skill

CLAUDE.md (49.3k chars) tripped the large-memory-file warning and loaded
~12k est. tokens into every session, over half of it the annotated command
reference. Move that reference to .claude/skills/sc-cli-reference/SKILL.md
so only its one-line description stays resident and the body loads on
demand; keep the zero-residue proof commands and a pointer in the root.
Also drop the crate-layout tree (derivable from ls + Cargo.toml; all
dependency rules kept) and three manifest-standard commands.

CLAUDE.md: 49,338 -> 19,193 chars (~7.5k est. tokens/session saved).
@tonibergholm
tonibergholm merged commit 0d27dfa into main Jul 15, 2026
5 checks passed
@tonibergholm
tonibergholm deleted the docs/claude-md-command-skill branch July 15, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant