opencodekit 0.9.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/template/.opencode/AGENTS.md +116 -47
- package/dist/template/.opencode/agent/build.md +16 -48
- package/dist/template/.opencode/agent/explore.md +13 -34
- package/dist/template/.opencode/agent/planner.md +41 -11
- package/dist/template/.opencode/agent/review.md +2 -23
- package/dist/template/.opencode/agent/rush.md +24 -65
- package/dist/template/.opencode/agent/scout.md +5 -21
- package/dist/template/.opencode/agent/vision.md +0 -14
- package/dist/template/.opencode/command/accessibility-check.md +293 -30
- package/dist/template/.opencode/command/analyze-mockup.md +406 -20
- package/dist/template/.opencode/command/analyze-project.md +439 -30
- package/dist/template/.opencode/command/brainstorm.md +288 -5
- package/dist/template/.opencode/command/commit.md +226 -17
- package/dist/template/.opencode/command/create.md +138 -35
- package/dist/template/.opencode/command/design-audit.md +477 -29
- package/dist/template/.opencode/command/design.md +609 -6
- package/dist/template/.opencode/command/edit-image.md +223 -20
- package/dist/template/.opencode/command/finish.md +162 -71
- package/dist/template/.opencode/command/fix-ci.md +296 -24
- package/dist/template/.opencode/command/fix-types.md +345 -13
- package/dist/template/.opencode/command/fix-ui.md +293 -13
- package/dist/template/.opencode/command/fix.md +256 -9
- package/dist/template/.opencode/command/generate-diagram.md +327 -26
- package/dist/template/.opencode/command/generate-icon.md +266 -22
- package/dist/template/.opencode/command/generate-image.md +232 -12
- package/dist/template/.opencode/command/generate-pattern.md +234 -20
- package/dist/template/.opencode/command/generate-storyboard.md +231 -21
- package/dist/template/.opencode/command/handoff.md +202 -30
- package/dist/template/.opencode/command/implement.md +162 -50
- package/dist/template/.opencode/command/import-plan.md +247 -51
- package/dist/template/.opencode/command/init.md +154 -35
- package/dist/template/.opencode/command/integration-test.md +405 -24
- package/dist/template/.opencode/command/issue.md +171 -21
- package/dist/template/.opencode/command/new-feature.md +382 -54
- package/dist/template/.opencode/command/plan.md +144 -118
- package/dist/template/.opencode/command/pr.md +229 -28
- package/dist/template/.opencode/command/quick-build.md +234 -5
- package/dist/template/.opencode/command/research-and-implement.md +436 -12
- package/dist/template/.opencode/command/research-ui.md +444 -34
- package/dist/template/.opencode/command/research.md +173 -45
- package/dist/template/.opencode/command/restore-image.md +416 -22
- package/dist/template/.opencode/command/resume.md +439 -63
- package/dist/template/.opencode/command/revert-feature.md +341 -64
- package/dist/template/.opencode/command/review-codebase.md +193 -4
- package/dist/template/.opencode/command/skill-create.md +506 -14
- package/dist/template/.opencode/command/skill-optimize.md +487 -16
- package/dist/template/.opencode/command/status.md +320 -60
- package/dist/template/.opencode/command/summarize.md +374 -33
- package/dist/template/.opencode/command/triage.md +355 -0
- package/dist/template/.opencode/command/ui-review.md +292 -25
- package/dist/template/.opencode/plugin/README.md +110 -98
- package/dist/template/.opencode/plugin/compactor.ts +95 -171
- package/dist/template/.opencode/plugin/enforcer.ts +177 -127
- package/dist/template/.opencode/plugin/injector.ts +150 -0
- package/dist/template/.opencode/plugin/lib/notify.ts +86 -0
- package/dist/template/.opencode/plugin/notification.ts +57 -123
- package/dist/template/.opencode/plugin/truncator.ts +60 -166
- package/dist/template/.opencode/skill/mqdh/SKILL.md +161 -0
- package/dist/template/.opencode/skill/playwriter/SKILL.md +148 -0
- package/dist/template/.opencode/skill/v0/SKILL.md +154 -0
- package/package.json +1 -1
|
@@ -1,48 +1,349 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Generate technical diagrams, flowcharts,
|
|
3
|
-
argument-hint: "<description> [type
|
|
2
|
+
description: Generate technical diagrams, flowcharts, and visual documentation
|
|
3
|
+
argument-hint: "<description> [--type=<type>] [--style=<style>] [--format=<format>] [--from-code]"
|
|
4
4
|
agent: vision
|
|
5
5
|
model: proxypal/gemini-3-flash-preview
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Generate Diagram: $ARGUMENTS
|
|
9
9
|
|
|
10
|
-
Generate technical diagrams and visual documentation.
|
|
10
|
+
Generate technical diagrams and visual documentation with Mermaid code output.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Parse Arguments
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
| Argument | Default | Options |
|
|
15
|
+
| ------------- | --------- | ------------------------------- |
|
|
16
|
+
| Description | required | What the diagram shows |
|
|
17
|
+
| `--type` | flowchart | See diagram types below |
|
|
18
|
+
| `--style` | clean | clean, sketch, formal, colorful |
|
|
19
|
+
| `--format` | both | png, svg, mermaid, both |
|
|
20
|
+
| `--size` | medium | simple, medium, complex |
|
|
21
|
+
| `--from-code` | false | Analyze codebase to generate |
|
|
22
|
+
| `--colors` | default | Brand colors or preset |
|
|
15
23
|
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Diagram Types
|
|
27
|
+
|
|
28
|
+
| Type | Description | Best For |
|
|
29
|
+
| -------------- | ---------------------------------------- | ----------------------- |
|
|
30
|
+
| `flowchart` | Process flows, decision trees | Workflows, algorithms |
|
|
31
|
+
| `sequence` | Interaction sequences, API calls | System interactions |
|
|
32
|
+
| `architecture` | System components, infrastructure | High-level design |
|
|
33
|
+
| `erd` | Entity relationship diagrams | Database design |
|
|
34
|
+
| `class` | Class diagrams, inheritance | OOP design |
|
|
35
|
+
| `state` | State machines, transitions | UI states, workflows |
|
|
36
|
+
| `mindmap` | Hierarchical concepts | Brainstorming, planning |
|
|
37
|
+
| `gantt` | Timeline, project schedule | Project planning |
|
|
38
|
+
| `wireframe` | UI layouts, screen mockups | UX design |
|
|
39
|
+
| `network` | Network topology | Infrastructure |
|
|
40
|
+
| `c4` | C4 model (context, container, component) | Architecture docs |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Workflow: AI vs Mermaid-First
|
|
45
|
+
|
|
46
|
+
### Use AI Generation When:
|
|
47
|
+
|
|
48
|
+
- Creating wireframes or visual mockups
|
|
49
|
+
- Need artistic/sketch style
|
|
50
|
+
- Complex visual that Mermaid can't express
|
|
51
|
+
|
|
52
|
+
### Use Mermaid-First When:
|
|
53
|
+
|
|
54
|
+
- Technical diagrams (flowchart, sequence, erd, class)
|
|
55
|
+
- Need precise control over structure
|
|
56
|
+
- Will iterate on the diagram
|
|
57
|
+
- Need version-controlled diagrams
|
|
58
|
+
|
|
59
|
+
**Recommendation:** For technical diagrams, this command generates Mermaid code that you can edit and render.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Mermaid Syntax Reference
|
|
64
|
+
|
|
65
|
+
### Flowchart
|
|
66
|
+
|
|
67
|
+
```mermaid
|
|
68
|
+
flowchart TD
|
|
69
|
+
A[Start] --> B{Decision?}
|
|
70
|
+
B -->|Yes| C[Action 1]
|
|
71
|
+
B -->|No| D[Action 2]
|
|
72
|
+
C --> E[End]
|
|
73
|
+
D --> E
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Shapes:** `[Rectangle]` `(Rounded)` `{Diamond}` `([Stadium])` `[[Subroutine]]`
|
|
77
|
+
**Directions:** `TD` (top-down), `LR` (left-right), `BT`, `RL`
|
|
78
|
+
|
|
79
|
+
### Sequence Diagram
|
|
80
|
+
|
|
81
|
+
```mermaid
|
|
82
|
+
sequenceDiagram
|
|
83
|
+
participant U as User
|
|
84
|
+
participant A as API
|
|
85
|
+
participant D as Database
|
|
86
|
+
|
|
87
|
+
U->>A: POST /login
|
|
88
|
+
A->>D: Query user
|
|
89
|
+
D-->>A: User data
|
|
90
|
+
A-->>U: JWT token
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Arrows:** `->>` (solid), `-->>` (dashed), `-x` (cross), `-)` (async)
|
|
94
|
+
|
|
95
|
+
### Entity Relationship
|
|
18
96
|
|
|
19
|
-
|
|
97
|
+
```mermaid
|
|
98
|
+
erDiagram
|
|
99
|
+
USER ||--o{ ORDER : places
|
|
100
|
+
ORDER ||--|{ LINE_ITEM : contains
|
|
101
|
+
PRODUCT ||--o{ LINE_ITEM : includes
|
|
20
102
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
103
|
+
USER {
|
|
104
|
+
int id PK
|
|
105
|
+
string email
|
|
106
|
+
string name
|
|
107
|
+
}
|
|
108
|
+
```
|
|
26
109
|
|
|
27
|
-
|
|
110
|
+
**Cardinality:** `||` (one), `o{` (zero or more), `|{` (one or more)
|
|
28
111
|
|
|
29
|
-
|
|
112
|
+
### Class Diagram
|
|
30
113
|
|
|
31
|
-
|
|
32
|
-
|
|
114
|
+
```mermaid
|
|
115
|
+
classDiagram
|
|
116
|
+
class User {
|
|
117
|
+
+String email
|
|
118
|
+
+String name
|
|
119
|
+
+login()
|
|
120
|
+
+logout()
|
|
121
|
+
}
|
|
122
|
+
class Admin {
|
|
123
|
+
+deleteUser()
|
|
124
|
+
}
|
|
125
|
+
User <|-- Admin
|
|
126
|
+
```
|
|
33
127
|
|
|
34
|
-
|
|
128
|
+
**Relationships:** `<|--` (inheritance), `*--` (composition), `o--` (aggregation)
|
|
129
|
+
|
|
130
|
+
### State Diagram
|
|
131
|
+
|
|
132
|
+
```mermaid
|
|
133
|
+
stateDiagram-v2
|
|
134
|
+
[*] --> Idle
|
|
135
|
+
Idle --> Loading : fetch
|
|
136
|
+
Loading --> Success : resolve
|
|
137
|
+
Loading --> Error : reject
|
|
138
|
+
Success --> Idle : reset
|
|
139
|
+
Error --> Idle : retry
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Gantt Chart
|
|
143
|
+
|
|
144
|
+
```mermaid
|
|
145
|
+
gantt
|
|
146
|
+
title Project Timeline
|
|
147
|
+
dateFormat YYYY-MM-DD
|
|
148
|
+
section Phase 1
|
|
149
|
+
Design :a1, 2024-01-01, 2w
|
|
150
|
+
Development :a2, after a1, 4w
|
|
151
|
+
section Phase 2
|
|
152
|
+
Testing :a3, after a2, 2w
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Mindmap
|
|
156
|
+
|
|
157
|
+
```mermaid
|
|
158
|
+
mindmap
|
|
159
|
+
root((Project))
|
|
160
|
+
Frontend
|
|
161
|
+
React
|
|
162
|
+
Tailwind
|
|
163
|
+
Backend
|
|
164
|
+
Node.js
|
|
165
|
+
PostgreSQL
|
|
166
|
+
DevOps
|
|
167
|
+
Docker
|
|
168
|
+
AWS
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Style Options
|
|
174
|
+
|
|
175
|
+
| Style | Description | Use Case |
|
|
176
|
+
| ---------- | ----------------------- | ---------------------------- |
|
|
177
|
+
| `clean` | Minimal, professional | Documentation, presentations |
|
|
178
|
+
| `sketch` | Hand-drawn appearance | Informal, brainstorming |
|
|
179
|
+
| `formal` | Box borders, structured | Enterprise, technical docs |
|
|
180
|
+
| `colorful` | Vibrant, color-coded | Marketing, education |
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Codebase Integration (--from-code)
|
|
185
|
+
|
|
186
|
+
Analyze actual code to generate diagrams:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Generate architecture from imports
|
|
190
|
+
/generate-diagram system architecture --from-code --type=architecture
|
|
191
|
+
|
|
192
|
+
# Generate ERD from models
|
|
193
|
+
/generate-diagram database schema --from-code --type=erd
|
|
194
|
+
|
|
195
|
+
# Generate class diagram from TypeScript
|
|
196
|
+
/generate-diagram class relationships --from-code --type=class
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**How it works:**
|
|
200
|
+
|
|
201
|
+
1. Scans relevant source files
|
|
202
|
+
2. Extracts structure (classes, functions, imports)
|
|
203
|
+
3. Generates Mermaid code representing actual codebase
|
|
204
|
+
4. Renders as diagram
|
|
205
|
+
|
|
206
|
+
---
|
|
35
207
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
208
|
+
## Examples by Type
|
|
209
|
+
|
|
210
|
+
### Flowchart
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# User authentication flow
|
|
214
|
+
/generate-diagram user login process with email verification --type=flowchart
|
|
215
|
+
|
|
216
|
+
# Algorithm
|
|
217
|
+
/generate-diagram binary search algorithm --type=flowchart --style=clean
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Sequence Diagram
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# API flow
|
|
224
|
+
/generate-diagram OAuth2 authentication flow between client, auth server, and resource server --type=sequence
|
|
225
|
+
|
|
226
|
+
# Microservice communication
|
|
227
|
+
/generate-diagram order processing across payment, inventory, and shipping services --type=sequence
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Architecture
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# System overview
|
|
234
|
+
/generate-diagram e-commerce platform with React frontend, Node API, and PostgreSQL --type=architecture
|
|
235
|
+
|
|
236
|
+
# Cloud infrastructure
|
|
237
|
+
/generate-diagram AWS deployment with ECS, RDS, and CloudFront --type=architecture --style=formal
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### ERD
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Database schema
|
|
244
|
+
/generate-diagram user management system with users, roles, and permissions --type=erd
|
|
245
|
+
|
|
246
|
+
# E-commerce
|
|
247
|
+
/generate-diagram product catalog with categories, variants, and inventory --type=erd
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### State Diagram
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
# UI states
|
|
254
|
+
/generate-diagram form submission states from idle to loading to success or error --type=state
|
|
255
|
+
|
|
256
|
+
# Order lifecycle
|
|
257
|
+
/generate-diagram order status from pending through processing, shipped, delivered --type=state
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Size/Complexity Guidance
|
|
263
|
+
|
|
264
|
+
| Size | Elements | Description |
|
|
265
|
+
| --------- | ---------- | ---------------------------- |
|
|
266
|
+
| `simple` | 3-5 nodes | Quick sketch, single concept |
|
|
267
|
+
| `medium` | 6-12 nodes | Standard documentation |
|
|
268
|
+
| `complex` | 13+ nodes | Comprehensive system view |
|
|
269
|
+
|
|
270
|
+
**Tip:** Start simple, iterate to add detail.
|
|
271
|
+
|
|
272
|
+
---
|
|
40
273
|
|
|
41
274
|
## Output
|
|
42
275
|
|
|
43
|
-
|
|
276
|
+
### File Structure
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
.opencode/memory/design/diagrams/[name]/
|
|
280
|
+
├── diagram.png # Rendered image
|
|
281
|
+
├── diagram.svg # Vector version
|
|
282
|
+
├── diagram.mmd # Mermaid source code
|
|
283
|
+
└── README.md # Usage notes
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Inline Output
|
|
287
|
+
|
|
288
|
+
```markdown
|
|
289
|
+
## Generated Diagram
|
|
290
|
+
|
|
291
|
+
**Type:** sequence
|
|
292
|
+
**Description:** User authentication flow
|
|
293
|
+
|
|
294
|
+
### Mermaid Code
|
|
295
|
+
|
|
296
|
+
\`\`\`mermaid
|
|
297
|
+
sequenceDiagram
|
|
298
|
+
User->>Auth: Login request
|
|
299
|
+
Auth->>DB: Validate credentials
|
|
300
|
+
DB-->>Auth: User data
|
|
301
|
+
Auth-->>User: JWT token
|
|
302
|
+
\`\`\`
|
|
303
|
+
|
|
304
|
+
### Rendered
|
|
305
|
+
|
|
306
|
+
[PNG/SVG image displayed]
|
|
307
|
+
|
|
308
|
+
### Usage
|
|
309
|
+
|
|
310
|
+
- Embed in GitHub markdown (supports Mermaid natively)
|
|
311
|
+
- Use Mermaid Live Editor for modifications
|
|
312
|
+
- Export to PNG/SVG for presentations
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Rendering Options
|
|
318
|
+
|
|
319
|
+
| Platform | Mermaid Support |
|
|
320
|
+
| ------------ | -------------------- |
|
|
321
|
+
| GitHub | Native in markdown |
|
|
322
|
+
| GitLab | Native in markdown |
|
|
323
|
+
| Notion | Via code block |
|
|
324
|
+
| Confluence | Via plugin |
|
|
325
|
+
| VS Code | Via extension |
|
|
326
|
+
| Mermaid Live | https://mermaid.live |
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## Limitations
|
|
331
|
+
|
|
332
|
+
| Limitation | Workaround |
|
|
333
|
+
| ------------------- | --------------------------------------------------- |
|
|
334
|
+
| Very large diagrams | Break into multiple smaller diagrams |
|
|
335
|
+
| Custom icons | Use external tool, embed as image |
|
|
336
|
+
| Precise positioning | Mermaid auto-layouts; use external tool for control |
|
|
337
|
+
| Complex styling | Basic theming only; export SVG for advanced styling |
|
|
338
|
+
| Wireframes | AI-generated image better than Mermaid |
|
|
339
|
+
|
|
340
|
+
---
|
|
44
341
|
|
|
45
|
-
|
|
46
|
-
- Mermaid code file (.mmd)
|
|
342
|
+
## Related Commands
|
|
47
343
|
|
|
48
|
-
|
|
344
|
+
| Need | Command |
|
|
345
|
+
| -------------------- | ------------------ |
|
|
346
|
+
| Analyze mockup | `/analyze-mockup` |
|
|
347
|
+
| Generate image | `/generate-image` |
|
|
348
|
+
| Review architecture | `/review-codebase` |
|
|
349
|
+
| Create documentation | `/summarize` |
|
|
@@ -1,40 +1,284 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Generate app icons in multiple sizes
|
|
3
|
-
argument-hint: "<description> [platform
|
|
2
|
+
description: Generate app icons in multiple sizes with platform optimization
|
|
3
|
+
argument-hint: "<description> [--platform=<ios|android|web|all>] [--style=<style>] [--shape=<shape>] [--color=<hex>] [--dark]"
|
|
4
4
|
agent: vision
|
|
5
5
|
model: proxypal/gemini-3-pro-image-preview
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Generate Icon: $ARGUMENTS
|
|
9
9
|
|
|
10
|
-
Generate app icons optimized for different platforms.
|
|
10
|
+
Generate app icons optimized for different platforms and sizes.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Parse Arguments
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
| Argument | Default | Options |
|
|
15
|
+
| ------------ | -------- | --------------------------------- |
|
|
16
|
+
| Description | required | What the icon should depict |
|
|
17
|
+
| `--platform` | all | ios, android, web, all |
|
|
18
|
+
| `--style` | minimal | See style presets below |
|
|
19
|
+
| `--shape` | squircle | square, rounded, squircle, circle |
|
|
20
|
+
| `--color` | none | Brand color hex (e.g., `#0066CC`) |
|
|
21
|
+
| `--bg` | solid | solid, gradient, transparent |
|
|
22
|
+
| `--dark` | false | Generate dark mode variant |
|
|
15
23
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Style Presets
|
|
27
|
+
|
|
28
|
+
| Style | Description | Best For |
|
|
29
|
+
| --------------- | -------------------------------------- | -------------------------- |
|
|
30
|
+
| `minimal` | Simple shapes, 1-2 colors, clean lines | Professional, utility apps |
|
|
31
|
+
| `flat` | Solid colors, no shadows, 2D | Modern, clean aesthetic |
|
|
32
|
+
| `3d` | Depth, gradients, subtle shadows | Games, premium apps |
|
|
33
|
+
| `glassmorphism` | Frosted glass effect, transparency | Modern iOS, premium |
|
|
34
|
+
| `neumorphism` | Soft shadows, raised/pressed effect | Unique, tactile feel |
|
|
35
|
+
| `gradient` | Bold color gradients | Social, creative apps |
|
|
36
|
+
| `outlined` | Line art, stroke-based | Technical, developer tools |
|
|
37
|
+
| `duotone` | Two-color design | Bold, striking |
|
|
38
|
+
| `isometric` | 3D isometric view | Productivity, games |
|
|
39
|
+
| `cartoon` | Playful, illustrated style | Kids, casual games |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Shape Options
|
|
44
|
+
|
|
45
|
+
| Shape | Platform Default | Description |
|
|
46
|
+
| ---------- | ---------------- | ------------------------------------- |
|
|
47
|
+
| `squircle` | iOS | Superellipse (Apple's rounded square) |
|
|
48
|
+
| `circle` | Android (some) | Perfect circle |
|
|
49
|
+
| `rounded` | Android | Rounded corners (customizable radius) |
|
|
50
|
+
| `square` | Web favicon | Sharp corners |
|
|
51
|
+
|
|
52
|
+
**Note:** Generate at highest resolution; platforms apply their own masks.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Platform Sizes
|
|
57
|
+
|
|
58
|
+
### iOS
|
|
59
|
+
|
|
60
|
+
| Size | Usage |
|
|
61
|
+
| --------- | ---------- |
|
|
62
|
+
| 1024x1024 | App Store |
|
|
63
|
+
| 180x180 | iPhone @3x |
|
|
64
|
+
| 120x120 | iPhone @2x |
|
|
65
|
+
| 167x167 | iPad Pro |
|
|
66
|
+
| 152x152 | iPad @2x |
|
|
67
|
+
| 76x76 | iPad @1x |
|
|
68
|
+
|
|
69
|
+
**Output:** `AppIcon.appiconset/` with `Contents.json`
|
|
70
|
+
|
|
71
|
+
### Android
|
|
72
|
+
|
|
73
|
+
| Size | Density | Usage |
|
|
74
|
+
| ------- | ---------- | ------------- |
|
|
75
|
+
| 512x512 | Play Store | Store listing |
|
|
76
|
+
| 192x192 | xxxhdpi | Launcher |
|
|
77
|
+
| 144x144 | xxhdpi | Launcher |
|
|
78
|
+
| 96x96 | xhdpi | Launcher |
|
|
79
|
+
| 72x72 | hdpi | Launcher |
|
|
80
|
+
| 48x48 | mdpi | Launcher |
|
|
81
|
+
|
|
82
|
+
**Adaptive Icons (Android 8+):**
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
res/
|
|
86
|
+
├── mipmap-anydpi-v26/
|
|
87
|
+
│ └── ic_launcher.xml # References layers
|
|
88
|
+
├── drawable/
|
|
89
|
+
│ ├── ic_launcher_foreground.xml # 108dp, icon centered in 72dp
|
|
90
|
+
│ └── ic_launcher_background.xml # Solid color or gradient
|
|
91
|
+
```
|
|
19
92
|
|
|
20
|
-
|
|
93
|
+
### Web
|
|
21
94
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
95
|
+
| File | Size | Usage |
|
|
96
|
+
| -------------------------- | ------------------- | ------------------ |
|
|
97
|
+
| favicon.ico | 16x16, 32x32, 48x48 | Browser tab |
|
|
98
|
+
| favicon-16x16.png | 16x16 | Small favicon |
|
|
99
|
+
| favicon-32x32.png | 32x32 | Standard favicon |
|
|
100
|
+
| apple-touch-icon.png | 180x180 | iOS bookmark |
|
|
101
|
+
| android-chrome-192x192.png | 192x192 | Android PWA |
|
|
102
|
+
| android-chrome-512x512.png | 512x512 | Android PWA splash |
|
|
25
103
|
|
|
26
|
-
|
|
104
|
+
**Output:** `site.webmanifest` included
|
|
27
105
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Brand Color Integration
|
|
109
|
+
|
|
110
|
+
Use `--color` to specify brand colors:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
/generate-icon cloud storage app --color=#0066CC --style=minimal
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
The AI will:
|
|
117
|
+
|
|
118
|
+
- Use specified color as primary
|
|
119
|
+
- Generate complementary accents
|
|
120
|
+
- Ensure contrast for visibility
|
|
121
|
+
|
|
122
|
+
**Multiple colors:**
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
/generate-icon social app --color=#FF5722,#4CAF50 --style=gradient
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Dark Mode Variants
|
|
131
|
+
|
|
132
|
+
Use `--dark` to generate both light and dark variants:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
/generate-icon productivity app --dark
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Output:**
|
|
31
139
|
|
|
32
|
-
|
|
140
|
+
```
|
|
141
|
+
icons/
|
|
142
|
+
├── icon-light.png # Light mode (default)
|
|
143
|
+
├── icon-dark.png # Dark mode variant
|
|
144
|
+
└── icon-tinted.png # iOS tinted icon (optional)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**iOS Tinted Icons (iOS 18+):**
|
|
148
|
+
|
|
149
|
+
- Monochrome version for tinted appearance
|
|
150
|
+
- Automatically adapts to user's chosen tint color
|
|
151
|
+
|
|
152
|
+
---
|
|
33
153
|
|
|
34
|
-
|
|
154
|
+
## Icon Design Principles
|
|
155
|
+
|
|
156
|
+
### Do
|
|
157
|
+
|
|
158
|
+
- **Simple shape**: Recognizable at 16x16
|
|
159
|
+
- **Single focal point**: One main element
|
|
160
|
+
- **Bold colors**: Stand out on any wallpaper
|
|
161
|
+
- **Unique silhouette**: Distinguishable from other apps
|
|
162
|
+
- **Consistent style**: Match your app's aesthetic
|
|
163
|
+
|
|
164
|
+
### Don't
|
|
165
|
+
|
|
166
|
+
- **Text**: Illegible at small sizes (except single letter logos)
|
|
167
|
+
- **Photos**: Don't scale well
|
|
168
|
+
- **Too much detail**: Lost at small sizes
|
|
169
|
+
- **Thin lines**: Disappear at low resolution
|
|
170
|
+
- **Similar to system icons**: Avoid confusion
|
|
171
|
+
|
|
172
|
+
### The Squint Test
|
|
173
|
+
|
|
174
|
+
If you squint at your icon and can still identify it, it's good.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Examples
|
|
179
|
+
|
|
180
|
+
### Utility/Productivity
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
# Cloud storage
|
|
184
|
+
/generate-icon cloud with upward arrow, simple --style=minimal --color=#2196F3 --platform=all
|
|
185
|
+
|
|
186
|
+
# Notes app
|
|
187
|
+
/generate-icon pencil on notepad, clean lines --style=flat --color=#FFC107
|
|
188
|
+
|
|
189
|
+
# Calculator
|
|
190
|
+
/generate-icon calculator with equals sign --style=outlined --color=#607D8B
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Social/Creative
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Social app
|
|
197
|
+
/generate-icon chat bubble with heart --style=gradient --color=#E91E63,#9C27B0
|
|
198
|
+
|
|
199
|
+
# Photo editor
|
|
200
|
+
/generate-icon camera lens with rainbow gradient --style=glassmorphism
|
|
201
|
+
|
|
202
|
+
# Music app
|
|
203
|
+
/generate-icon musical note, vibrant --style=3d --color=#1DB954
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Games
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Casual game
|
|
210
|
+
/generate-icon smiling star character --style=cartoon --color=#FFEB3B
|
|
211
|
+
|
|
212
|
+
# Strategy game
|
|
213
|
+
/generate-icon shield with sword --style=3d --color=#8B4513
|
|
214
|
+
|
|
215
|
+
# Puzzle game
|
|
216
|
+
/generate-icon interlocking puzzle pieces --style=isometric --color=#00BCD4
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Developer Tools
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
# Code editor
|
|
223
|
+
/generate-icon angle brackets with cursor --style=outlined --color=#21252B
|
|
224
|
+
|
|
225
|
+
# Terminal
|
|
226
|
+
/generate-icon command prompt symbol --style=minimal --color=#282C34 --dark
|
|
227
|
+
|
|
228
|
+
# API tool
|
|
229
|
+
/generate-icon connected nodes --style=duotone --color=#6200EE
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Output Structure
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
.opencode/memory/design/icons/[app-name]/
|
|
238
|
+
├── ios/
|
|
239
|
+
│ └── AppIcon.appiconset/
|
|
240
|
+
│ ├── Contents.json
|
|
241
|
+
│ ├── icon-1024.png
|
|
242
|
+
│ ├── icon-180.png
|
|
243
|
+
│ └── ...
|
|
244
|
+
├── android/
|
|
245
|
+
│ ├── play-store-512.png
|
|
246
|
+
│ ├── res/
|
|
247
|
+
│ │ ├── mipmap-xxxhdpi/
|
|
248
|
+
│ │ ├── mipmap-xxhdpi/
|
|
249
|
+
│ │ └── ...
|
|
250
|
+
│ └── adaptive/
|
|
251
|
+
│ ├── foreground.png
|
|
252
|
+
│ └── background.png
|
|
253
|
+
├── web/
|
|
254
|
+
│ ├── favicon.ico
|
|
255
|
+
│ ├── favicon-32x32.png
|
|
256
|
+
│ ├── apple-touch-icon.png
|
|
257
|
+
│ └── site.webmanifest
|
|
258
|
+
├── master-1024.png # Source file
|
|
259
|
+
└── dark/ # If --dark specified
|
|
260
|
+
├── master-1024.png
|
|
261
|
+
└── ...
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Limitations
|
|
267
|
+
|
|
268
|
+
| Limitation | Workaround |
|
|
269
|
+
| ---------------------- | ------------------------------------------------ |
|
|
270
|
+
| Text rendering | Use single letter or add text in post-processing |
|
|
271
|
+
| Exact brand logos | Provide reference image with `/edit-image` |
|
|
272
|
+
| Complex illustrations | Generate simplified version, refine manually |
|
|
273
|
+
| Precise color matching | Specify exact hex with `--color` |
|
|
274
|
+
|
|
275
|
+
---
|
|
35
276
|
|
|
36
|
-
|
|
37
|
-
- All platform-specific sizes
|
|
38
|
-
- Include manifest.json for web
|
|
277
|
+
## Related Commands
|
|
39
278
|
|
|
40
|
-
|
|
279
|
+
| Need | Command |
|
|
280
|
+
| --------------------- | ------------------- |
|
|
281
|
+
| Edit generated icon | `/edit-image` |
|
|
282
|
+
| Generate full image | `/generate-image` |
|
|
283
|
+
| Create pattern | `/generate-pattern` |
|
|
284
|
+
| Analyze existing icon | `/analyze-mockup` |
|