# Detailed procedure Use the input contract in SKILL.md; resolve its required information before dependent actions. Input: the resolved request: suspected bottleneck or performance requirement, benchmark scope, baseline/candidate revisions and metric/budget. For concurrent system capacity use load-testing instead; profiling and bounded component benchmarks belong here. Read `.claude/framework/testing.md`, STATE.md, applicable project decisions and actual manifests/test configuration. Use the existing runner and installed versions; unfamiliar APIs/flags need installed-source or official-document verification. No automatic package/tool installation, credentials, global changes, paid services or destructive operations. Reuse existing authorization for ordinary local work. Load only relevant profiles and test references; never all testing skills for every change. 1. Inspect the actual hot path and correctness contract, current measurements, installed benchmark/profiling tools and build mode. Ask for missing material metric/acceptance budget and environment. Do not optimize from an invented bottleneck or add a complex pattern without measurements. 2. Use `.claude/framework/templates/performance-test-plan.md`. Define baseline/candidate, representative dataset/seed/size, equal configuration/build/hardware, cache/GC/state conditions, warm-up, measured repetitions, workload limits and raw output location. Select appropriate supported timer/profiler APIs. Bound time/memory/process use before execution; remote/production targets and profiling credentials require explicit authorization. 3. Implement a focused benchmark or profiling setup with existing tooling. Keep setup/cleanup separate from measured work unless setup itself is the requirement. Ensure results are consumed/validated so optimized-away or incorrect work is not reported as faster. Keep required correctness tests passing. 4. Run repeated comparable baseline/candidate measurements, record individual samples, units, sample counts, tool/runtime/source versions, environment and variability. Explain cache/warm-up effects and profiler overhead. Do not average percentiles or present a single noisy run as a reliable improvement. Missing comparable baseline means measured candidate only, not a speedup claim. 5. If optimization is requested, change one reasoned cause, rerun correctness and the same workload, report regressions/tradeoffs and keep unsupported conclusions UNVERIFIED. Put actual argv/exits, raw measurements, analysis and next action in docs/project/testing/. Set CI regression thresholds only from an agreed stable environment/budget; timing flakiness must not be hidden with retries. Use iteration-review for substantial changes within existing bounds. A local benchmark is not proof of production capacity or token/cost savings.