← ClaudeAtlas

cf-optimizelisted

Structured optimization workflow — baseline, analyze, optimize, measure, compare. Auto-invoke this skill when the conversation involves performance optimization, speed improvements, or the user mentions something is slow — e.g. "this is slow", "make it faster", "optimize", "performance", "bottleneck", "too many queries", "high latency", "memory leak", "reduce load time", "speed up", "takes too long", "timeout", "O(n²)", "N+1". Do NOT auto-invoke for minor refactors or style changes that are not performance-related.
dinhanhthi/coding-friend · ★ 2 · AI & Automation · score 71
Install: claude install-skill dinhanhthi/coding-friend
# /cf-optimize > **CLI Requirement:** OPTIONAL — Uses the memory MCP from `coding-friend-cli` for fast indexed search and storage. Without the CLI: falls back to grep over `docs/memory/` and direct file writes. Full functionality preserved, slower memory recall. See [CLI requirements](../../../docs/cli-requirements.md). Optimize: **$ARGUMENTS** ## Purpose Structured workflow for optimizing existing features, algorithms, or performance-critical code. Ensures every optimization is measured before and after so you know it actually helped. ## Workflow ### Step 0: Custom Guide Run: `bash "${CLAUDE_PLUGIN_ROOT}/lib/load-custom-guide.sh" cf-optimize` If output is not empty, integrate returned sections: `## Before` → before first step, `## Rules` → apply throughout, `## After` → after final step. ### Step 1: Detect Available Tools Run quick availability checks for profiling/benchmarking tools. Store the result for use in later steps. ```bash # Node.js / JavaScript command -v clinic >/dev/null 2>&1 && echo "TOOL:clinic" command -v 0x >/dev/null 2>&1 && echo "TOOL:0x" npx lighthouse --version >/dev/null 2>&1 && echo "TOOL:lighthouse" # General command -v hyperfine >/dev/null 2>&1 && echo "TOOL:hyperfine" command -v perf >/dev/null 2>&1 && echo "TOOL:perf" # Web / Bundle command -v webpack-bundle-analyzer >/dev/null 2>&1 && echo "TOOL:webpack-bundle-analyzer" ``` If no tools are found, note this and proceed in **AI-only mode** — all profiling will be done via code instrume