agentsclimarketplace

Optimize

Skill ialameh/sift-coder/skills/coding/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

Install
npx -y skills add ialameh/sift-coder --skill optimize

Assembled 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

  1. Baseline. Reproduce the slowness with a deterministic command. Record:
    • Wall time, CPU time, memory, allocations, query count, network calls (whichever apply)
    • Example input characteristics
  2. Goal. State a numeric target. "Faster" is not a goal. "p95 < 200ms" is.
  3. 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
  4. Identify the actual hotspot. Often surprising. Optimising elsewhere is wasted.
  5. Hypothesise the fix. State why it should help, by how much.
  6. Apply minimal change.
  7. Re-measure. If improvement is real and meets the goal — stop. If not, revert and try another hypothesis.
  8. 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-purpose for targeted optimisation work
  • investigator for 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.

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.