The goal is completeness: every proven Claude Code token optimization in one command. If a technique measurably reduces Claude Code token consumption, it belongs here.
We merge techniques that meet all of these:
- Measurable. You can show before/after token counts on a real or reproducible workload. Not vibes, not "feels faster."
- Automatable. It can be done by writing files, setting env vars, adding hooks, or installing subagents — not "just prompt Claude better."
- Reversible.
setup.sh --uninstallmust be able to remove it cleanly. - Idempotent. Running
setup.shtwice must not duplicate, conflict, or break. - Zero-dependency for the base install. Optional binary enhancements are fine (hooks, compression). The
curl | bashpath must stay dependency-free. - Safe by default. No secret leakage, no destructive rewrites, no surprise network calls.
- Open a Technique submission issue.
- Include the measurement. Link the script or the raw numbers.
- Describe the integration: what file gets written, which settings change, what hook fires.
- Credit prior art — if this is from RTK, Caveman, claude-mem, or a blog post, say so.
If the technique clearly fits, we'll tag it accepted and you (or we) can send a PR.
- Fork, branch off
main. - Implement the technique in both places:
setup.shfor the zero-dependency pathapps/cli/src/main.rs(run_init) for the binary path
- Add a test:
- Bash integration: extend
.github/workflows/ci.ymlsetup-shjob - Rust: a
#[test]in the relevant crate
- Bash integration: extend
- Update
README.md's technique table with the measured savings. - Run locally:
cargo test bash setup.sh --measure # on a test fixture bash setup.sh # on a test fixture, should be idempotent bash setup.sh --uninstall # must cleanly remove
- Open the PR. Link the issue.
- Bash:
set -euo pipefailat the top. Quote all variables. Noeval. - Rust:
cargo fmt+cargo clippy -- -D warnings. - No emojis in code or docs unless explicitly asked.
- Keep CLAUDE.md additions terse. Every token in that file costs users money on every turn.
- Techniques without measurement.
- Techniques that only work with a specific IDE extension or paid service.
- Techniques that require network calls during setup.
- Techniques that modify git history, push to remotes, or touch
~/.claude/without explicit consent. - "AI-generated" PRs that re-describe existing techniques without adding new ones.
Context OS is not a framework. It is a curated set of defaults. Every kilobyte we add to CLAUDE.md is a tax on every user's every turn. Every hook we ship is a surface for bugs. So:
- Smaller is better. Delete what's redundant.
- Precise is better. Cite the benchmark.
- Boring is better. No clever macros, no DSLs, no auto-upgrading.
If you make Context OS 1% smaller without losing coverage, that is the best PR you can send.