opencodekit 0.3.3 → 0.5.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 +10 -1
- package/dist/template/.opencode/AGENTS.md +78 -55
- package/dist/template/.opencode/agent/build.md +20 -0
- package/dist/template/.opencode/agent/rush.md +27 -15
- package/dist/template/.opencode/agent/vision.md +95 -60
- package/dist/template/.opencode/command/accessibility-check.md +66 -0
- package/dist/template/.opencode/command/analyze-mockup.md +43 -0
- package/dist/template/.opencode/command/design-audit.md +53 -0
- package/dist/template/.opencode/command/edit-image.md +40 -0
- package/dist/template/.opencode/command/generate-diagram.md +48 -0
- package/dist/template/.opencode/command/generate-icon.md +40 -0
- package/dist/template/.opencode/command/generate-image.md +27 -0
- package/dist/template/.opencode/command/generate-pattern.md +41 -0
- package/dist/template/.opencode/command/generate-storyboard.md +41 -0
- package/dist/template/.opencode/command/init.md +176 -0
- package/dist/template/.opencode/command/new-feature.md +137 -0
- package/dist/template/.opencode/command/research-ui.md +34 -27
- package/dist/template/.opencode/command/restore-image.md +39 -0
- package/dist/template/.opencode/command/revert-feature.md +127 -0
- package/dist/template/.opencode/command/ui-review.md +26 -34
- package/dist/template/.opencode/memory/project/README.md +59 -0
- package/dist/template/.opencode/memory/project/architecture.md +26 -0
- package/dist/template/.opencode/memory/project/commands.md +26 -0
- package/dist/template/.opencode/memory/project/conventions.md +26 -0
- package/dist/template/.opencode/memory/project/gotchas.md +26 -0
- package/dist/template/.opencode/memory/user.example.md +21 -0
- package/dist/template/.opencode/memory/user.md +21 -0
- package/dist/template/.opencode/opencode.json +475 -457
- package/dist/template/.opencode/package.json +1 -2
- package/dist/template/.opencode/skills/accessibility-audit/SKILL.md +180 -0
- package/dist/template/.opencode/skills/design-system-audit/SKILL.md +141 -0
- package/dist/template/.opencode/skills/frontend-aesthetics/SKILL.md +40 -65
- package/dist/template/.opencode/skills/mockup-to-code/SKILL.md +158 -0
- package/dist/template/.opencode/skills/ui-ux-research/SKILL.md +60 -131
- package/dist/template/.opencode/skills/visual-analysis/SKILL.md +130 -0
- package/package.json +1 -1
|
@@ -11,10 +11,9 @@
|
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@opencode-ai/plugin": "1.0.
|
|
14
|
+
"@opencode-ai/plugin": "1.0.180"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
18
17
|
"@types/node": "^20.19.27",
|
|
19
18
|
"fs": "^0.0.1-security",
|
|
20
19
|
"path": "^0.12.7",
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Accessibility Audit Skill
|
|
2
|
+
|
|
3
|
+
Audit UI accessibility against WCAG 2.1/2.2 guidelines.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Reviewing UI components for accessibility compliance
|
|
8
|
+
- Auditing pages for WCAG conformance
|
|
9
|
+
- Identifying keyboard navigation issues
|
|
10
|
+
- Checking color contrast
|
|
11
|
+
- Pre-launch accessibility verification
|
|
12
|
+
|
|
13
|
+
## Core Workflow
|
|
14
|
+
|
|
15
|
+
### Phase 1: Visual Accessibility Analysis
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Perform a comprehensive accessibility audit:
|
|
19
|
+
|
|
20
|
+
1. COLOR CONTRAST
|
|
21
|
+
- Check text/background contrast ratios
|
|
22
|
+
- WCAG AA: 4.5:1 normal text, 3:1 large text
|
|
23
|
+
- Identify failing elements
|
|
24
|
+
|
|
25
|
+
2. VISUAL HIERARCHY
|
|
26
|
+
- Heading structure (logical H1-H6)
|
|
27
|
+
- Visual grouping of related elements
|
|
28
|
+
- Touch targets (44x44px minimum)
|
|
29
|
+
|
|
30
|
+
3. CONTENT ACCESSIBILITY
|
|
31
|
+
- Images needing alt text
|
|
32
|
+
- Icons without text labels
|
|
33
|
+
- Color-only information
|
|
34
|
+
|
|
35
|
+
4. INTERACTIVE ELEMENTS
|
|
36
|
+
- Buttons/links with unclear purpose
|
|
37
|
+
- Form fields without labels
|
|
38
|
+
- Missing error states
|
|
39
|
+
|
|
40
|
+
5. MOTION
|
|
41
|
+
- Auto-playing content
|
|
42
|
+
- Potential vestibular triggers
|
|
43
|
+
|
|
44
|
+
Provide WCAG criterion references for each issue.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Phase 2: Component Checklist
|
|
48
|
+
|
|
49
|
+
For each interactive component:
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
## Component: [Name]
|
|
53
|
+
|
|
54
|
+
### Keyboard Navigation
|
|
55
|
+
|
|
56
|
+
- [ ] Focusable with Tab
|
|
57
|
+
- [ ] Visible focus indicator
|
|
58
|
+
- [ ] Operable with Enter/Space
|
|
59
|
+
- [ ] Escape closes modals
|
|
60
|
+
- [ ] Arrow keys for menus
|
|
61
|
+
|
|
62
|
+
### Screen Reader
|
|
63
|
+
|
|
64
|
+
- [ ] Meaningful accessible name
|
|
65
|
+
- [ ] Role announced correctly
|
|
66
|
+
- [ ] State changes announced
|
|
67
|
+
- [ ] Errors associated with inputs
|
|
68
|
+
|
|
69
|
+
### Visual
|
|
70
|
+
|
|
71
|
+
- [ ] 4.5:1 contrast ratio (text)
|
|
72
|
+
- [ ] 3:1 contrast ratio (UI)
|
|
73
|
+
- [ ] 44x44px touch targets
|
|
74
|
+
- [ ] No color-only information
|
|
75
|
+
|
|
76
|
+
### Motion
|
|
77
|
+
|
|
78
|
+
- [ ] Respects prefers-reduced-motion
|
|
79
|
+
- [ ] No auto-play >5 seconds
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## WCAG Quick Reference
|
|
83
|
+
|
|
84
|
+
### Level A (Minimum)
|
|
85
|
+
|
|
86
|
+
| Criterion | Description | Fix |
|
|
87
|
+
| --------- | ---------------------- | ----------------- |
|
|
88
|
+
| 1.1.1 | Non-text Content | Add alt text |
|
|
89
|
+
| 1.3.1 | Info and Relationships | Use semantic HTML |
|
|
90
|
+
| 2.1.1 | Keyboard | All via keyboard |
|
|
91
|
+
| 2.4.1 | Bypass Blocks | Skip links |
|
|
92
|
+
| 4.1.2 | Name, Role, Value | ARIA labels |
|
|
93
|
+
|
|
94
|
+
### Level AA (Recommended)
|
|
95
|
+
|
|
96
|
+
| Criterion | Description | Fix |
|
|
97
|
+
| --------- | ------------- | ---------------------- |
|
|
98
|
+
| 1.4.3 | Contrast | 4.5:1 text, 3:1 UI |
|
|
99
|
+
| 1.4.4 | Resize Text | Support 200% zoom |
|
|
100
|
+
| 2.4.6 | Headings | Descriptive headings |
|
|
101
|
+
| 2.4.7 | Focus Visible | Clear focus indicators |
|
|
102
|
+
|
|
103
|
+
## Common Fixes
|
|
104
|
+
|
|
105
|
+
### Accessible Button
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
// Bad
|
|
109
|
+
<div onClick={handleClick}>Click me</div>
|
|
110
|
+
|
|
111
|
+
// Good
|
|
112
|
+
<button type="button" onClick={handleClick}>
|
|
113
|
+
Click me
|
|
114
|
+
</button>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Accessible Icon Button
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
// Bad
|
|
121
|
+
<button><Icon /></button>
|
|
122
|
+
|
|
123
|
+
// Good
|
|
124
|
+
<button aria-label="Close dialog">
|
|
125
|
+
<Icon aria-hidden="true" />
|
|
126
|
+
</button>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Form with Error
|
|
130
|
+
|
|
131
|
+
```tsx
|
|
132
|
+
<label htmlFor="email">Email</label>
|
|
133
|
+
<input
|
|
134
|
+
id="email"
|
|
135
|
+
aria-describedby="email-error"
|
|
136
|
+
aria-invalid={hasError}
|
|
137
|
+
/>
|
|
138
|
+
{hasError && (
|
|
139
|
+
<span id="email-error" role="alert">
|
|
140
|
+
Please enter a valid email
|
|
141
|
+
</span>
|
|
142
|
+
)}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Report Template
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
# Accessibility Audit Report
|
|
149
|
+
|
|
150
|
+
**Date:** [Date]
|
|
151
|
+
**Page:** [Name]
|
|
152
|
+
**WCAG Level:** AA
|
|
153
|
+
|
|
154
|
+
## Summary
|
|
155
|
+
|
|
156
|
+
- Critical Issues: X
|
|
157
|
+
- Major Issues: X
|
|
158
|
+
- Minor Issues: X
|
|
159
|
+
|
|
160
|
+
## Issues
|
|
161
|
+
|
|
162
|
+
### [Issue Title]
|
|
163
|
+
|
|
164
|
+
- **Severity:** Critical/Major/Minor
|
|
165
|
+
- **WCAG:** [X.X.X]
|
|
166
|
+
- **Element:** [selector]
|
|
167
|
+
- **Issue:** [Description]
|
|
168
|
+
- **Fix:** [Recommendation]
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Storage
|
|
172
|
+
|
|
173
|
+
Save audit reports to `.opencode/memory/design/accessibility/`
|
|
174
|
+
|
|
175
|
+
## Related Skills
|
|
176
|
+
|
|
177
|
+
| Need | Skill |
|
|
178
|
+
| -------------- | --------------------- |
|
|
179
|
+
| Design quality | `frontend-aesthetics` |
|
|
180
|
+
| UI research | `ui-ux-research` |
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Design System Audit Skill
|
|
2
|
+
|
|
3
|
+
Audit, document, and improve design systems.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Auditing existing design systems for consistency
|
|
8
|
+
- Documenting undocumented design tokens
|
|
9
|
+
- Identifying design debt
|
|
10
|
+
- Preparing for design system refactoring
|
|
11
|
+
- Comparing implementation vs design specs
|
|
12
|
+
|
|
13
|
+
## Core Workflow
|
|
14
|
+
|
|
15
|
+
### Phase 1: Visual Inventory
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Analyze application screenshots and create a visual inventory:
|
|
19
|
+
|
|
20
|
+
1. COLOR PALETTE
|
|
21
|
+
- Primary colors (brand)
|
|
22
|
+
- Secondary colors
|
|
23
|
+
- Neutral/gray scale
|
|
24
|
+
- Semantic colors (success, warning, error, info)
|
|
25
|
+
|
|
26
|
+
2. TYPOGRAPHY SCALE
|
|
27
|
+
- Heading sizes (H1-H6)
|
|
28
|
+
- Body text sizes
|
|
29
|
+
- Font families used
|
|
30
|
+
- Font weights observed
|
|
31
|
+
|
|
32
|
+
3. SPACING PATTERNS
|
|
33
|
+
- Common padding values
|
|
34
|
+
- Common margin values
|
|
35
|
+
- Gap patterns
|
|
36
|
+
|
|
37
|
+
4. COMPONENT VARIANTS
|
|
38
|
+
- Button styles
|
|
39
|
+
- Input field styles
|
|
40
|
+
- Card variations
|
|
41
|
+
|
|
42
|
+
5. INCONSISTENCIES DETECTED
|
|
43
|
+
- Similar but different colors
|
|
44
|
+
- Inconsistent spacing
|
|
45
|
+
- Typography variations
|
|
46
|
+
|
|
47
|
+
Output as structured JSON design tokens.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Phase 2: Consistency Analysis
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Compare visual inventory with code.
|
|
54
|
+
|
|
55
|
+
Identify:
|
|
56
|
+
1. Tokens used in code but not in designs
|
|
57
|
+
2. Visual patterns not codified as tokens
|
|
58
|
+
3. Naming inconsistencies
|
|
59
|
+
4. Redundant/duplicate values
|
|
60
|
+
5. Missing semantic tokens
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Design Token Structure
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"color": {
|
|
68
|
+
"primitive": {
|
|
69
|
+
"blue": { "50": "#eff6ff", "500": "#3b82f6", "900": "#1e3a8a" }
|
|
70
|
+
},
|
|
71
|
+
"semantic": {
|
|
72
|
+
"primary": "{color.primitive.blue.500}",
|
|
73
|
+
"background": { "default": "#f9fafb", "muted": "#f3f4f6" },
|
|
74
|
+
"text": { "default": "#111827", "muted": "#6b7280" }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"spacing": { "1": "0.25rem", "2": "0.5rem", "4": "1rem", "8": "2rem" },
|
|
78
|
+
"typography": {
|
|
79
|
+
"fontFamily": { "sans": "Inter", "mono": "JetBrains Mono" },
|
|
80
|
+
"fontSize": { "sm": "0.875rem", "base": "1rem", "lg": "1.125rem" }
|
|
81
|
+
},
|
|
82
|
+
"borderRadius": { "sm": "0.125rem", "md": "0.375rem", "lg": "0.5rem" }
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Audit Report Template
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
# Design System Audit Report
|
|
90
|
+
|
|
91
|
+
**Date:** [Date]
|
|
92
|
+
**Application:** [Name]
|
|
93
|
+
|
|
94
|
+
## Summary
|
|
95
|
+
|
|
96
|
+
- Total unique colors: X (recommended: <20)
|
|
97
|
+
- Total spacing values: X (recommended: 8-12)
|
|
98
|
+
- Typography variants: X
|
|
99
|
+
- Consistency score: X/100
|
|
100
|
+
|
|
101
|
+
## Color Audit
|
|
102
|
+
|
|
103
|
+
| Category | Count | Issues |
|
|
104
|
+
| ---------- | ----- | ------------ |
|
|
105
|
+
| Primitives | X | X duplicates |
|
|
106
|
+
| Semantics | X | X missing |
|
|
107
|
+
| One-offs | X | Should be 0 |
|
|
108
|
+
|
|
109
|
+
### Recommendations
|
|
110
|
+
|
|
111
|
+
1. Consolidate similar colors
|
|
112
|
+
2. Add semantic tokens
|
|
113
|
+
3. Remove one-off colors
|
|
114
|
+
|
|
115
|
+
## Priority Actions
|
|
116
|
+
|
|
117
|
+
### High Priority
|
|
118
|
+
|
|
119
|
+
1. [Action with impact]
|
|
120
|
+
|
|
121
|
+
### Medium Priority
|
|
122
|
+
|
|
123
|
+
1. [Action]
|
|
124
|
+
|
|
125
|
+
### Low Priority (Design Debt)
|
|
126
|
+
|
|
127
|
+
1. [Action]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Storage
|
|
131
|
+
|
|
132
|
+
Save audit reports to `.opencode/memory/design/audits/`
|
|
133
|
+
Save design tokens to `.opencode/memory/design/tokens/`
|
|
134
|
+
|
|
135
|
+
## Related Skills
|
|
136
|
+
|
|
137
|
+
| Need | Skill |
|
|
138
|
+
| -------------------- | --------------------- |
|
|
139
|
+
| Aesthetic principles | `frontend-aesthetics` |
|
|
140
|
+
| Implement components | `mockup-to-code` |
|
|
141
|
+
| Accessibility | `accessibility-audit` |
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
name: frontend-aesthetics
|
|
3
|
-
description: Use when building UI components, landing pages, dashboards, or any frontend work - avoids generic AI slop aesthetic by steering toward distinctive typography, cohesive themes, meaningful motion, and atmospheric backgrounds
|
|
4
|
-
---
|
|
1
|
+
# Frontend Aesthetics Skill
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Prevent distributional convergence that creates generic "AI slop" frontends. Every interface should feel intentionally crafted for its specific context.
|
|
3
|
+
Prevent generic "AI slop" frontends. Create distinctive, intentional designs.
|
|
9
4
|
|
|
10
5
|
## When to Use
|
|
11
6
|
|
|
@@ -13,22 +8,22 @@ Prevent distributional convergence that creates generic "AI slop" frontends. Eve
|
|
|
13
8
|
- Any frontend generation task
|
|
14
9
|
- Reviewing UI for visual quality
|
|
15
10
|
|
|
16
|
-
## Decision Gate (Do
|
|
11
|
+
## Decision Gate (Do First)
|
|
17
12
|
|
|
18
|
-
Before writing
|
|
13
|
+
Before writing code, state:
|
|
19
14
|
|
|
20
|
-
1. **Aesthetic direction** — Which style
|
|
21
|
-
2. **Why** — How does it fit the context
|
|
15
|
+
1. **Aesthetic direction** — Which style?
|
|
16
|
+
2. **Why** — How does it fit the context?
|
|
22
17
|
|
|
23
|
-
|
|
18
|
+
## Aesthetic Directions
|
|
24
19
|
|
|
25
|
-
Pick ONE (or combine 2
|
|
20
|
+
Pick ONE (or combine 2):
|
|
26
21
|
|
|
27
22
|
| Direction | Character |
|
|
28
23
|
| ---------------- | ----------------------------------------------- |
|
|
29
24
|
| Neo-Brutalist | Raw textures, bold type, harsh contrasts |
|
|
30
25
|
| Soft Minimalism | Muted palettes, generous whitespace |
|
|
31
|
-
| Retro-Futuristic | CRT effects, scan lines, neon
|
|
26
|
+
| Retro-Futuristic | CRT effects, scan lines, neon |
|
|
32
27
|
| Editorial | Dynamic grids, mixed media, bold type |
|
|
33
28
|
| Glass Morphism | Translucent layers, backdrop blur, depth |
|
|
34
29
|
| Dark Academia | Rich textures, serif type, scholarly |
|
|
@@ -37,63 +32,35 @@ Pick ONE (or combine 2 for hybrid):
|
|
|
37
32
|
| Y2K Revival | Gradients, metallics, early-web nostalgia |
|
|
38
33
|
| Organic/Natural | Flowing shapes, nature palettes, paper textures |
|
|
39
34
|
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
```xml
|
|
43
|
-
<frontend_aesthetics>
|
|
44
|
-
You tend to converge toward generic outputs. In frontend design, this creates
|
|
45
|
-
"AI slop" aesthetic. Make creative, distinctive frontends that surprise.
|
|
46
|
-
|
|
47
|
-
Focus on:
|
|
48
|
-
- Typography: Beautiful, unique fonts. Never Inter/Roboto/Arial/system fonts.
|
|
49
|
-
Good: JetBrains Mono, Fira Code, Space Grotesk, Playfair Display, Crimson Pro,
|
|
50
|
-
IBM Plex, Bricolage Grotesque, Newsreader, Instrument Serif, Bebas Neue
|
|
51
|
-
- Color: Commit to cohesive theme. CSS variables. Dominant colors with sharp
|
|
52
|
-
accents beat timid palettes. Draw from IDE themes, cultural aesthetics.
|
|
53
|
-
- Motion: One orchestrated page load with staggered reveals beats scattered
|
|
54
|
-
micro-interactions. CSS-only for HTML, Motion library for React.
|
|
55
|
-
- Backgrounds: Atmosphere and depth, not solid colors. Layer gradients,
|
|
56
|
-
geometric patterns, noise textures.
|
|
57
|
-
|
|
58
|
-
Never do ALL of these together (AI slop signature):
|
|
59
|
-
- Purple/blue gradient backgrounds
|
|
60
|
-
- Inter or system fonts
|
|
61
|
-
- Centered hero with subheading
|
|
62
|
-
- 3-column feature cards with icons
|
|
63
|
-
- Rounded corners on everything (16px border-radius)
|
|
64
|
-
- Drop shadows on all cards
|
|
65
|
-
- #6366F1 or #667eea as primary color
|
|
66
|
-
- "Modern, clean, simple" as only descriptors
|
|
35
|
+
## Typography
|
|
67
36
|
|
|
68
|
-
|
|
69
|
-
</frontend_aesthetics>
|
|
70
|
-
```
|
|
37
|
+
**Good choices:**
|
|
71
38
|
|
|
72
|
-
|
|
39
|
+
- Code/Tech: JetBrains Mono, Fira Code, Space Mono
|
|
40
|
+
- Editorial: Playfair Display, Crimson Pro, Instrument Serif
|
|
41
|
+
- Display: Bebas Neue, Oswald, Archivo Black
|
|
42
|
+
- Technical: IBM Plex, Source Sans 3, Work Sans
|
|
43
|
+
- Distinctive: Bricolage Grotesque, Syne, Outfit
|
|
73
44
|
|
|
74
|
-
|
|
75
|
-
| ----------- | ----------------------------------------------- | ---------------- |
|
|
76
|
-
| Code/Tech | JetBrains Mono, Fira Code, Space Mono | Roboto Mono |
|
|
77
|
-
| Editorial | Playfair Display, Crimson Pro, Instrument Serif | Times New Roman |
|
|
78
|
-
| Display | Bebas Neue, Oswald, Archivo Black | Impact |
|
|
79
|
-
| Technical | IBM Plex, Source Sans 3, Work Sans | Arial, Helvetica |
|
|
80
|
-
| Distinctive | Bricolage Grotesque, Syne, Outfit | Inter, Lato |
|
|
45
|
+
**Avoid:** Inter, Roboto, Arial, system fonts without purpose
|
|
81
46
|
|
|
82
47
|
**Pairing:** High contrast = interesting. Display + monospace, serif + geometric sans.
|
|
83
48
|
|
|
84
|
-
**Weight:** Use extremes (100/200 vs 800/900), not middle (400 vs 600).
|
|
49
|
+
**Weight:** Use extremes (100/200 vs 800/900), not middle (400 vs 600).
|
|
85
50
|
|
|
86
51
|
## Color Anti-Patterns
|
|
87
52
|
|
|
88
|
-
|
|
89
|
-
/* BAD - Overused AI gradient */
|
|
90
|
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
53
|
+
**Avoid:**
|
|
91
54
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
55
|
+
- Purple/blue gradient backgrounds
|
|
56
|
+
- #6366F1 or #667eea as primary
|
|
57
|
+
- Flat white backgrounds
|
|
58
|
+
|
|
59
|
+
**Do:**
|
|
60
|
+
|
|
61
|
+
- Commit to cohesive theme
|
|
62
|
+
- Use CSS variables
|
|
63
|
+
- Dominant colors with sharp accents
|
|
97
64
|
|
|
98
65
|
## Animation Pattern
|
|
99
66
|
|
|
@@ -121,11 +88,15 @@ One orchestrated entrance beats scattered effects:
|
|
|
121
88
|
}
|
|
122
89
|
```
|
|
123
90
|
|
|
124
|
-
##
|
|
125
|
-
|
|
126
|
-
**React + Tailwind:** "Use Tailwind with custom theme, animate with Framer Motion"
|
|
91
|
+
## AI Slop Signature (Never Do ALL Together)
|
|
127
92
|
|
|
128
|
-
|
|
93
|
+
- Purple/blue gradient backgrounds
|
|
94
|
+
- Inter or system fonts
|
|
95
|
+
- Centered hero with subheading
|
|
96
|
+
- 3-column feature cards with icons
|
|
97
|
+
- Rounded corners on everything (16px)
|
|
98
|
+
- Drop shadows on all cards
|
|
99
|
+
- "Modern, clean, simple" as only descriptors
|
|
129
100
|
|
|
130
101
|
## Quality Check
|
|
131
102
|
|
|
@@ -135,3 +106,7 @@ Before delivery:
|
|
|
135
106
|
- [ ] Avoids ALL items in the AI slop list?
|
|
136
107
|
- [ ] Would someone remember this tomorrow?
|
|
137
108
|
- [ ] Responsive, accessible, performs well?
|
|
109
|
+
|
|
110
|
+
## Storage
|
|
111
|
+
|
|
112
|
+
Save design decisions to `.opencode/memory/design/aesthetics/`
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Mockup to Code Skill
|
|
2
|
+
|
|
3
|
+
Convert UI mockups, screenshots, and designs into production-ready code.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Converting Figma/Sketch mockups to React/Vue/HTML
|
|
8
|
+
- Implementing pixel-perfect designs
|
|
9
|
+
- Building component libraries from design systems
|
|
10
|
+
- Rapid prototyping from wireframes
|
|
11
|
+
|
|
12
|
+
## Core Workflow
|
|
13
|
+
|
|
14
|
+
### Phase 1: Design Analysis
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
Analyze this UI mockup and extract:
|
|
18
|
+
|
|
19
|
+
1. LAYOUT STRUCTURE
|
|
20
|
+
- Grid system (columns, gutters, margins)
|
|
21
|
+
- Component hierarchy
|
|
22
|
+
- Container widths
|
|
23
|
+
|
|
24
|
+
2. VISUAL SPECIFICATIONS
|
|
25
|
+
- Colors (hex values)
|
|
26
|
+
- Typography (sizes, weights)
|
|
27
|
+
- Spacing (padding, margins, gaps)
|
|
28
|
+
- Border radius, shadows
|
|
29
|
+
|
|
30
|
+
3. COMPONENTS IDENTIFIED
|
|
31
|
+
- List each distinct component
|
|
32
|
+
- Note variations
|
|
33
|
+
- Identify reusable patterns
|
|
34
|
+
|
|
35
|
+
4. RESPONSIVE CONSIDERATIONS
|
|
36
|
+
- How might this adapt to mobile?
|
|
37
|
+
- Collapsible sections
|
|
38
|
+
- Priority content
|
|
39
|
+
|
|
40
|
+
Output as structured JSON.
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Phase 2: Component Breakdown
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
## Component: [Name]
|
|
47
|
+
|
|
48
|
+
**Priority:** High/Medium/Low
|
|
49
|
+
**Complexity:** Simple/Medium/Complex
|
|
50
|
+
**Reusability:** One-off/Reusable/Design System
|
|
51
|
+
|
|
52
|
+
**Props Interface:**
|
|
53
|
+
|
|
54
|
+
- variant: 'primary' | 'secondary'
|
|
55
|
+
- size: 'sm' | 'md' | 'lg'
|
|
56
|
+
- disabled?: boolean
|
|
57
|
+
|
|
58
|
+
**Accessibility:**
|
|
59
|
+
|
|
60
|
+
- Keyboard navigation
|
|
61
|
+
- ARIA labels
|
|
62
|
+
- Focus management
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Phase 3: Implementation
|
|
66
|
+
|
|
67
|
+
Implement with comparison loop:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Compare mockup vs implementation:
|
|
71
|
+
|
|
72
|
+
1. What differences do you see?
|
|
73
|
+
2. What's missing?
|
|
74
|
+
3. Spacing/sizing adjustments needed?
|
|
75
|
+
4. Color accuracy?
|
|
76
|
+
5. Typography match?
|
|
77
|
+
|
|
78
|
+
Prioritize fixes by visual impact.
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Technology Patterns
|
|
82
|
+
|
|
83
|
+
### React + Tailwind
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Convert to React with Tailwind CSS.
|
|
87
|
+
|
|
88
|
+
Requirements:
|
|
89
|
+
- Functional components with TypeScript
|
|
90
|
+
- Tailwind utility classes
|
|
91
|
+
- Extract repeated patterns
|
|
92
|
+
- Semantic HTML
|
|
93
|
+
- Responsive classes (sm:, md:, lg:)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Vue 3
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Convert to Vue 3 component.
|
|
100
|
+
|
|
101
|
+
Requirements:
|
|
102
|
+
- Composition API with <script setup>
|
|
103
|
+
- Scoped styles
|
|
104
|
+
- Props with TypeScript
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Plain HTML/CSS
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
Convert to semantic HTML and CSS.
|
|
111
|
+
|
|
112
|
+
Requirements:
|
|
113
|
+
- Semantic HTML5 elements
|
|
114
|
+
- CSS Grid/Flexbox layout
|
|
115
|
+
- CSS custom properties
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Quality Checklist
|
|
119
|
+
|
|
120
|
+
### Visual Fidelity
|
|
121
|
+
|
|
122
|
+
- [ ] Colors match exactly
|
|
123
|
+
- [ ] Typography matches
|
|
124
|
+
- [ ] Spacing is consistent
|
|
125
|
+
- [ ] Border radius matches
|
|
126
|
+
- [ ] Shadows correct
|
|
127
|
+
|
|
128
|
+
### Responsiveness
|
|
129
|
+
|
|
130
|
+
- [ ] Desktop layout matches
|
|
131
|
+
- [ ] Tablet works
|
|
132
|
+
- [ ] Mobile is usable
|
|
133
|
+
- [ ] No horizontal scroll
|
|
134
|
+
|
|
135
|
+
### Interactions
|
|
136
|
+
|
|
137
|
+
- [ ] Hover states
|
|
138
|
+
- [ ] Focus states
|
|
139
|
+
- [ ] Transitions smooth
|
|
140
|
+
|
|
141
|
+
### Code Quality
|
|
142
|
+
|
|
143
|
+
- [ ] Properly typed
|
|
144
|
+
- [ ] Sensible defaults
|
|
145
|
+
- [ ] Uses tokens (no hardcoded values)
|
|
146
|
+
- [ ] Accessible markup
|
|
147
|
+
|
|
148
|
+
## Storage
|
|
149
|
+
|
|
150
|
+
Save implementations to `.opencode/memory/design/implementations/`
|
|
151
|
+
|
|
152
|
+
## Related Skills
|
|
153
|
+
|
|
154
|
+
| Need | Skill |
|
|
155
|
+
| ----------------- | --------------------- |
|
|
156
|
+
| Aesthetic quality | `frontend-aesthetics` |
|
|
157
|
+
| Accessibility | `accessibility-audit` |
|
|
158
|
+
| Design tokens | `design-system-audit` |
|