Automated summary
Validates an optimization plan (performance map, hypotheses, suspicion stack) through a parallel multi-agent review before any code changes are committed to.
Strengths
- Combines three perspectives: an in-house feasibility check plus two external reviews (Codex and Gemini) merged into a GO / GO_WITH_CONCERNS / NO_GO verdict
- Catches feasibility issues, missing hypotheses and wrongly mapped conflicts before implementation starts
- Checks that context.md carries the required sections: baseline measurements, hypotheses with files_to_modify, confirmed suspicions and a test command
- Degrades gracefully: when no external agents are available it still runs the internal feasibility check
Limitations
- Assumes a complete context.md already exists under .optimization/{slug}, produced by the upstream profiler and researcher steps
- Relies on the Codex and Gemini CLIs being reachable through agent_runner.mjs; otherwise the cross-agent review is skipped
- Does not profile or fix code itself; its output is a verdict plus a corrected context.md
Use it once an optimization plan is drafted and you want its feasibility and internal consistency checked before touching the code.
Avoid it when no optimization context has been produced yet, or to analyze a performance profile directly without a prior plan.
Security analysis
CautionThe skill instructs running node agent_runner scripts and background bash tasks for multi-agent review, and it may fetch reference files from an external GitHub repository. There are no destructive, exfiltrating, or obfuscated actions, but command execution and network access warrant caution.
- •Executes node scripts and launches background bash processes
- •Fetches files via WebFetch from an external GitHub repository if local shared directory is missing
- •No declared allowed-tools despite instructions that perform file writes and command execution
Examples
Validate the optimization plan in .optimization/api-latency with the multi-agent review before we start changing code.Run ln-813 on the checkout-flow optimization context and tell me whether our hypotheses are feasible or if anything is missing.Get Codex and Gemini to review the optimization plan for the search-index slug and flag any incorrect conflict mappings.name: ln-813-optimization-plan-validator description: "Validates optimization plan via multi-agent review before execution. Use when verifying feasibility of optimization hypotheses." license: MIT
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. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/{path}.
ln-813-optimization-plan-validator
Type: L3 Worker Category: 8XX Optimization
Validates optimization plan (performance_map + hypotheses + context) via parallel agent review before committing to code changes. Catches feasibility issues, missing hypotheses, and incorrect conflict mappings before the strike.
Overview
| Aspect | Details |
|--------|---------|
| Input | .optimization/{slug}/context.md (performance_map, hypotheses, suspicion_stack) |
| Output | Verdict (GO / GO_WITH_CONCERNS / NO_GO), corrected context.md, agent feedback summary |
| Pattern | Parallel agent review (Codex + Gemini) + own feasibility check → merge → verdict |
Workflow
Phases: Load Context + Health Check → Materialize for Agents → Launch Agents → Feasibility Check → Merge + Verify → Verdict
Phase 0: Load Context + Health Check
MANDATORY READ: Load shared/references/agent_review_workflow.md
MANDATORY READ: Load shared/references/agent_delegation_pattern.md
Slug Resolution
- If invoked via Agent with contextStore containing
slug— use directly. - If invoked standalone — ask user for
.optimization/target directory or scan for single slug.
Step 1: Load Context
Read .optimization/{slug}/context.md from project root. Verify required sections present:
| Section | Required | Verify |
|---------|----------|--------|
| Performance Map | Yes | performance_map.baseline has measurements |
| Hypotheses | Yes | At least 1 hypothesis with files_to_modify |
| Suspicion Stack | Yes | At least 1 confirmed suspicion |
| Test Command | Yes | Non-empty test_command |
If missing → Block: "context.md incomplete — run profiler and researcher first."
Step 2: Agent Health Check
node shared/agents/agent_runner.mjs --health-check
- 0 agents available →
agents_launched = SKIPPED, proceed with own feasibility check only - Agents available → continue to Phase 1
Phase 1: Materialize Context for Agents
Prepare context for external agents (they cannot read .optimization/ directly):
- Ensure
.agent-review/directory exists (with.gitignorecontaining*) - Copy
.optimization/{slug}/context.md→.agent-review/context/{id}_optimization_plan.md - Build per-agent prompts per
agent_review_workflow.mdStep: Build Prompt (steps 1-9). Usereview_base.md+modes/plan_review.md
Optimization-Specific Focus Areas
Replace default {focus_areas} in prompt with:
MANDATORY READ: Load optimization_review_focus.md
- Save per-agent prompts to
.agent-review/{agent}/{id}_optimization_review_prompt.md
Phase 2: Launch Agents (Background)
Launch BOTH agents as background Bash tasks:
node shared/agents/agent_runner.mjs \
--agent codex \
--prompt-file .agent-review/codex/{id}_optimization_review_prompt.md \
--output-file .agent-review/codex/{id}_optimization_review.md \
--cwd {project_root}
node shared/agents/agent_runner.mjs \
--agent gemini \
--prompt-file .agent-review/gemini/{id}_optimization_review_prompt.md \
--output-file .agent-review/gemini/{id}_optimization_review.md \
--cwd {project_root}
Both run in background (run_in_background=true). Proceed to Phase 3 while agents work.
Phase 3: Own Feasibility Check (while agents run)
Perform independent validation of the optimization plan:
| Check | How | Fail Action |
|-------|-----|-------------|
| Files exist | For each hypothesis: verify every file in files_to_modify exists | Flag hypothesis as INVALID |
| No file conflicts | Check uncontested hypotheses don't modify same file lines | Flag overlap as CONCERN |
| Suspicion coverage | Cross-reference suspicion_stack (confirmed) with hypotheses | Flag uncovered suspicions as MISSING_HYPOTHESIS |
| Evidence backing | Each hypothesis should trace to a profiler finding or research source | Flag unsupported as WEAK_EVIDENCE |
| Conflicts correct | Verify conflicts_with mappings make sense (H1 really makes H3 unnecessary?) | Flag incorrect as BAD_CONFLICT |
| Fix Hierarchy | Verify hypotheses ordered Configuration→...→Removal. Flag if top hypothesis is level 4-5 | CONCERN: "config-level fix may be available" |
| Removal guard | Any "remove feature" hypothesis MUST have paired "optimize feature" alternative | CONCERN: "removal without optimization alternative" |
| Assumption verification | Each hypothesis's premises — verified by profiler data or just assumed? | Flag: "assumption not verified: {premise}" |
| Depth check | Did profiler go inside all accessible slow services? Check performance_map for surface-level entries | CONCERN: "service X profiled at surface level only" |
Output
feasibility_result:
valid_hypotheses: [H1, H2, H4]
invalid_hypotheses: [{id: H3, reason: "file not found: src/cache.py"}]
concerns: [{type: "file_overlap", detail: "H1 and H2 both modify src/api.py"}]
missing: [{suspicion: "N+1 in loop at handler.py:45", note: "no hypothesis addresses this"}]
Phase 4: Merge Agent Feedback
Wait for agent results, then merge per shared/references/agent_review_workflow.md:
- Parse agent suggestions from both result files
- Merge with own feasibility findings (Phase 3)
- For EACH suggestion: dedup → evaluate → AGREE or REJECT (per shared workflow)
- Apply accepted corrections directly to
.optimization/{slug}/context.md:- Remove invalid hypotheses
- Add warnings to concerns
- Adjust
conflicts_withif agents found errors - Add missing hypotheses if agents identified gaps
Save review summary → .agent-review/review_history.md
Display: "Agent Review: codex ({accepted}/{total}), gemini ({accepted}/{total}), {N} corrections applied"
Phase 5: Iterative Refinement (MANDATORY when Codex available)
PROTOCOL RULE: Valid skip: Codex unavailable in health check. If skipped → log
"Iterative Refinement: SKIPPED (Codex unavailable)".
Execute per shared/references/agent_review_workflow.md "Step: Iterative Refinement".
- Artifact:
.optimization/{slug}/context.md(post-Phase 4 merge state) - Loop (max 5 iterations): Build prompt → Codex (foreground) → parse → AGREE/REJECT → apply → repeat
- Display + Persist per shared workflow
Phase 6: Verdict
| Verdict | Condition | |---------|-----------| | GO | All hypotheses valid, no critical issues, agents agree plan is feasible | | GO_WITH_CONCERNS | Minor issues found and documented as warnings in context.md. Safe to proceed | | NO_GO | Critical feasibility issue (files missing, fundamental approach flaw, both agents reject) |
Output
validation_result:
verdict: "GO" | "GO_WITH_CONCERNS" | "NO_GO"
corrections_applied: <number>
hypotheses_removed: [<ids>]
hypotheses_added: [<ids>]
concerns: [<list>]
agent_summary: "codex: PLAN_ACCEPTABLE, gemini: SUGGESTIONS (2 accepted)"
Return verdict to coordinator. On NO_GO: coordinator presents issues to user.
Error Handling
| Error | Recovery | |-------|----------| | Context file missing | Block: "run profiler and researcher first" | | Both agents unavailable | Proceed with own feasibility check only (reduced confidence) | | Agent timeout | Use results from available agent + own check | | Context file malformed | Block: "context.md missing required sections" |
References
shared/references/agent_review_workflow.md— merge + verification protocolshared/references/agent_delegation_pattern.md— agent invocation patternshared/agents/prompt_templates/modes/plan_review.md— plan review template- optimization_review_focus.md — optimization-specific focus areas
Definition of Done
- [ ] Context file loaded and validated (all required sections present)
- [ ] Agent health check performed
- [ ] Context materialized to
.agent-review/for agents - [ ] Both agents launched (or SKIPPED if unavailable)
- [ ] Own feasibility check completed (files exist, no conflicts, evidence backing)
- [ ] Agent results merged and verified
- [ ] Agent process trees verified dead after results collection (Phase 4)
- [ ] Corrections applied to context.md
- [ ] Iterative Refinement executed or SKIPPED (Phase 5)
- [ ] Verdict issued (GO / GO_WITH_CONCERNS / NO_GO)
- [ ] Review summary saved to
.agent-review/review_history.md
Version: 1.0.0 Last Updated: 2026-03-15
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/optimization-plan-validator-mse7iorr/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/optimization-plan-validator-mse7iorr' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/optimization-plan-validator-mse7iorr/download' --output '.skill-downloads/optimization-plan-validator-mse7iorr/SKILL.md.part' && mv '.skill-downloads/optimization-plan-validator-mse7iorr/SKILL.md.part' '.skill-downloads/optimization-plan-validator-mse7iorr/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/optimization-plan-validator-mse7iorr/SKILL.md' && test -s '.skill-downloads/optimization-plan-validator-mse7iorr/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/ln-813-optimization-plan-validator' && cp -R '.skill-downloads/optimization-plan-validator-mse7iorr' '.claude/skills/ln-813-optimization-plan-validator'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/optimization-plan-validator-mse7iorr'openskills read 'optimization-plan-validator-mse7iorr'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/optimization-plan-validator-mse7iorr/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.