dev-design
This skill should be used when the user asks to 'design the approach', 'propose architecture', or 'choose between approaches'.
What this skill does
**Announce:** "Using dev-design (Phase 4) to propose implementation approaches and obtain user approval."
**Iteration topology:** one-shot + fresh-subagent plan review (dev-plan-reviewer)
### Context Check
Before starting this phase, check remaining context:
| Level | Remaining | Action |
|-------|-----------|--------|
| Normal | >35% | Proceed |
| Warning | 25-35% | Finish the current step, then invoke dev-handoff |
| Critical | ≤25% | Invoke dev-handoff immediately — resume fresh |
At Warning/Critical: Read `${CLAUDE_SKILL_DIR}/../../skills/dev-handoff/SKILL.md` and follow its instructions.
## Contents
- [The Iron Law of Design](#the-iron-law-of-design)
- [What Design Does](#what-design-does)
- [Process](#process)
- [Approach Categories](#approach-categories)
- [PLAN.md Format](#planmd-format)
- [Design Facts](#design-facts)
- [Output](#output)
# Architecture Design with User Gate
Propose implementation approaches, explain trade-offs, get user approval.
**Prerequisites:** SPEC.md finalized, exploration complete, clarifications resolved.
## Prerequisite: dev-clarify Must Be Complete
**dev-design REQUIRES dev-clarify to be complete. This is not optional.**
Before writing PLAN.md, verify these clarify gates passed:
- [ ] Testing approach documented (unit/integration/E2E)
- [ ] Test framework specified
- [ ] First test described
- [ ] Test command documented
- [ ] User workflow confirmed
**If ANY gate is unchecked → DO NOT START DESIGN. Return to dev-clarify.**
<EXTREMELY-IMPORTANT>
## The Iron Law of Design
**YOU MUST GET USER APPROVAL BEFORE IMPLEMENTATION. This is not negotiable.**
After presenting approaches:
1. Show 2-3 options with trade-offs
2. Lead with your recommendation
3. **Ask user which approach**
4. **Wait for explicit approval**
Implementation CANNOT start without user saying "Yes" or choosing an approach.
**STOP - you're about to implement without user approval.**
</EXTREMELY-IMPORTANT>
## What Design Does
| DO | DON'T |
|----|-------|
| Propose 2-3 approaches | Implement anything |
| Explain trade-offs clearly | Make the choice for user |
| Lead with recommendation | Present without opinion |
| Get explicit approval | Assume approval |
| Write PLAN.md | Skip the user gate |
**Design answers: HOW to build it and WHY this approach**
**Implement executes: the approved approach** (next phase, after gate)
## Process
### 1. Review Inputs
Before designing, ensure the following exist:
- `.planning/SPEC.md` - final requirements
- Exploration findings - key files, patterns
- Clarified decisions - edge cases, integrations
### 2. Propose 2-3 Approaches
Each approach should address the same requirements differently:
**Approach A: Minimal Changes**
- Smallest diff, maximum reuse
- Trade-off: May be less clean, tech debt
**Approach B: Clean Architecture**
- Best patterns, maintainability
- Trade-off: More changes, longer implementation
**Approach C: Pragmatic Balance**
- Balance of speed and quality
- Trade-off: Compromise on both
### 3. Present with Trade-offs
Use the AskUserQuestion tool to present approaches:
```python
# AskUserQuestion: Present 2-3 architecture approaches with trade-offs for user selection
AskUserQuestion(questions=[{
"question": "Which architecture approach should we use?",
"header": "Architecture",
"options": [
{
"label": "Pragmatic Balance (Recommended)",
"description": "Extend existing AuthService with new method. ~150 lines changed. Balances reuse with clean separation."
},
{
"label": "Minimal Changes",
"description": "Add logic to existing endpoint. ~50 lines changed. Fast but increases coupling."
},
{
"label": "Clean Architecture",
"description": "New service with full abstraction. ~300 lines. Most maintainable but longest to build."
}
],
"multiSelect": false
}])
```
**Key principles:**
- Lead with recommendation (first option + "Recommended")
- Concrete numbers (lines changed, files affected)
- Clear trade-offs for each
- Reference specific files from exploration
#### Log the review pattern (observe → record → offer)
After the user makes this `decision` selection, append one line to `.planning/LEARNINGS.md` recording **what the user attended to** before choosing — e.g. "compared lines-changed across options", "asked for the dependency graph", "approved on the recommendation without detail", "wanted to see affected files". Do NOT build any visualization speculatively.
**Offer rule:** if `.planning/LEARNINGS.md` shows the **same review artifact requested 3+ times** across episodes (e.g. the user keeps asking for a dependency graph or a diff summary before approving), offer to bundle a script under `skills/dev-design/scripts/` that generates that view automatically. Build it only after the 3rd occurrence — observed behavior first, automation after.
When the offer triggers, map the observed request to a concrete artifact:
| If the user keeps asking for… | Consider building |
|-------------------------------|-------------------|
| "show me what changed / a diff" | Interactive diff explorer (self-contained HTML) |
| "what's the architecture / dependencies?" | Dependency graph or codebase tree |
| "which files does this touch?" | Affected-files map from PLAN.md `affects:` |
| "how big is each approach?" | Lines-changed / files-touched comparison table |
Bundle the script in `skills/dev-design/scripts/`; the phase offers to run it — it never forces it.
### 4. Feature Decomposition Check
**CRITICAL:** Before writing PLAN.md, check if this is actually multiple features.
Review the scope and ask:
```python
# AskUserQuestion: Determine if feature should be split into independent tasks
AskUserQuestion(questions=[{
"question": "Is this one cohesive feature or multiple independent features?",
"header": "Scope",
"options": [
{
"label": "One feature",
"description": "Implement everything together in one branch/worktree"
},
{
"label": "Multiple features",
"description": "Break into separate features, each with own branch/worktree/PR"
}
],
"multiSelect": false
}])
```
**If "Multiple features":**
1. **List the independent features** identified from SPEC.md:
```
Based on the requirements, this breaks into:
1. Theme infrastructure (color system, theme provider)
2. Settings UI (theme selector component)
3. Component updates (update 20+ components to use theme)
4. Persistence layer (save user preference)
Each can be implemented and PR'd independently.
```
2. **Ask which to tackle first:**
```python
# AskUserQuestion: Prioritize which feature to implement first
AskUserQuestion(questions=[{
"question": "Which feature should we implement first?",
"header": "Priority",
"options": [
{"label": "Theme infrastructure (Recommended)", "description": "Foundation that others depend on"},
{"label": "Settings UI", "description": "UI for theme selection"},
{"label": "Component updates", "description": "Apply themes to components"},
{"label": "Persistence layer", "description": "Save user preference"}
],
"multiSelect": false
}])
```
3. **Write PLAN.md for ONLY the chosen feature**
4. **Document remaining features** in `.planning/BACKLOG.md`:
```markdown
# Feature Backlog
## Dark Mode Implementation
### Completed
- [ ] None yet
### Next Up
- [ ] Theme infrastructure
- [ ] Settings UI
- [ ] Component updates
- [ ] Persistence layer
**Current Focus:** Theme infrastructure
```
**If "One feature":**
Proceed to write PLAN.md for the entire scope (step 5 below).
**Why this matters:**
- Multiple features in one branch = massive PR, review hell, merge conflicts
- Separate features = clean PRs, incremental progress, easier reviews
- After first feature PR merges, come back and tackle next feature
### 4b. Prose Section Audit (MANDATORY)
**Before writing PLAN.md, scanRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.