execplan-improve/SKILL.md
Reads an existing ExecPlan, deeply analyzes every referenced file and code path in the codebase, then rewrites the plan with concrete, code-grounded improvements. Use when user asks to improve an execplan, review a plan, make a plan better, audit an execplan, refine a plan, strengthen a plan, or says "improve the plan."
npx skillsauth add grp06/useful-codex-skills execplan-improveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Core philosophy: Every improvement must trace back to something found in the actual code. No speculative additions. No surface-level rewording.
Use John Ousterhout's design philosophy as the design-quality lens for the audit:
Treat these as the main forms of complexity:
An improved plan is not just more accurate. It should also be clearer about why the target design is simpler and what complexity the change removes from the rest of the system.
You may be running from a Codex worktree (e.g. ~/.codex/worktrees/<id>/<repo>/). Worktrees are shallow copies — the main repo often has files the worktree does not. Always resolve the base repo path:
/.codex/worktrees/ in its path.tail-bot) and set the base repo to ~/<repo-name>.When looking for .agent/ contents (ExecPlans, potential-bugs, PLANS.md), check both the worktree .agent/ and the base repo .agent/. Prefer the worktree copy if both exist; fall back to the base repo copy.
Default ExecPlan location: .agent/execplan-pending.md. Secondary is .agent/potential-bugs/<plan-name>.md. Search both the worktree and base repo .agent/ directories.
Use a different path if the user provides one. If no ExecPlan exists in either location, tell the user and stop.
Read .agent/PLANS.md from the base repo (or worktree if present) before modifying the ExecPlan.
Before doing any repo work, inspect only the immediately previous assistant turn in the current conversation.
execplan-improve result whose entire content was exactly skip, return exactly skip.execplan-improve result that ended with Usefulness score: N/10 - ... and N <= 3, return exactly skip.execplan-improve result, continue normally.execplan-improve results.execplan-improve result, or that immediate prior usefulness score is 4/10 or higher.Read the entire ExecPlan. Extract every file path, function/class/module name, command, milestone, acceptance criterion, and assumption.
Read each file the plan mentions. Locate each named function/class/module. Flag anything that doesn't match reality:
Read files that import from or are imported by the referenced files. Look for:
Evaluate against seven criteria:
| Criteria | Question | |----------|----------| | Accuracy | Do paths exist? Do signatures match? Are behaviors described correctly? | | Completeness | Every file, test, import, and dependency covered? Any missing milestones? | | Self-containment | Could a novice implement end-to-end with only this file? Terms defined? Commands complete? | | Feasibility | Steps achievable in order? Hidden dependencies between milestones? | | Testability | Concrete verification per milestone? Test paths, names, assertions specified? | | Safety | Idempotent? Retriable? Destructive ops have rollback? | | Design Quality | Does the plan actually reduce complexity, deepen a boundary, hide sequencing/policy, and explain the complexity dividend? |
Rewrite in-place at the same file path. Preserve existing Progress, Surprises & Discoveries, Decision Log, and Outcomes & Retrospective content.
Apply only code-grounded improvements:
Do not change the plan's intent. Do not add milestones that don't serve the original purpose. Make the same plan more accurate, complete, and executable.
If your review finds no substantive code-grounded improvements, do not churn the prose just to make a diff. Leave the body of the plan alone aside from the required bottom-of-file revision note.
Score the usefulness of this invocation, not the absolute quality of the final plan.
Use this rubric:
9-10/10: the pass fixed multiple concrete execution blockers or major missing dependencies, and the implementation path would likely have failed without these changes.7-8/10: the pass added several substantive, code-grounded corrections that materially improve executability.4-6/10: the pass made real but moderate improvements; the plan is clearer and safer, but not fundamentally different.1-3/10: the pass found little to improve beyond minor wording, sequencing, or already-obvious clarifications.The justification must be specific about what changed or what was missing. A low score is the correct outcome when the plan was already strong or the pass could not find meaningful new gaps.
Append a revision note at the bottom of the plan describing what changed and why. Do not record the usefulness score inside the plan.
Report to the user:
Usefulness score: X/10 - <specific reason> when a pass ranIf Step 0 short-circuits, return exactly skip and nothing else.
development
Create an ExecPlan from a locked refactor decision, PRD, RFC, or detailed problem statement, following the repo's PLANS.md. Use when the user asks for an exec plan, execution plan, or ExecPlan, or wants a decided refactor turned into a step-by-step plan.
documentation
Update ARCHITECTURE.md after implementing an execution plan. Use when user asks to update architecture docs, sync architecture, refresh architecture after implementation, or mentions updating docs post-execplan.
tools
Analyze Codex rollout transcripts for one repository and time window, extract repo-scoped tool calls that failed, cluster repeated error patterns, and recommend the next agent/tooling improvements. Use when the user wants to inspect tool-call failures, operational friction, repeated command mistakes, patch failures, or prompt/tooling improvements based on recent Codex runs.
development
Analyze Codex session logs for one repository, extract the repo-specific top-level conversations for a target day, summarize every user message in order, and surface the next best action. Use when the user asks what happened yesterday in a repo, which conversations touched a repo, what to work on next based on recent Codex work, or to reconstruct repo workstreams from session history.