From claude-resources
Performance discipline: profile before optimize, benchmark, N+1 detection, hot-path analysis. Use when responding to a measured performance issue OR designing a high-throughput path. Pair with core/code-review §5 (review-time checklist).
npx claudepluginhub deandum/claude-resources --plugin go-skillsThis skill uses the workspace's default tool permissions.
Performance optimization without measurement is ritual. This skill is the design-time and response-time discipline for choosing *what* to optimize and *how much*. For the review-time checklist, see `core/code-review` §5 Performance.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
Performance optimization without measurement is ritual. This skill is the design-time and response-time discipline for choosing what to optimize and how much. For the review-time checklist, see core/code-review §5 Performance.
"Fast" is not a target. "p99 < 100ms at 1000 req/s" is. Before optimizing anything, know:
If you cannot state the target in numbers, you are not optimizing — you are guessing.
Rules of measurement:
Without a baseline, "it's faster now" is a story, not evidence.
Profilers find the real bottleneck. Intuition finds the bottleneck you remember from a different project. Always profile first.
Look for:
If the profile does not match your mental model, the mental model is wrong.
Order of attack:
Most performance wins live at levels 1 and 2. Micro-tuning is where complexity metastasizes without payoff.
After any optimization, re-run the benchmark:
A change that does not move the target number is a complexity add, not an optimization. Revert it.
Loops that issue one query (or one RPC, or one external call) per iteration are the most common performance bug. Always ask: is this operation inside a loop? Is each iteration independent? Can it be batched?
| Shortcut | Reality |
|---|---|
| "I know this is slow — profiling is overhead." | You don't. The profiler will surprise you. Run it. |
| "Premature optimization is the root of all evil — so I'll skip it." | Knuth's full quote: "except for the 3% that matters." Measure to find the 3%. |
| "The change is tiny, no need to benchmark." | Tiny changes can trigger huge regressions (cache misses, branch prediction, inlining). Benchmark. |
| "The optimization is obviously faster." | Obvious is not measured. "Obviously" is the word that precedes most regressions. |
| "I'll optimize everything to be safe." | Optimizing cold code is a complexity tax with zero return. Target the hot path. |
// optimized or // fast path without a baseline number nearby