⚡ Claude Code Optimizer v1.0.0
The ultimate modular framework for token economy, multi-agent workflows, and safety inside Claude Code.
Maximize output quality. Minimize token drain. Built for solo developers and growing teams.
💡 The Problem
Claude Code is an incredibly powerful CLI agent, but by default, it can be expensive and noisy. It aggressively reads terminal output (including ANSI color codes and progress bars), re-reads its entire context on every turn, and can quickly bloat its memory with stale tasks. Without guardrails, you will burn through your API limits rapidly.
🚀 The Solution
Claude Code Optimizer v1.0.0 is a production-grade, highly modular bash framework that configures your machine and projects for maximum token efficiency and robust team collaboration.
Running this script injects a battle-tested stack of hooks, skills, specialized agents, slash commands, and third-party tools into your global and local .claude/ environments. Users save 60-90% on token costs without sacrificing reasoning capability.
✨ Core Features
- 🧠 Token Economy Engine: Features Chain-of-Draft (
/user:chain-of-draft) and Caveman ([caveman]) modes to enforce ultra-lean AI reasoning outputs, saving thousands of tokens per session. - 🚧 Smart Interception Hooks:
read-once.sh: Blocks Claude from re-reading unchanged files.compact-output.sh: Intelligently strips ANSI noise and truncates massive terminal outputs (likenpm testorgit log).cost-guard.sh: Warns you when you hit 80% of your daily token budget.
- ⚙️ Strict Effort Control: Built-in hooks (
effort-gate-pre/effort-gate-post) that give teeth to your intent. Using/user:effort-lowblocks expensive commands likedocker buildand restricts API calls. - 🧹 Context & Memory Hygiene: Auto-generates aggressive
.claudeignoreblocks, prunes staleMEMORY.mdlogs viatoken-trim, and facilitates clean checkpointing with the/user:handoffcommand. - 📦 Smart Tool Integrations: Auto-installs 2026's best token-saving tools like
codesight(semantic indexing) andrtk(Rust Token Killer).
📦 Optional Workspaces (Packs)
Claude Code Optimizer has evolved from a configuration script into a fully modular framework. Launch the interactive wizard to install any of these workflow packs:
- 👥 Team Pack (
--team): Scales Claude for 2-8 person teams. Auto-generates specialized agents (frontend-specialist,devops-specialist, etc.) and a strictINTERFACES.mdcontract. Includesinterface-guard.shto prevent Claude from making changes outside your assigned domain. - 📚 Docs Pack (
--docs): Deploys a dedicatedtechnical-writeragent. ScaffoldsPRD.md,ARCHITECTURE.md, andMEMORY_BANK.md. Includes/user:ticket-gento automatically translate PRDs into actionable Linear/Jira engineering tickets. - 🛠️ OSS Skill Pack (
--oss-pack): Injects vetted community skills directly into your global setup. Includeswebapp-tester(for automated Playwright e2e validation) anddesign-system(to block generic AI UI outputs and enforce premium aesthetics).
🚀 Installation
Recommended (via PyPI):
pip install claudeoptimize
Alternative (Bash Installer): This script requires zero external dependencies to run.
# 1. Download the script
curl -fsSL https://raw.githubusercontent.com/IAZENT/claude-code-optimizer/main/claude-optimize.sh -o claude-optimize.sh
# 2. Make it executable
chmod +x claude-optimize.sh
# 3. Run the interactive installer globally
./claude-optimize.sh --install
💻 Usage
Once installed globally, you can initialize any project or update your global settings effortlessly.
Fast Track
The recommended first-time setup command:
claudeoptimize --both --yes
(Installs the global ~/.claude/ config, initializes the current directory, and auto-installs the recommended token-saver CLI tools).
CLI Commands
| Command | Description |
|---|---|
claudeoptimize |
Interactive setup menu (Global, Project, Team, Docs, OSS). |
claudeoptimize --both |
Quick setup for global + current project. |
claudeoptimize --team |
Initialize the multi-agent Team Collaboration Pack. |
claudeoptimize --docs |
Scaffold the PRD and Architecture Docs Pack. |
claudeoptimize --oss-pack |
Install vetted open-source workflow skills. |
claudeoptimize --budget 150000 |
Sets your daily token ceiling to 150k (used by the cost-guard hook). |
claudeoptimize --analyze |
Parses local logs to show your top token-burning projects today. |
claudeoptimize --status |
Checks your machine's optimization health and pack installation status. |
claudeoptimize --update |
Pulls the latest templates and components from GitHub and self-updates. |
🛠️ The Commands You Get
Once optimized, you unlock a suite of powerful workflow commands directly inside Claude Code:
Core Workflows
/user:plan— Numbered plan, no code until you confirm./user:debug— Root cause + minimal fix, skips the exploratory noise./user:compress— Checkpoints your current state intoMEMORY.mdso you can safely/compact./user:handoff— Gracefully saves your session state and unmerged changes before a full context clear./user:claude-md-audit— Audits your project files to strip inferable boilerplate and save prompt tokens.
Token Economy
/user:chain-of-draft— 80-90% fewer reasoning tokens (CoD mode)./user:effort-low— Triggers a lean session (Chain-of-Draft + no subagents + blocks heavy execution)./user:effort-high— Triggers a deep session (full reasoning + architectural subagents allowed)./user:budget-check— Live report on your daily token spend and context health.
🤝 Contributing
Contributions are welcome! If you've found a new way to shave off tokens, discovered a new plugin, or wrote a better hook:
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📜 License
Distributed under the MIT License. See LICENSE for more information.
Metadata
Release files for claudeoptimize 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| claudeoptimize-1.0.3.tar.gz | 57.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claudeoptimize-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 154.6 kB
Release files / claudeoptimize-1.0.3.tar.gz
| Download URL | claudeoptimize-1.0.3.tar.gz |
|---|---|
| Size | 57.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42c52e163d2b7321d30f7191aee3c7baa4656569b755174abbcec63cd3263de5
|
|
BLAKE2b-256 checksum How to use checksums |
8307e38d2aece149b707359fd62c8f8d90be0f8a3ae1f6d6a733b8a4e1669a17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.
Transparency logRelease files / claudeoptimize-1.0.3-py3-none-any.whl
| Download URL | claudeoptimize-1.0.3-py3-none-any.whl |
|---|---|
| Size | 97.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78ddccc5e88bea11b12d8a537d6c14fd380cd1e99df5265a3d11c950d94ca20f
|
|
BLAKE2b-256 checksum How to use checksums |
7dab9e8e94bef1c358dad16b0169f1c136286d738f3dd472c2a24c166496e2c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.
Transparency logSecurity for claudeoptimize 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for claudeoptimize-1.0.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.