$npx -y skills add Codagent-AI/agent-skills --skill designCreates design artifacts through collaborative brainstorming of approaches, architecture, and trade-offs. Use when the user says "design this", "create a design", "brainstorm approaches", or "write a design doc".
| 1 | # Design |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Help turn specs into fully formed technical designs through natural collaborative dialogue. |
| 6 | |
| 7 | Start by reading all spec files in the change's `specs/` directory to understand settled requirements, then brainstorm architecture by asking questions one at a time. Once the architecture is clear, present the design and get user approval. When writing the design doc, also apply any spec edits identified during the conversation. |
| 8 | |
| 9 | <HARD-GATE> |
| 10 | Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. Use the appropriate tool for asking the user a question or requesting input to get this approval. This applies to EVERY project regardless of perceived simplicity. |
| 11 | </HARD-GATE> |
| 12 | |
| 13 | ## Anti-Pattern: "This Is Too Simple To Need A Design" |
| 14 | |
| 15 | Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval. |
| 16 | |
| 17 | ## Anti-Pattern: Asking About Requirements |
| 18 | |
| 19 | The spec stage has already settled what the system should do. Do NOT ask questions about behaviors, boundaries, error conditions, or edge cases — those are for the spec skill. Focus exclusively on architecture, patterns, and technical trade-offs. |
| 20 | |
| 21 | If you discover a gap in the specs during the design conversation, surface it as a spec implication ("This decision means we need a new scenario in spec Y") rather than re-opening the requirement discussion. |
| 22 | |
| 23 | ## Checklist |
| 24 | |
| 25 | You MUST create a task for each of these items and complete them in order: |
| 26 | |
| 27 | 1. **Read all spec files** — read every file in the change's `specs/` directory before asking any architecture questions. Skip any you just wrote in this session. |
| 28 | 2. **Explore project context** — read the specific files, modules, and interfaces that the spec requirements will touch. Skip areas you already explored during earlier steps in this session. |
| 29 | 3. **Ask clarifying questions** — one at a time, about architecture, patterns, and technical trade-offs only |
| 30 | 4. **Track spec implications** — when an architectural decision reveals a new requirement or changes a scenario, note it |
| 31 | 5. **Propose 2-3 approaches** — with trade-offs and a recommendation |
| 32 | 6. **Present design** — in sections scaled to their complexity, get user approval after each section |
| 33 | 7. **Write the design document and apply spec edits** — write `design.md` in the change directory, then edit any spec files identified during the conversation |
| 34 | |
| 35 | ## Process Flow |
| 36 | |
| 37 | ```dot |
| 38 | digraph design { |
| 39 | "Read all spec files" [shape=box]; |
| 40 | "Explore project context" [shape=box]; |
| 41 | "Ask clarifying questions" [shape=box]; |
| 42 | "Propose 2-3 approaches" [shape=box]; |
| 43 | "Present design sections" [shape=box]; |
| 44 | "User approves design?" [shape=diamond]; |
| 45 | "Write design doc + apply spec edits" [shape=box]; |
| 46 | |
| 47 | "Read all spec files" -> "Explore project context"; |
| 48 | "Explore project context" -> "Ask clarifying questions"; |
| 49 | "Ask clarifying questions" -> "Propose 2-3 approaches"; |
| 50 | "Propose 2-3 approaches" -> "Present design sections"; |
| 51 | "Present design sections" -> "User approves design?"; |
| 52 | "User approves design?" -> "Present design sections" [label="no, revise"]; |
| 53 | "User approves design?" -> "Write design doc + apply spec edits" [label="yes"]; |
| 54 | } |
| 55 | ``` |
| 56 | |
| 57 | ## The Process |
| 58 | |
| 59 | **Reading the specs:** |
| 60 | - If specs were written earlier in this session, re-read only to confirm exact wording |
| 61 | - Otherwise, read all `specs/**/*.md` files in the change directory |
| 62 | - Understand the settled requirements and any `<!-- deferred-to-design: ... -->` markers |
| 63 | - Deferred markers are explicit invitations to complete or revise those scenarios once you have architectural context |
| 64 | |
| 65 | **Understanding the context:** |
| 66 | - Focus on the specific files, modules, and interfaces that the spec requirements will touch |
| 67 | - Skip areas you already explored in earlier steps of this session |
| 68 | - Use the spec files as the authoritative source of requirements |
| 69 | |
| 70 | **Asking clarifying questions:** |
| 71 | - Follow the `codagent:ask-questions` skill for how to ask questions (tool to use, batching strategy, question quality) |
| 72 | - Focus on: technical approach, architecture, patterns, trade-offs, constraints |
| 73 | - Prefer multiple-choice questions when possible, but open-ended is fine too |
| 74 | - Do NOT ask about what the system should do — that is settled in the specs |
| 75 | - Ask targeted architecture questions after reading specs and exploring relevant code, unless the specs and codebase make the implementation approach obvious and low-risk. Questions should cover choices th |