From unity-coding-skills
Orchestrates test-first implementation planning for features, spec changes, and refactoring. Activates when plan mode is active and user requests a new feature or spec change.
How this skill is triggered — by the user, by Claude, or both
Slash command
/unity-coding-skills:plan-feature [spec][spec]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide for plan mode. This skill defines the orchestration workflow for test-first implementation planning.
Guide for plan mode. This skill defines the orchestration workflow for test-first implementation planning.
This skill requires plan mode. Before doing anything else, check the current mode:
ExitPlanMode is in the deferred tools list → not in plan mode → stop immediately and tell the user:
"This skill (
/plan-feature) requires plan mode. Enter plan mode first: use/planor press Shift+Tab to toggle."
ExitPlanMode is NOT in the deferred tools list (i.e., directly callable) → in plan mode → proceed.If the user's request is to investigate or fix a bug rather than implement a new feature, change a specification, or refactor, use ExitPlanMode immediately and guide the user to invoke the /fix-bug skill instead. The rest of this skill applies to feature implementation, spec changes, and refactoring only.
Launch Explore agents to understand the codebase relevant to the task.
TBD items: If the requirements or specifications explicitly contain the text "TBD" for any item, treat that item as non-existent — do not design or implement it. Only ask the user via AskUserQuestion if the TBD item is a prerequisite that cannot be deferred without blocking the overall design.
Launch a Plan agent to design the class/method structure. Include the following instruction in the Plan agent prompt:
Design the class/method seams with testability in mind:
- Prefer small, focused public interfaces
- Test through the same seam production code uses. Tests should exercise the same
public/internalAPI that production callers go through. Do not promote aprivatemethod or widen visibility merely to reach it from a test — by default, private stays private.- Sanctioned exception (reduce combinatorial coverage): When a method takes 3 or more parameters — a heuristic for the real trigger, which is that several independent conditions combine so exhaustive coverage cost explodes (this can also happen with fewer parameters that each take many values, and may not apply when the extra parameters don't drive branching) — extract the cohesive sub-logic (a pure computation or decision that depends on only 1–2 of those inputs) into its own unit. Prefer a standalone class or pure function when the logic stands on its own; fall back to an
internalmethod on the same class only when it cannot be cleanly separated from instance state. Give the extracted unitinternal(notpublic) visibility when it need not be reachable outside the assembly — the narrowed visibility is a consequence of the extraction, not the goal.- Inject dependencies via interfaces so they can be replaced with test doubles
- Avoid hidden static/global state and
newcalls inside constructors for external dependenciesNaming: If any class or public method name explicitly specified by the user is a poor fit for what the spec describes, propose a more appropriate alternative using
AskUserQuestionbefore finalizing the design. Accept the user's final choice without further challenge.TBD items: Any item explicitly marked "TBD" in the requirements or spec must be excluded from the design. Skip it silently unless it is structurally required to complete the design (in which case, ask via
AskUserQuestion).
The Plan agent output should include only:
.asmdef) it belongs to — assembly boundaries drive test references and InternalsVisibleTo, so the implementer must not have to re-derive placementDo NOT include test cases, manual tests, or any test design and verification instructions — those are the sole responsibility of the test-designer agent in Step 3.
After Step 2, launch the test-designer agent using the following prompt structure:
## Requirements
[feature requirements]
## Implementation Design
[class names, public and internal method signatures, dependency interfaces, and design rationale from the Step 2 Plan agent]
## Existing Code Context
[relevant existing code structure from Step 1 Explore]
## Language Convention
[project language for test names and prose, e.g., Japanese]
Rules for assembling the prompt:
Implementation Design, include only the design output — do NOT include any test cases or manual tests the Plan agent may have produced. Test design is the test-designer agent's sole responsibility.test-designer agent's output format is self-contained; caller-supplied format overrides produce non-standard output.## Language Convention. Resolve the project language from CLAUDE.md (look for the language specified for test method names / code comments). If CLAUDE.md does not specify a language, default to English. The ## Language Convention block is a recognized input, not an output format override.The test-designer agent returns:
TESTABILITY: PASS, WARN, or FAIL)| Result | Action |
|---|---|
TESTABILITY: PASS | Proceed to Step 4 (Review) |
TESTABILITY: WARN | Proceed to Step 4; record the Testability Issues in the plan file's "Known Trade-offs" section |
TESTABILITY: FAIL | Loop back to Step 2 (see below); maximum 1 retry |
test-designer agent outputFAIL after one retry → Abort (see below)Use AskUserQuestion to present the user with three options:
Read the critical files identified in the plan. Verify that the Plan agent's design and the test-designer agent's test cases are consistent with each other and with the user's intent.
Assemble the plan file with the following sections:
test-designer agent output (all 5 layers: Editor tests, Unit tests, Integration tests, Visual verification tests, Manual tests). Do NOT rewrite, translate, or clean up the output — the test-designer agent already enforces the content restrictions defined in test-designing-guide (no framework attributes, no async/coroutine patterns, no rationale text, etc.).TESTABILITY: WARN issues (if any)${CLAUDE_SKILL_DIR}/assets/development-workflow-template.md and paste its full contents verbatim as the body of this section in the plan file, then add any project-specific steps per CLAUDE.mdnpx claudepluginhub nowsprinting/unity-coding-skills --plugin unity-coding-skillsCreates detailed implementation plans from specs or requirements, breaking work into bite-sized TDD tasks with exact file paths, commands, and expected outputs.
Generates a TDD-driven implementation plan from a finalized brainstorm-beagle spec. Turns .beagle/concepts/<slug>/spec.md into actionable 2-5 minute tasks with exact file paths and commands, saved to plan.md after user approval.
Creates detailed, step-by-step implementation plans from specs or requirements before coding. Each step is a single 2-5 minute action with file paths, test commands, and commit instructions.