/diagnose-before-plan
Diagnose failures before creating a Prime Agent plan. MUST USE for bugs, CI failures, test failures, regressions, incidents, broken behavior, root cause, RCA, or debug-why requests before deciding whether to plan; preserve language, reviewer, and criticizer settings in
$ npx -y skills add Optim-Agent/optim-plans --skill diagnose-before-plan --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/diagnose-before-plan
Context preview
The summary Claude sees to decide when to auto-load this skill.
Diagnose failures before creating a Prime Agent plan. MUST USE for bugs, CI failures, test failures, regressions, incidents, broken behavior, root cause, RCA, or debug-why requests before deciding whether to plan; preserve language, reviewer, and criticizer settings in
SKILL.md
diagnose-before-plan.SKILL.mdname: diagnose-before-plan
description: Diagnose failures before creating a Prime Agent plan. MUST USE for bugs, CI failures, test failures, regressions, incidents, broken behavior, root cause, RCA, or debug-why requests before deciding whether to plan; preserve language, reviewer, and criticizer settings in .git/optim-plans; exclude ordinary feature planning, direct implementation-only, factual/explanation, trivial command-only, or explicit no-plan requests.
Diagnose Before Plan
Use this skill for problem or failure inputs that need diagnosis before planning.
Setup
1. Read `../_shared/references/prime-planning-workflow.md`, `../_shared/references/state-and-config.md`, and `../_shared/references/plan-artifact-template.md`. 2. Use `.git/optim-plans` for controller state and `docs/optim-plans/YYYY-MM-DD-topic/` for public artifacts. 3. Preserve reviewer and criticizer settings for any selected planning skill.
Diagnostic Workflow
1. Inspect available evidence first: repository files, logs, tests, command output, stack traces, recent diffs, CI output, environment details, and user-provided symptoms. 2. Produce an in-message RCA summary before asking whether to plan. Use at most 5 Whys. Stop with `unknown` when evidence is insufficient. 3. Ask one choice prompt in the configured language: 1. `Create the scoped fix plan` - recommended when evidence supports a planning path. 2. `Stop after RCA` - keep the diagnosis only. 3. `Other`. 4. `Auto-complete`. 4. On opt-out, stop after the summary. Do not write `PROBLEM_ANALYSIS.md` on opt-out. 5. On opt-in or `Auto-complete`, select the smallest fitting planning skill and continue with that skill's contract.
Level Selection
- `create-a-small-plan`: clear root cause, obvious fix shape, few local files, limited risk.
- `create-a-plan`: multi-file fix, external API or dependency behavior, compatibility concerns, or research needed.
- `create-a-big-plan`: cross-system failure, unclear root cause, redesign pressure, or high recoverability risk.
After opt-in, write `PROBLEM_ANALYSIS.md` in the selected run artifact directory before `PLAN_v1.md` and pass the RCA summary into the selected planning skill.
Read more
name: diagnose-before-plan description: Diagnose failures before creating a Prime Agent plan. MUST USE for bugs, CI failures, test failures, regressions, incidents, broken behavior, root cause, RCA, or debug-why requests before deciding whether to plan; preserve language, reviewer, and criticizer settings in .git/optim-plans; exclude ordinary feature planning, direct implementation-only, factual/explanation, trivial command-only, or explicit no-plan requests.
Diagnose Before Plan
Use this skill for problem or failure inputs that need diagnosis before planning.
Setup
1. Read `../_shared/references/prime-planning-workflow.md`, `../_shared/references/state-and-config.md`, and `../_shared/references/plan-artifact-template.md`. 2. Use `.git/optim-plans` for controller state and `docs/optim-plans/YYYY-MM-DD-topic/` for public artifacts. 3. Preserve reviewer and criticizer settings for any selected planning skill.
Diagnostic Workflow
1. Inspect available evidence first: repository files, logs, tests, command output, stack traces, recent diffs, CI output, environment details, and user-provided symptoms. 2. Produce an in-message RCA summary before asking whether to plan. Use at most 5 Whys. Stop with `unknown` when evidence is insufficient. 3. Ask one choice prompt in the configured language: 1. `Create the scoped fix plan` - recommended when evidence supports a planning path. 2. `Stop after RCA` - keep the diagnosis only. 3. `Other`. 4. `Auto-complete`. 4. On opt-out, stop after the summary. Do not write `PROBLEM_ANALYSIS.md` on opt-out. 5. On opt-in or `Auto-complete`, select the smallest fitting planning skill and continue with that skill's contract.
Level Selection
- `create-a-small-plan`: clear root cause, obvious fix shape, few local files, limited risk.
- `create-a-plan`: multi-file fix, external API or dependency behavior, compatibility concerns, or research needed.
- `create-a-big-plan`: cross-system failure, unclear root cause, redesign pressure, or high recoverability risk.
After opt-in, write `PROBLEM_ANALYSIS.md` in the selected run artifact directory before `PLAN_v1.md` and pass the RCA summary into the selected planning skill.
Human-in-the-loop planning plugin for Claude and Codex: turn ideas into reviewed Markdown plans, record decisions, enforce explicit execution gates, and provide tested controller primitives for safer agent workflows.
Other skills on optim-plans.
- /create-a-big-plan
Create a large Prime Agent plan before implementation. Use for open-ended or high-risk repo efforts needing 10 or more planning questions, web research, reviewer or criticizer subagents, and refinement until convergence; exclude direct implementation-only, factual/explanation,
Open skill - /create-a-plan
Create a researched Prime Agent plan before implementation. Use for broad or risky repo changes needing 5 to 10 planning questions, web research, reviewer or criticizer settings, and bounded refinement; exclude direct implementation-only, factual/explanation, trivial
Open skill - /create-a-small-plan
Create a small Prime Agent plan before implementation. Use for small scoped repo changes needing 1 to 3 planning questions and one reviewer or criticizer refinement pass; exclude direct implementation-only, factual/explanation, trivial command-only, or explicit no-plan requests.
Open skill - /reference-before-plan
Research references before creating a Prime Agent plan. Use when repo-change planning needs downloaded projects, articles, papers, docs, per-reference analysis, adoption questions, language settings, and reviewer or criticizer subagents; exclude direct implementation-only,
Open skill

