sdd-design

**Slash command**: `/sdd-design <slug>`

9 stars

Best use case

sdd-design is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

**Slash command**: `/sdd-design <slug>`

Teams using sdd-design should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/sdd-design/SKILL.md --create-dirs "https://raw.githubusercontent.com/sc30gsw/claude-code-customes/main/sample/harness/next-js-pages/skills/sdd-design/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/sdd-design/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How sdd-design Compares

Feature / Agentsdd-designStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

**Slash command**: `/sdd-design <slug>`

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# sdd-design

**Slash command**: `/sdd-design <slug>`
**Purpose**: Create `design.md` by delegating to the `/ecc:plan` skill for architecture and step planning, then merging output into the project's design template.

---

## Prerequisites

- `.claude/specs/<slug>/requirements.md` must exist (run `/sdd-requirements` first)
- `.claude/specs/<slug>/source-notion.md` may optionally be present for additional context

---

## Steps

### 1. Read spec inputs

```
.claude/specs/<slug>/requirements.md      (required)
.claude/specs/<slug>/source-notion.md     (optional)
```

Extract:

- All REQ-XXX IDs and their acceptance criteria
- Non-functional requirements (performance, security, accessibility)
- Scope boundaries (in-scope / out-of-scope)

### 2. Invoke `/ecc:plan`

Call the `/ecc:plan` skill with the feature context derived from requirements.md.

Prompt framing for `/ecc:plan`:

```
Feature: <feature name from requirements.md>
Context: Next.js 16 / React 19 / TypeScript frontend.
  - UI: Mantine 9 + Tailwind CSS
  - Server state: SWR via useAspidaSWR
  - Client state: Jotai atoms
  - URL state: nuqs
  - API client: aspida + up-fetch wrapped in features/*/api/
  - Validation: Valibot schemas in features/*/schemas/
  - Testing: Vitest + MSW (integration-first), Playwright (E2E)
  - Linting: oxlint (no interface, no relative imports, no default export outside pages/)

Requirements summary:
<paste REQ list>

Produce: architecture decisions, file structure, component hierarchy, state management plan, API integration plan, test strategy.
```

**`--mode standard`**: Present the `/ecc:plan` output to the user. Allow the user to review, comment, and guide design interactively before proceeding. Incorporate feedback before scaffolding.

**`--mode auto`**: Run `/plan` autonomously. Produce `design.md` directly, then append a plain-language "Auto-Design Summary" section at the top of the file for non-engineer reviewers to confirm before implementation starts.

### 3. Scaffold `design.md` from template

Copy the template at `.claude/skills/sdd-design/templates/design.md` to:

```
.claude/specs/<slug>/design.md
```

### 4. Merge `/plan` output into design sections

Fill every section of the template using the `/plan` output and your own analysis:

| Template section        | Source                                                          |
| ----------------------- | --------------------------------------------------------------- |
| Overview                | requirements.md § Scope + /plan summary                         |
| Architecture diagram    | /plan architecture decisions → Mermaid                          |
| File Structure Plan     | /plan file list → mapped to features/ layout                    |
| State Management        | /plan decisions → cross-checked with state responsibility table |
| API layer               | /plan API plan → aspida endpoint patterns                       |
| Component hierarchy     | /plan component breakdown → Mermaid diagram                     |
| Error handling strategy | /plan error handling + better-result patterns                   |
| Test strategy           | /plan test plan → cross-checked with Testing Trophy targets     |

### 5. Add traceability links

Every section must end with:

```
Satisfies: REQ-XXX, REQ-YYY
```

If a section satisfies no requirements directly, write:

```
Satisfies: <!-- cross-cutting concern, no direct REQ -->
```

---

## State Management Reference

Use the following table from `.claude/rules/web/swr-jotai.md` when making state decisions:

| State type   | Tool               | Location                                |
| ------------ | ------------------ | --------------------------------------- |
| Server state | SWR (useAspidaSWR) | `features/*/hooks/use-*.ts`             |
| Client state | Jotai              | `features/*/stores/*.ts`                |
| URL state    | nuqs               | `features/*/hooks/use-*-query-state.ts` |
| Form state   | @mantine/form      | `features/*/components/*-form.tsx`      |

**Do not duplicate server state in Jotai.**

---

## API Layer Reference

Endpoint calls follow the aspida pattern from `.claude/rules/web/api-client-aspida.md`:

