with one click
ln-810-performance-optimizer
// Multi-cycle performance optimization with profiling and bottleneck analysis. Use when optimizing application performance.
// Multi-cycle performance optimization with profiling and bottleneck analysis. Use when optimizing application performance.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | ln-810-performance-optimizer |
| description | Multi-cycle performance optimization with profiling and bottleneck analysis. Use when optimizing application performance. |
| disable-model-invocation | true |
| license | MIT |
Paths: File paths (
references/,../ln-*) are relative to this skill directory.
Type: L2 Domain Coordinator Category: 8XX Optimization
Runtime-backed multi-cycle optimization coordinator. Profiles, researches, validates, and executes optimization hypotheses until target reached, plateau detected, or budget exhausted.
| Input | Required | Description |
|---|---|---|
target | Yes | endpoint, function, or pipeline to optimize |
observed_metric | Yes | current performance problem |
target_metric | No | user or research-derived target |
max_cycles | No | default 3 |
profile -> gate -> research -> target -> context -> validate -> execute.hex-skills/optimization/{slug}/ and runtime state under .hex-skills/optimization/runtime/runs/{run_id}/MANDATORY READ: Load references/ci_tool_detection.md
MANDATORY READ: Load references/coordinator_runtime_contract.md, references/optimization_runtime_contract.md, references/coordinator_summary_contract.md
Runtime CLI:
node references/scripts/optimization-runtime/cli.mjs start --slug {slug} --manifest-file .hex-skills/optimization/{slug}/manifest.json
node references/scripts/optimization-runtime/cli.mjs status --slug {slug}
node references/scripts/optimization-runtime/cli.mjs record-worker-result --payload '{...}'
node references/scripts/optimization-runtime/cli.mjs record-summary --payload '{...}'
node references/scripts/optimization-runtime/cli.mjs record-cycle --payload '{...}'
node references/scripts/optimization-runtime/cli.mjs checkpoint --phase PHASE_8_EXECUTE --payload '{...}'
node references/scripts/optimization-runtime/cli.mjs advance --to PHASE_9_CYCLE_BOUNDARY
Runtime state is run-scoped, while optimization artifacts stay slug-scoped:
.hex-skills/optimization/
runtime/active/ln-810/{slug}.json
runtime/runs/{run_id}/manifest.json
runtime/runs/{run_id}/state.json
runtime/runs/{run_id}/checkpoints.json
runtime/runs/{run_id}/history.jsonl
runtime-artifacts/runs/{run_id}/optimization-coordinator/ln-810--{slug}.json
runtime-artifacts/runs/{run_id}/optimization-worker/{worker}--{child_identifier}.json
{slug}/context.md
{slug}/ln-814-log.tsv
slugtargetobserved_metrictarget_metricexecution_modecycle_configPHASE_0_PREFLIGHT.target_metric.PHASE_1_PARSE_INPUT.identifier=ln-811--{slug}--cycle-{current_cycle}run_idsummaryArtifactPath=.hex-skills/runtime-artifacts/runs/{parent_run_id}/optimization-worker/ln-811--{slug}--cycle-{current_cycle}.jsonPHASE_2_PROFILE with child_run.ln-811-performance-profiler with the child runId and exact summaryArtifactPath.optimization-worker summary envelope from the exact artifact path.record-worker-result.Evaluate profiler output:
| Gate | Meaning | Action |
|---|---|---|
PROCEED | optimization work is justified | continue |
CONCERNS | measurements usable but imperfect | continue with warning |
BLOCK | wrong tool, already optimized, or infrastructure-bound | aggregate and exit |
WAIVED | user overrides BLOCK | continue with explicit waiver |
Rules:
BLOCK -> finish as diagnostic resultBLOCK due to already_optimized or within_industry_norm -> finish as successful stopCheckpoint PHASE_3_WRONG_TOOL_GATE with:
gate_verdictstop_reason when blockedfinal_result when terminalln-812.PHASE_4_RESEARCH with child_run.ln-812-optimization-researcher with the child runId and exact summaryArtifactPath.optimization-worker summary envelope.PHASE_5_SET_TARGET with target_metric..hex-skills/optimization/{slug}/context.md.PHASE_6_WRITE_CONTEXT with context_file.ln-813.PHASE_7_VALIDATE_PLAN with validation_verdict and child_run.ln-813-optimization-plan-validator with the child runId and exact summaryArtifactPath.evaluation-coordinator summary envelope.NO_GO, pause runtime until user resolves or waives.execution_mode=execute:
ln-814.PHASE_8_EXECUTE with child_run.ln-814-optimization-executor with the child runId and exact summaryArtifactPath.optimization-worker summary envelope.execution_mode=plan_only:
ln-814.PHASE_8_EXECUTE as skipped_by_mode.record-cycle.current_cyclePHASE_9_CYCLE_BOUNDARYPHASE_2_PROFILEPHASE_9_CYCLE_BOUNDARY with stop_reasonPHASE_10_AGGREGATEPHASE_10_AGGREGATE.PHASE_11_REPORT with:
report_ready=truefinal_resultoptimization-coordinator summary envelope with record-summary.Host Skill Invocation: Skill(skill: "...", args: "...") is mandatory delegation.
SKILL.md, treat args as $ARGUMENTS, execute that skill workflow, then return here with its result/artifact.| Phase | Skill | Purpose |
|---|---|---|
| 2 | ln-811-performance-profiler | Build measured performance map |
| 4 | ln-812-optimization-researcher | Research hypotheses and targets |
| 7 | ln-813-optimization-plan-validator | Validate feasibility via evaluation-platform review (L2 Coordinator) |
| 8 | ln-814-optimization-executor | Execute optimization strike and bisect |
Skill(skill: "ln-811-performance-profiler")
Skill(skill: "ln-812-optimization-researcher")
Agent(... Skill(skill: "ln-813-optimization-plan-validator"))
Agent(... Skill(skill: "ln-814-optimization-executor"))
- Start ln-810 runtime (pending)
- Run profiler and record summary (pending)
- Apply Wrong Tool Gate (pending)
- Run researcher and record summary (pending)
- Set target metric (pending)
- Write optimization context (pending)
- Validate plan and record summary (pending)
- Execute or skip by mode (pending)
- Record cycle boundary (pending)
- Aggregate results and write final report (pending)
plan_only is a first-class execution mode, not an informal branch.NO_GO from ln-813 must pause runtime until explicitly resolved.DONE orchestration outcome.NO_GO handled via PAUSED when neededskipped_by_mode checkpointedOptional reference: load references/meta_analysis_protocol.md only when the user asks for post-run meta-analysis or protocol-formatted run reflection.
Skill type: optimization-coordinator. When requested, run after phases complete. Output to chat using the optimization-coordinator format.
references/coordinator_runtime_contract.mdreferences/optimization_runtime_contract.mdreferences/coordinator_summary_contract.md../ln-811-performance-profiler/SKILL.md../ln-812-optimization-researcher/SKILL.md../ln-813-optimization-plan-validator/SKILL.md../ln-814-optimization-executor/SKILL.mdVersion: 3.0.0 Last Updated: 2026-03-15