By codeflash-ai
Run codeflash as a background agent to optimize code for performance (Python, Java, JavaScript, TypeScript)
Optimize code for performance using Codeflash
This skill should be used when codeflash fails to run due to missing installation, authentication issues, or missing project configuration. It handles installing codeflash (via pip or uv), authenticating, and configuring pyproject.toml. Trigger phrases: "setup codeflash", "configure codeflash", "codeflash is not installed", "codeflash auth failed", "fix codeflash setup".
A minimal Claude Code plugin that runs Codeflash as a background agent to optimize Python, Java, JavaScript, and TypeScript code for performance.
/status if needed within claude code)[tool.codeflash] in pyproject.tomlpip install codeflash)npm install --save-dev codeflash), configured via a "codeflash" key in package.jsonAdd the plugin marketplace and install:
/plugin marketplace add codeflash-ai/codeflash-cc-plugin
/plugin install codeflash
By default, plugins are installed at the user level (available across all projects). You can change this:
/plugin install codeflash --scope project # shared with team via .claude/settings.json
/plugin install codeflash --scope local # this project only, gitignored
Run /plugin to open the plugin manager and confirm codeflash appears under the Installed tab.
/optimize --file src/utils.py
/optimize --file src/main/java/com/example/Fibonacci.java
/optimize --file src/utils.py --function my_function
/optimize --file src/main/java/com/example/Fibonacci.java --function fibonacci
make my_function run faster
When you make a git commit that includes Python, Java, JavaScript, or TypeScript file changes, the plugin suggests running /optimize on those files.
codeflash-cc-plugin/
├── .claude-plugin/
│ ├── marketplace.json # Marketplace manifest
│ └── plugin.json # Plugin manifest
├── hooks/
│ └── hooks.json # Stop hook for commit detection
├── scripts/
│ ├── find-venv.sh # Shared helper: find and activate a Python venv
│ └── suggest-optimize.sh # Detects Python/Java/JS/TS changes, suggests /optimize
├── skills/
│ ├── optimize/
│ │ └── SKILL.md # /optimize slash command
│ └── setup/
│ └── SKILL.md # /setup command for installation and configuration
└── README.md
The plugin is a thin wrapper around the codeflash CLI:
/optimize spawns a background optimizer agentpip install codeflash for Python/Java, npm install --save-dev codeflash for JS/TS) and configuredcodeflash CLI with the appropriate flagsCodeflash handles everything else: analysis, benchmarking, test generation, and PR creation.
| Language | Config File | Project Markers |
|---|---|---|
| Python | pyproject.toml | pyproject.toml, setup.py |
| Java | N/A | pom.xml, build.gradle |
| JavaScript | package.json | package.json |
| TypeScript | package.json | package.json, tsconfig.json |
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub codeflash-ai/codeflash-cc-plugin --plugin codeflashMemory compression system for Claude Code - persist context across sessions
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills.