{
  "markdown": "# Codeflash Claude Code Plugin\n\nA minimal Claude Code plugin that runs [Codeflash](https://codeflash.ai) as a background agent to optimize Python, Java, JavaScript, and TypeScript code for performance.\n\n## Prerequisites\n\n- Claude Code v2.1.38 or later (check with `/status` if needed within claude code)\n- **Python projects**: [codeflash](https://pypi.org/project/codeflash/) installed in a virtual environment, configured via `[tool.codeflash]` in `pyproject.toml`\n- **Java projects**: [codeflash](https://pypi.org/project/codeflash/) installed (`pip install codeflash`)\n- **JS/TS projects**: [codeflash](https://www.npmjs.com/package/codeflash) installed as a dev dependency (`npm install --save-dev codeflash`), configured via a `\"codeflash\"` key in `package.json`\n\n## Installation\n\n### From GitHub\n\nAdd the plugin marketplace and install:\n\n```bash\n/plugin marketplace add codeflash-ai/codeflash-cc-plugin\n/plugin install codeflash\n```\n\n### Installation scope (optional)\n\nBy default, plugins are installed at the user level (available across all projects). You can change this:\n\n```bash\n/plugin install codeflash --scope project  # shared with team via .claude/settings.json\n/plugin install codeflash --scope local    # this project only, gitignored\n```\n\n### Verify installation (optional)\n\nRun `/plugin` to open the plugin manager and confirm codeflash appears under the **Installed** tab.\n\n## Usage\n\n### Optimize a file\n\n```\n/optimize --file src/utils.py\n/optimize --file src/main/java/com/example/Fibonacci.java\n```\n\n### Optimize a specific function\n\n```\n/optimize --file src/utils.py --function my_function\n/optimize --file src/main/java/com/example/Fibonacci.java --function fibonacci\n```\n\n### Optimize via Natural language instruction\n\n```\nmake my_function run faster\n```\n\n### Auto-suggest after commits\n\nWhen you make a git commit that includes Python, Java, JavaScript, or TypeScript file changes, the plugin suggests running `/optimize` on those files.\n\n## Plugin Structure\n\n```\ncodeflash-cc-plugin/\n├── .claude-plugin/\n│   ├── marketplace.json         # Marketplace manifest\n│   └── plugin.json              # Plugin manifest\n├── hooks/\n│   └── hooks.json               # Stop hook for commit detection\n├── scripts/\n│   ├── find-venv.sh             # Shared helper: find and activate a Python venv\n│   └── suggest-optimize.sh      # Detects Python/Java/JS/TS changes, suggests /optimize\n├── skills/\n│   ├── optimize/\n│   │   └── SKILL.md             # /optimize slash command\n│   └── setup/\n│       └── SKILL.md             # /setup command for installation and configuration\n└── README.md\n```\n\n## How It Works\n\nThe plugin is a thin wrapper around the `codeflash` CLI:\n\n1. `/optimize` spawns a background optimizer agent\n2. Verifies codeflash is installed (`pip install codeflash` for Python/Java, `npm install --save-dev codeflash` for JS/TS) and configured\n3. Runs the `codeflash` CLI with the appropriate flags\n4. Reports results (optimizations found, PRs created)\n\nCodeflash handles everything else: analysis, benchmarking, test generation, and PR creation.\n\n## Supported Languages\n\n| Language | Config File | Project Markers |\n|----------|------------|-----------------|\n| Python | `pyproject.toml` | `pyproject.toml`, `setup.py` |\n| Java | N/A | `pom.xml`, `build.gradle` |\n| JavaScript | `package.json` | `package.json` |\n| TypeScript | `package.json` | `package.json`, `tsconfig.json` |\n",
  "bytes": 3408,
  "sha": "cb3c7775dd952f86c4a7112f747828a23a92f5f1aa3635121abb58cf60eef7fe",
  "repo_slug": "codeflash-ai/codeflash-cc-plugin",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_codeflash_ai_codeflash_cc_plugin_codefla_a6428b59/readme"
}