perf-optimization/SKILL.md
Evidence-driven performance optimization that consumes perf-benchmark findings, selects one bounded candidate, re-measures with identical profiling, and records accepted wins or honest no-win outcomes.
npx skillsauth add jc1122/perf-benchmark-skill perf-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill after perf-benchmark has produced PERF findings. It enforces a
measure -> change -> re-measure loop: select one candidate, change one bounded
file-set, re-run the same benchmark, accept only quantified wins, and record
rejections or no-candidate outcomes.
perf-benchmark --findings-out.benchmark_summary.json.--baseline-ledger.PERF findings use shared-schema fields including id, leaf, signal,
severity, path, location, metric, evidence, confidence, and
suggested_action. metric.name maps the finding to the rubric dimension.
Algorithmic metric names are complexity_exponent, call_amplification,
data_reuse, write_amplification, allocation_churn, and
multiplicative_paths. A high-severity algorithmic finding is a STOP gate:
algorithmic remediation is the only eligible work until it is resolved.
python perf-optimization/scripts/select_candidate.py \
--findings /tmp/perf-findings.json \
--out /tmp/candidate.json
The selector writes either:
{"status":"ok","candidate":{"id":"...","path":"src/hot_loop.py","metric_name":"l1_miss_rate","severity":"high","ratio":4.2,"stop_gate":false}}
or:
{"status":"no_candidates"}
no_candidates exits 1 and is a valid terminal outcome: record
evaluated, no feasible low-risk win.
Apply exactly one performance change per iteration.
candidate.metric_name.candidate.path; expand only when the technique requires it.Use references/optimization-playbook.md for technique selection and
../references/perf-remediation-playbook.md for execution discipline.
Re-run the same perf-benchmark command shape: same tier, sizes, target, root,
and machine. Then compare summaries:
python perf-optimization/scripts/verify_win.py \
--before /path/to/before/benchmark_summary.json \
--after /path/to/after/benchmark_summary.json \
--suite-exit-code 0 \
--ledger docs/perf/baseline_ledger.jsonl \
--out /tmp/verdict.json
Accept only when all hold:
N/A (noise).Reject means revert the change and keep the evidence. Accepted wins are committed one iteration at a time and appended to the ledger.
candidate.json: selected candidate or no-candidate status.verdict.json: accept, reject, or no-feasible-win evidence.perf-benchmark first.development
Use when profiling Linux Python or C workloads for algorithmic scaling, cache, branch, memory, or ASM bottlenecks, or when comparing a benchmark run against a saved performance baseline.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------