codex/skills/expand-shell/SKILL.md
Expand a shell into a full implementation plan. Verifies Consumes against the current codebase, runs a fresh pattern survey, escalates open questions, and fills in concrete file references and verification. Use when the user asks to "expand a shell", "expand shell", "fill in the shell", "expand the shell", or "concretize the shell".
npx skillsauth add tobihagemann/turbo expand-shellInstall 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.
Expand a shell into a full implementation plan. The shell's Context, Produces, Consumes, Covers, and high-level Implementation Steps are authoritative. Expansion adds a pattern survey, concrete references, and verification, writes the plan to .turbo/plans/<shell-slug>.md, and deletes the source shell once the plan is in place.
Use update_plan to track each step, restating any remaining steps of a parent workflow alongside them:
$survey-patterns skill (shell-focused)Determine which shell to expand:
.turbo/shells/*.md and filter to shells whose depends_on are all satisfied (see satisfaction check below). If exactly one match, use itrequest_user_input to let the user choose.turbo/shells/, say so and stopA depends_on entry is satisfied when .turbo/plans/<dep-slug>.md exists with status: done in its frontmatter.
Read the shell file. Parse the YAML frontmatter:
Parse these body fields:
# Plan: heading)Compute the shell slug from the filename (basename without .md). The expanded plan will be written to .turbo/plans/<shell-slug>.md.
Verify Consumes are present in the current codebase. For each Consumes entry:
.turbo/plans/<prior-slug>.md has status: done AND that the artifact is actually present in the current codebase (the prior implementation may have diverged)If any Consumes entry fails verification, escalate via request_user_input:
$pick-next-shell again or resolve the prior work.Do not proceed to Step 2 until all Consumes verify cleanly.
$survey-patterns Skill (Shell-Focused)Run the $survey-patterns skill with a task description built from the shell's structural content:
<shell title>
Context: <shell Context>
Produces: <shell Produces, as a bulleted list>
Implementation steps: <shell Implementation Steps, numbered>
This scopes the survey to the shell's concern area instead of a generic sweep. Keep the returned findings in conversation context for use in Step 4.
For each entry in the shell's Open Questions field, present it via request_user_input and collect the answer. Frame each question with enough context from the shell for the user to decide.
Do not escalate other questions. If you identify a new question while reading the codebase, note it as a risk in the drafted plan's Verification or Context Files sections.
If the shell's Open Questions field is empty or contains "None," skip this step entirely and proceed to Step 4.
Expand the shell into a full plan using:
file_path references and named functions or symbols from the pattern surveyReplace Pattern Survey references to the source shell with stable spec or codebase anchors before writing the plan. Omit a source-shell reference when no stable replacement supports the claim; Step 7 deletes the shell.
Create .turbo/plans/ if it does not exist. Write the plan to .turbo/plans/<shell-slug>.md using this structure:
---
status: draft
spec: <spec path from original shell frontmatter>
---
# Plan: <Task Title>
## Context
<Shell Context, preserved verbatim or lightly edited.>
## Pattern Survey
<Insert the structured findings from `$survey-patterns`: Analogous Features, Reusable Utilities, Convention Anchors, Proposed Alignment. Use the same format the survey returned.>
## Implementation Steps
1. **<Step 1 title>**
- <Concrete action with `file_path` references and named functions or symbols>
2. **<Step 2 title>**
- ...
3. ...
## Verification
- <Specific test command, manual smoke check, or MCP tool invocation>
- <Expected observable result>
- <Edge cases to spot-check>
## Context Files
- `<path/to/file1>` — <why it matters>
- `<path/to/file2>` — <why it matters>
The plan carries spec forward as provenance. depends_on and the structural contract (Produces, Consumes, Covers) are locked in at expansion and do not need to persist on the plan.
State the plan path before proceeding.
file_path references and named functions or symbols. Reference existing functions and utilities from the Pattern Survey instead of reinventing them. Each step describes a discrete unit of work that can be tracked independently during execution.Re-read the shell at .turbo/shells/<shell-slug>.md and the drafted plan at .turbo/plans/<shell-slug>.md. Confirm the plan honors the shell's structural contract by checking each item below:
depends_on includes this shell's slug, or whose Consumes references its Produces) and check that the plan gives them a stable seam rather than forcing a schema or API redesign in a downstream shell. A conflict does not block: note it as a plan risk in the plan's Context or Verification without changing this shell's contract or pulling downstream scope into this plan.If every item passes, proceed to Step 6. If any item fails, revise the plan to close the gap and re-verify before proceeding. Do not delete the shell while any check is failing.
Present a brief summary of the expanded plan: the essence of what it builds and the key decisions behind it, short enough to read at a glance so the user does not have to read the full plan file. When the plan delivers value to a user, developer, or operator, also present a short list of stories capturing what that person gains, in the form "As a <persona>, I want <capability> so that <outcome>". Skip the stories only when no beneficiary or outcome can be named, such as a purely mechanical refactor. Fit both to the plan rather than a fixed template.
Then use request_user_input to offer two paths:
Do not delete the shell until the user approves.
Delete the source shell at .turbo/shells/<shell-slug>.md. The plan is now the authoritative artifact for this work.
Then call update_plan to mark this step completed and continue with the next step of the active workflow.
.turbo/ are the only outputs. Do not write code, scaffolding, or other project files.$review-plan or any review skills here.$finalize invocation in the plan file.development
Apply a UX lens to a user-facing change: whether it serves the user's real goal and whether the path through it holds together, using the Understanding, Bridging, and Flowing contexts. Use when scoping, planning, or assessing any change that affects what a user sees or does. Loaded as a lens during planning and assessment.
development
Apply a UX lens to a user-facing change: whether it serves the user's real goal and whether the path through it holds together, using the Understanding, Bridging, and Flowing contexts. Use when scoping, planning, or assessing any change that affects what a user sees or does. Loaded as a lens during planning and assessment.
development
Assess project-wide structural technical debt: complexity hotspots, deprecated API usage, duplication clusters, and architecture rot. Ranks findings by impact and refactor effort into a report at .turbo/technical-debt.md. Use when the user asks to "assess technical debt", "find technical debt", "review technical debt", "what should we refactor", "find refactoring candidates", "where is the code rot", or "what's our worst code". Analysis-only — does not modify code.
development
Run a multi-agent review of code comments and markdown documentation for unnecessary content, then fix the issues. Covers what-restating comments, name-mirroring doc comments, status-update prose, and other documentation noise. Use when the user asks to "simplify docs", "simplify documentation", "clean up comments", "clean up docs", "review documentation", "strip unnecessary comments", "reduce doc noise", or "run simplify-docs".