···1818 "git show*": allow
1919 skill:
2020 "software-architecture": allow
2121- "planning": allow
2121+ "decision-framework": allow
2222+ "mermaid-diagram-writing": allow
2223---
23242425You are the **Code Designer**. You produce high-level design documents. You MUST NOT implement code.
+1-1
modules/opencode/skills/debugging/SKILL.md
···11---
22name: debugging
33-description: Load when debugging failures, errors, crashes, or unexpected behavior. Emphasizes empirical investigation over code reasoning.
33+description: Load when debugging failures, errors, crashes, or unexpected behavior. Triggers: "bug", "broken", "not working", "error", "crash", "failing test", "investigate", "debug". Emphasizes empirical investigation over code reasoning.
44---
5566# Debugging Protocol
···11+---
22+name: decision-framework
33+description: Load BEFORE implementing when you need to explore alternatives, surface blind spots, or produce a decision document. Triggers: "help me decide", "what are the options", "tradeoffs", "RFC", "design doc", "before I build this", "not sure which approach".
44+---
55+66+## Your Role
77+88+You are a thinking partner. Your job is to expand the user's understanding—not to produce a plan, but to help them see the full picture before they commit. Ask questions. Surface blind spots. Challenge assumptions.
99+1010+## Workflow
1111+1212+### 1. Explore the Problem Space
1313+1414+You MUST NOT accept the first framing—the first interpretation is often incomplete or biased. Probe deeper.
1515+1616+- What's the **real** problem here? (vs symptom, vs proposed solution)
1717+- Who is affected? What are their actual needs?
1818+- What constraints are real vs assumed?
1919+- What would "good enough" look like?
2020+2121+**Use targeted questions, not suggestions:**
2222+- "Have you considered X?" not "You should do X"
2323+- "What happens when Y?" not "Y will break"
2424+- "Why this approach over Z?" not "Z is better"
2525+2626+### 2. Surface Alternatives
2727+2828+The user's first idea is rarely the only one. You MUST find others.
2929+3030+- What's the **simplest** thing that could work?
3131+- What's the most **flexible**? **Fastest to ship**? **Easiest to undo**?
3232+- How would someone with a different background approach this?
3333+- What would you do if you had **half the time**? **Twice the time**?
3434+3535+### 3. Find the Blind Spots
3636+3737+You MUST identify what the user isn't thinking about.
3838+3939+- What dependencies does this touch that haven't been mentioned?
4040+- What breaks if this goes wrong? **How badly?**
4141+- What edge cases or failure modes are being overlooked?
4242+- What does this look like at **10x scale**?
4343+4444+### 4. Make Tradeoffs Visible
4545+4646+You MUST help the user see what they're trading.
4747+4848+- What's being **optimized for**? What's being **sacrificed**?
4949+- What becomes **harder** after this change?
5050+- What **doors does this close**? Which does it **open**?
5151+- Is this **reversible**? How expensive is **rollback**?
5252+5353+### 5. Produce a Decision Document
5454+5555+When analysis is complete, synthesize findings into an RFC-style document.
5656+5757+**Structure:**
5858+```markdown
5959+## Title
6060+6161+---
6262+6363+### Status
6464+6565+**Accepted** | Proposed | Deprecated
6666+6767+---
6868+6969+### Background
7070+7171+Context and motivation. Link to related issues/tickets.
7272+7373+---
7474+7575+### Problem Statement
7676+7777+What specific problem does this solve?
7878+7979+---
8080+8181+### Decision Table
8282+8383+| Decision | Choice | Rationale |
8484+|----------|--------|-----------|
8585+8686+---
8787+8888+### Implementation
8989+9090+Code references, API contracts, sequence diagrams if helpful.
9191+9292+---
9393+9494+### Acceptance Criteria
9595+9696+- [ ] Criteria 1
9797+- [ ] Criteria 2
9898+9999+---
100100+101101+### Unresolved
102102+103103+| Question | Owner |
104104+|----------|-------|
105105+| Open question | Team |
106106+107107+---
108108+109109+### References
110110+111111+- Related documents
112112+- Code links (use full GitHub URLs)
113113+```
114114+115115+## Proactive Skill Loading
116116+117117+Before diving into analysis, check if the problem domain matches a known skill and load it:
118118+119119+| Problem Type | Skill to Load |
120120+|--------------|---------------|
121121+| Software architecture, refactoring, adding abstractions | `software-architecture` |
122122+| Debugging failures, errors, crashes | `debugging` |
123123+124124+## Know When to Stop
125125+126126+The goal is understanding, not endless analysis. You're done when:
127127+128128+- The user can explain the problem clearly
129129+- Major alternatives have been explored
130130+- Tradeoffs are explicit and accepted
131131+- Unknowns are identified and owned
132132+133133+Then the user decides. Your job is to make that decision informed.
···11+---
22+name: mermaid-diagram-writing
33+description: Load when writing ANY Mermaid diagram. Triggers: "sequence diagram", "flowchart", "visualize the flow", "draw the architecture", "show me how X works", "diagram", "mermaid".
44+---
55+66+# Mermaid Diagram Writing
77+88+## Core Rules
99+1010+### 1. Keep Diagrams Simple
1111+1212+Avoid colored rectangles and complex styling. Use `theme: base` or let renderers use their default minimal style.
1313+1414+### 2. Prefer Many Small Diagrams Over One Big Diagram
1515+1616+**Bad** - One large diagram trying to show everything:
1717+```mermaid
1818+sequenceDiagram
1919+ participant A
2020+ participant B
2121+ participant C
2222+ participant D
2323+ participant E
2424+ A->>B: 1
2525+ B->>C: 2
2626+ C->>D: 3
2727+ D->>E: 4
2828+ -- lots more steps --
2929+```
3030+3131+**Good** - Multiple focused diagrams:
3232+```mermaid
3333+sequenceDiagram
3434+ participant FE
3535+ participant BE
3636+ FE->>BE: Request
3737+ BE-->>FE: Response
3838+```
3939+4040+### 3. Diagram Scope Guidelines
4141+4242+- **Max 4-5 participants** per diagram
4343+- **Max 10-15 messages** per sequence diagram
4444+- Each diagram should tell one coherent story
4545+4646+### 4. Participant Naming
4747+4848+- Use short, clear names: `FE`, `BE`, `DB`, `Provider`, `User`
4949+- Avoid: `FrontendApplication`, `BackendService`
5050+5151+### 5. Use Structured Flow Control
5252+5353+Leverage `alt`/`else`, `loop`, and `opt`:
5454+5555+```mermaid
5656+sequenceDiagram
5757+ participant FE
5858+ participant BE
5959+ FE->>BE: Request
6060+ alt Success
6161+ BE-->>FE: 200 OK
6262+ else Error
6363+ BE-->>FE: 400 Error
6464+ end
6565+```
6666+6767+### 6. Consistent Message Patterns
6868+6969+- **Queries**: `Source->>Target: Action`
7070+- **Responses**: `Target-->>Source: Result`
7171+7272+### 7. Label Everything
7373+7474+- Always label `alt`/`else` blocks
7575+- Include status codes when relevant
7676+7777+## Common Patterns
7878+7979+### API Endpoint
8080+```mermaid
8181+sequenceDiagram
8282+ participant Client
8383+ participant Server
8484+ participant DB
8585+ Client->>Server: POST /resource
8686+ Server->>DB: Insert
8787+ DB-->>Server: Result
8888+ Server-->>Client: 201 Created
8989+```
9090+9191+### Error Handling
9292+```mermaid
9393+sequenceDiagram
9494+ participant FE
9595+ participant BE
9696+ FE->>BE: Request
9797+ alt Valid
9898+ BE-->>FE: Success
9999+ else Invalid
100100+ BE-->>FE: 400 Error
101101+ end
102102+```
103103+104104+### Conditional Flow
105105+```mermaid
106106+sequenceDiagram
107107+ participant FE
108108+ participant BE
109109+ participant Provider
110110+ FE->>BE: Check status
111111+ BE->>Provider: Verify
112112+ alt Exists
113113+ Provider-->>BE: found
114114+ BE-->>FE: { status: active }
115115+ else Not Found
116116+ Provider-->>BE: not found
117117+ BE-->>FE: { status: deleted }
118118+ end
119119+```
120120+121121+## When to Split
122122+123123+- More than 5 participants
124124+- More than 15 messages
125125+- Multiple unrelated flows mixed together
-63
modules/opencode/skills/planning/SKILL.md
···11----
22-name: planning
33-description: Load when designing solutions, planning features, or before significant work. Ensures thorough understanding and explicit tradeoffs.
44----
55-66-## Your Role
77-88-You are a thinking partner. Your job is to expand the user's understanding—not to produce a plan, but to help them see the full picture before they commit. Ask questions. Surface blind spots. Challenge assumptions.
99-1010-## Explore the Problem Space
1111-1212-You MUST NOT accept the first framing—the first interpretation is often incomplete or biased. Probe deeper.
1313-1414-- What's the real problem here? (vs symptom, vs proposed solution)
1515-- Who is affected? What are their actual needs?
1616-- What constraints are real vs assumed?
1717-- What would "good enough" look like?
1818-1919-## Surface Alternatives
2020-2121-The user's first idea is rarely the only one. You MUST find others.
2222-2323-- What's the simplest thing that could work?
2424-- What's the most flexible? Fastest to ship? Easiest to undo?
2525-- How would someone with a different background approach this?
2626-- What would you do if you had half the time? Twice the time?
2727-2828-## Find the Blind Spots
2929-3030-You MUST identify what the user isn't thinking about.
3131-3232-- What dependencies does this touch that haven't been mentioned?
3333-- What breaks if this goes wrong? How badly?
3434-- What edge cases or failure modes are being overlooked?
3535-- What does this look like at 10x scale?
3636-3737-## Make Tradeoffs Visible
3838-3939-You MUST help the user see what they're trading.
4040-4141-- What's being optimized for? What's being sacrificed?
4242-- What becomes harder after this change?
4343-- What doors does this close? Which does it open?
4444-- Is this reversible? How expensive is rollback?
4545-4646-## Ask, Don't Assume
4747-4848-You MUST prefer questions over suggestions.
4949-5050-- "Have you considered X?" not "You should do X"
5151-- "What happens when Y?" not "Y will break"
5252-- "Why this approach over Z?" not "Z is better"
5353-5454-## Know When to Stop
5555-5656-The goal is understanding, not endless analysis. You're done when:
5757-5858-- The user can explain the problem clearly
5959-- Major alternatives have been explored
6060-- Tradeoffs are explicit and accepted
6161-- Unknowns are identified and owned
6262-6363-Then the user decides. Your job is to make that decision informed.
···11---
22name: software-architecture
33-description: Load BEFORE implementing new features, refactoring, adding abstractions, writing RFCs/architecture docs, or any non-trivial code changes. Skip for simple bugfixes, typo fixes, or one-liners.
33+description: Load BEFORE any non-trivial code: new features, refactoring, adding abstractions. Triggers: "implement", "refactor", "add a layer", "design the API", "before I code this". Skip for one-liners and typo fixes.
44---
5566## Deep Modules