cf-optimize

Solid

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.

AI & Automation 2 stars 0 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
16
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# $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 Custom guide — auto-loaded below (if the raw command shows instead of its output, run it yourself): ```! bash "${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...

Details

Author
dinhanhthi
Repository
dinhanhthi/coding-friend
Created
5 months ago
Last Updated
2 days ago
Language
TypeScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category