How this skill is triggered — by the user, by Claude, or both
Slash command
/codeflash:optimizeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run the `codeflash` CLI to optimize code for performance.
Run the codeflash CLI to optimize code for performance.
Disambiguate the file and function from $ARGUMENTS if --file and/or --function are not provided explicitly.
Based on the language of the file/s of concern, find the config file closest to the file/files of concern (the file passed to codeflash --file or the files which changed in the diff):
pyproject.tomlpackage.jsonpom.xml or build.gradle/build.gradle.ktscd into the directory where you found the config file.
Start with: codeflash --subagent for Python and Java Code or uv run codeflash --subagent if a uv.lock file is present.
Start with: npx codeflash --subagentfor JS/TS Code
Then add flags based on $ARGUMENTS:
--file path was provided: add --file <path>--function name was also provided: add --function <name>codeflash --subagent as-is (it detects changed files automatically)Run the command as a non-blocking background Bash call (run_in_background: true) with a 10-minute timeout (timeout: 600000).
If the command fails (not installed, not authenticated, or missing config), invoke the codeflash:setup skill to resolve the issue, then retry.
npx claudepluginhub codeflash-ai/codeflash-cc-plugin --plugin codeflashCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.