ln-810-performance-optimizer
БесплатноБез исполняемых скриптовНе проверенMulti-cycle diagnostic pipeline: profile → research → optimize → repeat with full-stack bottleneck analysis
от tensology★ 17 звёзд на GitHubОб этом скилле
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
ln-810-performance-optimizer
Type: L2 Domain Coordinator Category: 8XX Optimization
Iterative diagnostic pipeline for performance optimization. Profiles the full request stack, classifies bottlenecks, researches industry solutions, and tests optimization hypotheses in multiple cycles — each cycle discovers and addresses different bottlenecks as fixing the dominant one reveals the next (Amdahl's law).
Overview
| Aspect | Details |
|---|---|
| Input | target (endpoint/function/pipeline) + observed_metric (e.g., "6300ms response time") + optional target_metric + optional max_cycles (default 3) |
| Output | Optimized code with verification proof, or diagnostic report with recommendations |
| Workers | ln-811 (profiler) → ln-812 (researcher) → ln-813 (plan validator) → ln-814 (executor) |
| Flow | Phases 0-1 once, then Phases 2-8 loop up to max_cycles times, Phases 9-11 once |
Workflow
Phases: Pre-flight → Parse Input → CYCLE [ Profile → Wrong Tool Gate → Research → Set Target → Write Context → Validate Plan → Execute → Cycle Boundary ] → Collect → Report → Meta-Analysis
Phase 0: Pre-flight Checks
| Check | Required | Action if Missing |
|---|---|---|
| Target identifiable | Yes | Block: "specify file, endpoint, or pipeline to optimize" |
| Observed metric provided | Yes | Block: "specify what metric is slow (e.g., response time, throughput)" |
| Git clean state | Yes | Block: "commit or stash changes first" |
| Test infrastructure | Yes | Block: "tests required for safe optimization" |
| Stack detection | Yes | Detect via ci_tool_detection.md |
| Service topology | No | Detect multi-service architecture (see below) |
| State file | No | If .optimization/{slug}/state.json exists → resume from last completed gate |
MANDATORY READ: Load shared/references/ci_tool_detection.md for test/build detection.
Service Topology Detection
Detect if optimization target spans multiple services with accessible code:
| Signal | How to Detect | Result |
|---|---|---|
| Git submodules | git submodule status — non-empty output |
List of service paths |
| Monorepo | ls for services/, packages/, apps/ directories with independent package files |
List of service paths |
| Docker Compose | docker-compose.yml / compose.yml — map service names to build contexts |
List of service paths + ports |
| Workspace config | pnpm-workspace.yaml, Cargo workspace, Go workspace |
List of module paths |
Output: service_topology — map of service names to code paths. Pass to ln-811 for cross-service tracing.
If single-service (no signals): service_topology = null — standard single-codebase profiling.
State Persistence
Save .optimization/{slug}/state.json after each phase completion. Enables resume on interruption.
{
"target": "src/api/endpoint.py::handler",
"slug": "endpoint-handler",
"cycle_config": { "max_cycles": 3, "plateau_threshold": 5 },
"current_cycle": 1,
"cycles": [
{
"cycle": 1,
"status": "done",
"baseline": { "wall_time_ms": 6300 },
"final": { "wall_time_ms": 3800 },
"improvement_pct": 39.7,
"target_met": false,
"bottleneck": "I/O-Network: 13 sequential HTTP calls",
"hypotheses_applied": ["H1", "H2"],
"branch": "optimize/ln-814-align-endpoint-c1-20260315"
}
],
"phases": {
"0_preflight": { "status": "done", "ts": "2026-03-15T10:00:00Z" },
"2_profile": { "status": "done", "ts": "2026-03-15T10:05:00Z", "worker": "ln-811" },
"8_execute": { "status": "pending" }
}
}
Phase status values: pending → running → done | failed
Update state BEFORE and AFTER each phase. For Agent-delegated phases (7, 8): set running before launch, done/failed after Agent returns.
On startup: if .optimization/{slug}/state.json exists, ask user: "Resume from cycle {current_cycle}, phase {last incomplete}?" or "Start fresh?"
Phases are per-cycle — reset at each cycle boundary. current_cycle + phases tells the exact resumption point.
Cycle Management
| Parameter | Default | Description |
|---|---|---|
| max_cycles | 3 | Maximum optimization cycles |
| plateau_threshold | 5 | Minimum improvement % to continue to next cycle |
Each cycle: Profile → Gate → Research → Target → Context → Validate → Execute. Each cycle naturally discovers different bottlenecks (fixing dominant reveals next per Amdahl's law).
Stop Conditions (evaluated after each cycle)
| Condition | Action |
|---|---|
target_met |
STOP — target reached |
improvement < plateau_threshold % |
STOP — plateau detected |
cycle == max_cycles |
STOP — budget exhau |
Установить ln-810-performance-optimizer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ln-810-performance-optimizer?
Multi-cycle diagnostic pipeline: profile → research → optimize → repeat with full-stack bottleneck analysis
Как установить скилл ln-810-performance-optimizer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ln-810-performance-optimizer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic