skills/sdd-impl/SKILL.md
# sdd-impl — Implement Tasks (TDD) ## Slash Command ``` /sdd-impl <slug> [task-id] ``` ## Purpose Implement one task (or all pending tasks) for a spec using strict Test-Driven Development. Delegates test/implementation cycles to the `/ecc:tdd-workflow` skill and keeps `progress.md` up to date throughout. --- ## Prerequisites Before running this skill, confirm: - `sdd-review-plan` has been run: `review-results/plan-review.md` must exist and contain no `❌` in the Traceability section. - `t
npx skillsauth add sc30gsw/claude-code-customes skills/sdd-implInstall 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.
/sdd-impl <slug> [task-id]
Implement one task (or all pending tasks) for a spec using strict Test-Driven Development. Delegates test/implementation cycles to the /ecc:tdd-workflow skill and keeps progress.md up to date throughout.
Before running this skill, confirm:
sdd-review-plan has been run: review-results/plan-review.md must exist and contain no ❌ in the Traceability section.tasks.md exists and has at least one task in pending status.If the plan review is missing, stop and instruct the user to run /sdd-review-plan <slug> first.
| File | Purpose |
| ---------------------------------- | --------------------------------------------- |
| .claude/specs/<slug>/tasks.md | Task definitions and acceptance criteria |
| .claude/specs/<slug>/progress.md | Current task statuses and mode setting |
| .claude/specs/<slug>/design.md | Architecture decisions guiding implementation |
| .claude/specs/<slug>/review-results/plan-review.md | Checked for Plan Review completion |
Read mode from the YAML front matter of progress.md:
---
mode: standard # or: auto
---
| Aspect | standard (engineer-led) | auto (AI-led) |
| ----------------------- | ----------------------------------------------- | --------------------------------------------------------- |
| After RED phase | Pause — show failing test, wait for CONFIRM | Proceed automatically |
| After GREEN phase | Pause — show implementation, wait for CONFIRM | Proceed automatically |
| After REFACTOR phase | Pause — show final state, wait for CONFIRM | Post summary and proceed to next task |
| On pnpm check failure | Stop, show error, ask for guidance | Attempt self-fix up to 3 iterations, then stop and report |
If [task-id] is provided:
- Locate that task in tasks.md
- Verify its status in progress.md is "pending" (or "in-progress" if resuming)
- Warn if the task is already "done"
Otherwise:
- Find the first task with status "in-progress" in progress.md (resume case)
- If none, find the first task with status "pending"
- If all tasks are "done", report completion and skip to the gate
Update progress.md:
<!-- Before -->
- [ ] TASK-001: Create user schema — pending
<!-- After -->
- [x] TASK-001: Create user schema — in-progress
/ecc:tdd-workflowInvoke the /ecc:tdd-workflow skill for the selected task. Pass the task's acceptance criteria as the specification.
RED phase — Write failing test:
use-login.ts → use-login.test.ts)tasks.md directlypnpm test:run — confirm the test fails for the right reasonstandard mode: pause and display the failing test outputGREEN phase — Minimal implementation:
pnpm test:run — confirm the test passesstandard mode: pause and display the passing test outputREFACTOR phase — Clean up:
pnpm check — must pass with no errorspnpm test:run — all tests must still passstandard mode: pause and display the final stateAfter each task completes its TDD cycle:
git add <changed files>
git commit -m "feat(TASK-001): <task title from tasks.md>"
Use the exact task ID and title from tasks.md. Follow Conventional Commits format.
progress.md<!-- After completion -->
- [x] TASK-001: Create user schema — done
Append a brief note under the task if relevant (e.g., which files were created or modified).
If no [task-id] was given (auto mode or batch run), loop back to Step 1 and pick the next pending task. Continue until all tasks are done or the user interrupts.
These are non-negotiable for this project:
| Constraint | Rule |
| ------------------ | -------------------------------------------------------------------------- |
| Validation command | pnpm check (runs oxlint + oxfmt + tsc together) |
| Test command | pnpm test:run |
| Imports | Always use ~/ alias — never relative paths |
| Type declarations | type only — never interface |
| Exports | No export default outside src/pages/ and *.config.* files |
| Error handling | better-result (Result.tryPromise, .match({err, ok})) — not try/catch |
| Logging | No console.log in committed code |
| Memoization | No useMemo / useCallback — React Compiler handles this |
| Test file location | Co-located with source (e.g., use-foo.ts + use-foo.test.ts) |
| Test queries | getByRole > getByText > getByLabelText — never getByTestId |
| Object key order | Alphabetical in better-result calls: catch → try, err → ok |
better-result patternsAPI layer (mutations.ts) — catch before try:
export function createFoo(params: CreateFooParams) {
return Result.tryPromise({
catch: toApiError,
try: async () => {
const response = await apiClient.api.v1.foos.$post({ body: params })
return response
},
})
}
Hook layer (use-*.ts) — err before ok:
result.match({
err: (error) => {
showError({ message: error.message, title: 'エラー' })
},
ok: (data) => {
showSuccess({ message: '作成しました' })
onSuccess(data)
},
})
src/features/<feature>/mocks/handlers.ts
Handlers are registered in src/lib/msw/server.ts for Vitest tests.
If the session was interrupted mid-task, re-run:
/sdd-impl <slug>
The skill reads progress.md, finds any task marked in-progress, and resumes from the appropriate TDD phase. If no in-progress task exists, it picks the next pending task.
| File | Change |
| ---------------------------------- | ---------------------------------- |
| .claude/specs/<slug>/progress.md | Task statuses updated |
| .claude/specs/<slug>/change-log.md | Phase completion event appended |
| src/features/<feature>/... | New/modified source and test files |
| git history | One commit per completed task |
After all specified tasks complete (or a single task if [task-id] was given):
Append to .claude/specs/<slug>/change-log.md:
| <YYYY-MM-DD> | sdd-impl | 実装完了 (<N> tasks, <M> commits) |
== PHASE COMPLETE: sdd-impl ==
Artifact: .claude/specs/<slug>/progress.md
Summary:
- Implemented TASK-001 through TASK-003 (3 tasks)
- All tests pass (pnpm test:run green)
- pnpm check passes (lint + format + tsc)
- Commits: feat(TASK-001), feat(TASK-002), feat(TASK-003)
- Remaining pending tasks: TASK-004 through TASK-012
⏸ WAITING FOR CONFIRMATION
Type `CONFIRM sdd-review` to proceed to code review, or describe changes needed.
tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
testing
# sdd-workflow — Workflow Status Dashboard ## Slash Command ``` /sdd-workflow [slug] ``` ## Purpose Read-only meta skill. Displays the current state of the SDD workflow — which phases are complete, which is next, and any blockers. Does NOT modify any files. --- ## This Skill is Read-Only `sdd-workflow` never writes to or modifies any file. It only reads spec files and git history to report status. There is no approval gate for this skill. --- ## Usage: Specific Feature ``` /sdd-workflo
content-media
# sdd-tasks **Slash command**: `/sdd-tasks <slug>` **Purpose**: Generate `tasks.md` (TASK-001..N) and `progress.md` from `requirements.md` and `design.md`. --- ## Prerequisites - `.claude/specs/<slug>/requirements.md` must exist - `.claude/specs/<slug>/design.md` must exist (run `/sdd-design` first) --- ## Steps ### 1. Read spec inputs ``` .claude/specs/<slug>/requirements.md .claude/specs/<slug>/design.md ``` Extract: - Every REQ-XXX ID with its acceptance criteria - Every design sect
development
# sdd-review — Post-Implementation Code Review ## Slash Command ``` /sdd-review <slug> ``` ## Purpose Run code review and security review on all changes introduced by the feature branch. Append structured findings to `review.md`. Does NOT auto-apply fixes — only proposes them. --- ## Prerequisites - `sdd-impl` has completed: all tasks in `progress.md` are `done` (or at least one is `done`; partial reviews are allowed). - The feature branch must have at least one commit ahead of `main`. -