Optimize
Use for performance work. Measure-first, profile-driven. Refuses to optimise without a baseline measurement. Targets the actual hotspot, not where intuition says it is.From its SKILL.md
npx -y skills add ialameh/sift-coder --skill optimizeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.8 KB, as published. Nobody here has run it
optimize
Measure. Find the hotspot. Optimise the hotspot. Re-measure. Stop.
Method
- Baseline. Reproduce the slowness with a deterministic command. Record:
- Wall time, CPU time, memory, allocations, query count, network calls (whichever apply)
- Example input characteristics
- Goal. State a numeric target. "Faster" is not a goal. "p95 < 200ms" is.
- Profile. Use the right tool for the language:
- Node:
--prof, clinic.js, 0x - Python: cProfile, py-spy, scalene
- Apex: Salesforce debug log analysis (
/siftcoder:sf-debug) - SQL: EXPLAIN ANALYZE
- Browser: DevTools Performance tab
- Node:
- Identify the actual hotspot. Often surprising. Optimising elsewhere is wasted.
- Hypothesise the fix. State why it should help, by how much.
- Apply minimal change.
- Re-measure. If improvement is real and meets the goal — stop. If not, revert and try another hypothesis.
- Regression test. Add a perf test (with reasonable tolerance) so you don't lose the win.
Output shape
Goal: <numeric target>
Baseline: <metric snapshot>
Profile: <hotspot identified — function or query, w/ %>
Hypothesis: <fix description, expected gain>
Change: <diff>
After: <new metric snapshot>
Improvement: <delta>
Status: ✓ goal met | ✗ goal not met (revert)
Rules
- No optimisation without baseline. "Faster" is not measurable.
- No optimisation without profiling. Intuition is wrong about hot paths >50% of the time.
- Goal is numeric. P95, throughput, memory, query count.
- Revert if the change doesn't move the metric. Speculative optimisations rot the code.
- Add a perf test for the win. Otherwise it regresses silently in 6 months.
Anti-patterns
- "Cleaner code is faster" — sometimes, often not
- Caching without measuring cache hit rate
- Async-ifying sync code that wasn't blocking
- Premature optimisation in code that runs once a day
- Micro-optimising at the expense of readability when the macro problem is unsolved
When NOT to use
- Refactoring for clarity (no perf goal) —
/siftcoder:refactor - Deleting code (smaller is better but not perf-driven) —
/siftcoder:zen - Bug fix —
/siftcoder:fix
Subagent dispatch
general-purposefor targeted optimisation workinvestigatorfor read-only profiling diagnosis- For Salesforce:
/siftcoder:sf-debug parse <log>— dedicated debug-log analysis
Value over native CC
CC will optimise on request. CC won't naturally insist on baseline + profile + numeric goal + revert-if-no-improvement. This skill enforces the discipline that distinguishes real optimisation from cargo-cult.