```typescript
// GET /api/v1/resource
apiClient.api.v1.resource.$get({ query: { page: 1 } })

// POST /api/v1/resource
apiClient.api.v1.resource.$post({ body: { resource: {...} } })

// DELETE /api/v1/resource/:id
apiClient.api.v1.resource._id(id).$delete()
```

Mutations must be wrapped in `Result.tryPromise` with `catch: toApiError` (alphabetical key order).

---

## Output

```
.claude/specs/<slug>/design.md
```

---

## Phase Gate

**Next skill after design is always `sdd-tasks`, never `sdd-review-plan`.**  
`sdd-review-plan` requires `tasks.md` and runs only after `/sdd-tasks`.

Use the same gate for the initial write and for any later revision to `design.md`.

### Initial completion

```
== PHASE COMPLETE: sdd-design ==
Artifact: .claude/specs/<slug>/design.md
Summary:
- Architecture decisions recorded with Mermaid diagrams
- File structure mapped to features/ layout
- State management decisions documented per SWR/Jotai/nuqs table
- API layer patterns specified using aspida conventions
- All sections include Satisfies: REQ-XXX traceability links

⏸ WAITING FOR CONFIRMATION
Next: CONFIRM sdd-tasks   (run /sdd-tasks <slug> — task breakdown)
Or: describe further design changes
```

### After user-requested revisions

When the user asks to change sections of an existing `design.md` (do not treat this as plan review):

```
== DESIGN REVISED ==
Artifact: .claude/specs/<slug>/design.md(更新箇所: <list sections>)
Summary:
- <bullet: what changed and why>

⏸ WAITING FOR CONFIRMATION
Next (recommended): CONFIRM sdd-tasks   → /sdd-tasks <slug>
  - Required if tasks.md is still empty or predates this revision
  - Re-run tasks when file structure / API / component plan changed materially
Optional: CONFIRM sdd-review-plan   → only after tasks.md exists AND user wants plan review without regenerating tasks
Or: describe further design changes

Do NOT recommend CONFIRM sdd-review-plan as the default next step after design-only work.
```

### If `tasks.md` already exists

If design changed materially and `tasks.md` was generated from the old design:

1. Tell the user tasks may be stale.
2. Recommend `CONFIRM sdd-tasks` to regenerate (or `/sdd-tasks <slug>` after confirm).
3. Only after an up-to-date `tasks.md` exists, `CONFIRM sdd-review-plan` is valid.

Related Skills

web-design-guidelines

9
from sc30gsw/claude-code-customes

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

frontend-design

9
from sc30gsw/claude-code-customes

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

test

9
from sc30gsw/claude-code-customes

Advanced test implementation command with unit/E2E support, auto-execution, and smart fixing capabilities

serena

9
from sc30gsw/claude-code-customes

Token-efficient Serena MCP command for structured app development and problem-solving

project-guidelines-example

9
from sc30gsw/claude-code-customes

Example project-specific skill template based on a real production application.

notion-bug-pr

9
from sc30gsw/claude-code-customes

Skill that pulls bug tickets (titles containing 「不具合」) from a Notion database, investigates root cause in a GitHub repo, applies fixes, and opens draft PRs. Supports three modes — daily recurring schedule, one-shot at a specific time, or immediate on-demand run. Takes three or four args: Notion database URL, repo path or name, and either HH:MM (daily), "once HH:MM" (one-shot), or "now" (immediate).

graphify

9
from sc30gsw/claude-code-customes

any input (code, docs, papers, images, videos) to knowledge graph. Use when user asks any question about a codebase, documents, or project content - especially if graphify-out/ exists, treat the question as a /graphify query.

chrome

9
from sc30gsw/claude-code-customes

Comprehensive Chrome DevTools development system with native Chrome capabilities for debugging, E2E testing, performance analysis, and browser automation

webapp-testing

9
from sc30gsw/claude-code-customes

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

typescript-advanced-types

9
from sc30gsw/claude-code-customes

Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

tanstack-start

9
from sc30gsw/claude-code-customes

Full-stack React framework powered by TanStack Router with SSR, streaming, server functions, and deployment to any hosting provider.

tanstack-start-server-fn-testing

9
from sc30gsw/claude-code-customes

Unit-test TanStack Start createServerFn handlers via a global vi.mock that combines two patterns from Discussion #2701