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
|
@@ -1,114 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
name: ui-ux-research
|
|
3
|
-
description: Use when analyzing mockups, screenshots, design systems, or conducting UI/UX research - leverages Gemini CLI non-interactive mode for large context image analysis and codebase-wide UI pattern discovery
|
|
4
|
-
---
|
|
1
|
+
# UI/UX Research Skill
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
Leverage Gemini CLI's 1M token context window and multimodal capabilities for UI/UX research tasks that exceed typical context limits. Use non-interactive mode (`-p` flag) for automated analysis of mockups, screenshots, and large design systems.
|
|
3
|
+
Research UI patterns, design systems, and user experience across codebases.
|
|
11
4
|
|
|
12
5
|
## When to Use
|
|
13
6
|
|
|
14
|
-
- Analyzing
|
|
15
|
-
- Researching UI patterns across large codebases (100KB+)
|
|
7
|
+
- Analyzing UI patterns across large codebases
|
|
16
8
|
- Comparing design system implementations
|
|
17
|
-
- Auditing UI consistency
|
|
18
|
-
- Understanding
|
|
19
|
-
|
|
20
|
-
## Choosing the Right Model
|
|
21
|
-
|
|
22
|
-
For UI/UX research, use **`gemini-2.5-pro`** for all analysis tasks—it has a 1M token context window and excels at understanding images, mockups, and screenshots. This is the default model when you run `gemini`.
|
|
23
|
-
|
|
24
|
-
If you need faster responses and don't need the full context window, use **`gemini-2.5-flash`** (32K tokens).
|
|
9
|
+
- Auditing UI consistency
|
|
10
|
+
- Understanding existing patterns before implementation
|
|
25
11
|
|
|
26
|
-
|
|
12
|
+
## Research Patterns
|
|
27
13
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# Basic prompt
|
|
32
|
-
gemini -p "Your prompt here"
|
|
33
|
-
|
|
34
|
-
# Include files/directories with @ syntax
|
|
35
|
-
gemini -p "@src/components/ Analyze UI patterns used"
|
|
36
|
-
|
|
37
|
-
# Include all project files
|
|
38
|
-
gemini --all-files -p "Find all React components with accessibility issues"
|
|
14
|
+
### Find All UI Components
|
|
39
15
|
|
|
40
|
-
# Specify model (Pro has 1M context, best for image analysis)
|
|
41
|
-
gemini -m gemini-2.5-pro -p "@src/ Analyze design system"
|
|
42
16
|
```
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
### Step 1: Download Image (if URL)
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
curl -o mockup.png "https://example.com/design.png"
|
|
17
|
+
Analyze the components directory.
|
|
18
|
+
List all UI components with their props interfaces.
|
|
50
19
|
```
|
|
51
20
|
|
|
52
|
-
###
|
|
21
|
+
### Audit Design System Consistency
|
|
53
22
|
|
|
54
|
-
```bash
|
|
55
|
-
# Start interactive session
|
|
56
|
-
gemini
|
|
57
|
-
> @mockup.png Analyze this UI for accessibility issues
|
|
58
23
|
```
|
|
24
|
+
Check design token usage consistency:
|
|
25
|
+
- Colors
|
|
26
|
+
- Spacing
|
|
27
|
+
- Typography
|
|
59
28
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
# Use read_file tool through shell
|
|
64
|
-
gemini -p "Read the image at ./mockup.png and analyze the UI layout, color contrast, and typography choices"
|
|
29
|
+
Identify inconsistencies and suggest consolidation.
|
|
65
30
|
```
|
|
66
31
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
### Find All UI Components
|
|
32
|
+
### Compare UI Implementations
|
|
70
33
|
|
|
71
|
-
```bash
|
|
72
|
-
gemini -p "@src/components/ List all UI components with their props interfaces"
|
|
73
34
|
```
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
gemini -p "@src/ @styles/ Check design token usage consistency - colors, spacing, typography"
|
|
35
|
+
Compare layout patterns across pages.
|
|
36
|
+
Identify inconsistencies and recommend standardization.
|
|
79
37
|
```
|
|
80
38
|
|
|
81
|
-
###
|
|
39
|
+
### Accessibility Audit
|
|
82
40
|
|
|
83
|
-
```bash
|
|
84
|
-
gemini -p "@src/pages/ @src/components/ Compare layout patterns across pages, identify inconsistencies"
|
|
85
41
|
```
|
|
42
|
+
Audit components for WCAG compliance:
|
|
43
|
+
- Color contrast
|
|
44
|
+
- ARIA labels
|
|
45
|
+
- Keyboard navigation
|
|
86
46
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
gemini -p "@src/components/ Audit for WCAG compliance: color contrast, ARIA labels, keyboard navigation"
|
|
47
|
+
Prioritize issues by severity.
|
|
91
48
|
```
|
|
92
49
|
|
|
93
50
|
### Responsive Design Review
|
|
94
51
|
|
|
95
|
-
```
|
|
96
|
-
|
|
52
|
+
```
|
|
53
|
+
Find all responsive breakpoints and media queries.
|
|
54
|
+
Assess mobile-first compliance.
|
|
55
|
+
Identify missing responsive considerations.
|
|
97
56
|
```
|
|
98
57
|
|
|
99
|
-
##
|
|
58
|
+
## Pattern Search Template
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Has [PATTERN] been implemented?
|
|
100
62
|
|
|
101
|
-
```bash
|
|
102
|
-
# Research pattern across codebase
|
|
103
|
-
gemini -p "@src/ @lib/ Has [PATTERN] been implemented?
|
|
104
63
|
Show:
|
|
105
64
|
1. Files containing the pattern
|
|
106
65
|
2. Implementation approach
|
|
107
66
|
3. Consistency across usages
|
|
108
|
-
4. Potential improvements
|
|
67
|
+
4. Potential improvements
|
|
109
68
|
```
|
|
110
69
|
|
|
111
|
-
**
|
|
70
|
+
**Common patterns to search:**
|
|
112
71
|
|
|
113
72
|
- Dark mode toggle
|
|
114
73
|
- Form validation
|
|
@@ -116,76 +75,46 @@ Show:
|
|
|
116
75
|
- Error boundaries
|
|
117
76
|
- Toast notifications
|
|
118
77
|
- Modal dialogs
|
|
119
|
-
- Data tables
|
|
78
|
+
- Data tables
|
|
120
79
|
|
|
121
|
-
## Integration with
|
|
80
|
+
## Integration with Beads
|
|
122
81
|
|
|
123
|
-
|
|
82
|
+
For task-constrained research:
|
|
124
83
|
|
|
125
|
-
1.
|
|
84
|
+
1. Check bead spec constraints
|
|
85
|
+
2. Research within those constraints
|
|
86
|
+
3. Save findings to bead artifacts
|
|
126
87
|
|
|
127
|
-
|
|
128
|
-
bd show bd-xxx
|
|
129
|
-
```
|
|
88
|
+
## Storage
|
|
130
89
|
|
|
131
|
-
|
|
90
|
+
Save research findings to `.opencode/memory/design/research/`
|
|
132
91
|
|
|
133
|
-
|
|
134
|
-
gemini -p "@src/components/ @.beads/artifacts/bd-xxx/spec.md
|
|
135
|
-
Find implementations matching spec requirements"
|
|
136
|
-
```
|
|
92
|
+
## Output Format
|
|
137
93
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
# Save to bead artifacts
|
|
141
|
-
# Write to .beads/artifacts/bd-xxx/research.md
|
|
142
|
-
```
|
|
94
|
+
```markdown
|
|
95
|
+
## Research: [Topic]
|
|
143
96
|
|
|
144
|
-
###
|
|
97
|
+
### Findings
|
|
145
98
|
|
|
146
|
-
|
|
99
|
+
[Key discoveries]
|
|
147
100
|
|
|
148
|
-
|
|
149
|
-
2. **Implement:** Apply `frontend-aesthetics` prompt to generate improved components
|
|
101
|
+
### Current Implementation
|
|
150
102
|
|
|
151
|
-
|
|
103
|
+
[What exists]
|
|
152
104
|
|
|
153
|
-
|
|
154
|
-
# JSON output for scripting
|
|
155
|
-
gemini -p "query" --output-format json
|
|
105
|
+
### Recommendations
|
|
156
106
|
|
|
157
|
-
|
|
158
|
-
gemini -p "query" --output-format stream-json
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## Common Use Cases
|
|
162
|
-
|
|
163
|
-
- **Mockup analysis:** Start interactive mode with `gemini`, then `@mockup.png Analyze UI`
|
|
164
|
-
- **Design token audit:** `gemini -p "@styles/ List all design tokens"`
|
|
165
|
-
- **Component inventory:** `gemini -p "@src/components/ Create component catalog"`
|
|
166
|
-
- **Accessibility check:** `gemini -p "@src/ WCAG compliance audit"`
|
|
167
|
-
- **Pattern search:** `gemini -p "@src/ Find modal implementations"`
|
|
168
|
-
|
|
169
|
-
## Limitations
|
|
107
|
+
[What to improve]
|
|
170
108
|
|
|
171
|
-
|
|
172
|
-
- Non-interactive image analysis requires workarounds (curl + read)
|
|
173
|
-
- For real-time UI changes, prefer interactive mode
|
|
174
|
-
- Token limits: 1M (`gemini-2.5-pro`), 32K (`gemini-2.5-flash`)
|
|
175
|
-
- Image analysis uses `gemini-2.5-pro`, NOT image generation models
|
|
109
|
+
### Next Steps
|
|
176
110
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
# Start research session
|
|
181
|
-
gemini -m gemini-2.5-pro
|
|
182
|
-
|
|
183
|
-
# Non-interactive codebase analysis
|
|
184
|
-
gemini -p "@src/ @styles/ [your research question]"
|
|
111
|
+
[Actionable items]
|
|
112
|
+
```
|
|
185
113
|
|
|
186
|
-
|
|
187
|
-
gemini -p "@frontend/ @shared/ Compare UI patterns"
|
|
114
|
+
## Related Skills
|
|
188
115
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
116
|
+
| After Research | Use Skill |
|
|
117
|
+
| --------------------------- | --------------------- |
|
|
118
|
+
| Need implementation | `mockup-to-code` |
|
|
119
|
+
| Need aesthetic improvements | `frontend-aesthetics` |
|
|
120
|
+
| Need accessibility fixes | `accessibility-audit` |
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Visual Analysis Skill
|
|
2
|
+
|
|
3
|
+
Analyze images, screenshots, and visual content.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Analyzing UI mockups or screenshots
|
|
8
|
+
- Extracting information from images
|
|
9
|
+
- Comparing visual designs
|
|
10
|
+
- Quick visual assessments
|
|
11
|
+
|
|
12
|
+
## Quick Mode
|
|
13
|
+
|
|
14
|
+
Fast, focused analysis for specific questions.
|
|
15
|
+
|
|
16
|
+
**Prompt pattern:**
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Analyze this image: [attach image]
|
|
20
|
+
[specific question]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Examples:**
|
|
24
|
+
|
|
25
|
+
- "What text is visible in this UI?"
|
|
26
|
+
- "List all colors used with their hex values"
|
|
27
|
+
- "Identify all interactive elements"
|
|
28
|
+
|
|
29
|
+
## Deep Mode
|
|
30
|
+
|
|
31
|
+
Comprehensive analysis with structured output.
|
|
32
|
+
|
|
33
|
+
**Prompt pattern:**
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Analyze this image comprehensively:
|
|
37
|
+
|
|
38
|
+
1. CONTENT INVENTORY
|
|
39
|
+
- All UI elements present
|
|
40
|
+
- Text content
|
|
41
|
+
- Icons and imagery
|
|
42
|
+
|
|
43
|
+
2. VISUAL PROPERTIES
|
|
44
|
+
- Color palette (hex values)
|
|
45
|
+
- Typography (fonts, sizes, weights)
|
|
46
|
+
- Spacing patterns
|
|
47
|
+
- Layout structure
|
|
48
|
+
|
|
49
|
+
3. OBSERVATIONS
|
|
50
|
+
- Design patterns used
|
|
51
|
+
- Potential issues
|
|
52
|
+
- Notable features
|
|
53
|
+
|
|
54
|
+
Output as structured markdown.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Common Analysis Patterns
|
|
58
|
+
|
|
59
|
+
### UI Component Analysis
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Analyze this UI component:
|
|
63
|
+
|
|
64
|
+
1. Component type and purpose
|
|
65
|
+
2. Visual states (hover, focus, disabled)
|
|
66
|
+
3. Accessibility considerations
|
|
67
|
+
4. Props/variants needed
|
|
68
|
+
5. Similar patterns in common UI libraries
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Screenshot Comparison
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Compare these two images:
|
|
75
|
+
|
|
76
|
+
1. Visual differences (be specific about location)
|
|
77
|
+
2. Missing elements
|
|
78
|
+
3. Spacing/sizing discrepancies
|
|
79
|
+
4. Color accuracy
|
|
80
|
+
5. Priority fixes ranked by visual impact
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Color Extraction
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Extract all colors from this image.
|
|
87
|
+
|
|
88
|
+
Output as JSON:
|
|
89
|
+
{
|
|
90
|
+
"primary": ["#hex1", "#hex2"],
|
|
91
|
+
"secondary": ["#hex3"],
|
|
92
|
+
"neutral": ["#hex4", "#hex5"],
|
|
93
|
+
"accent": ["#hex6"]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
Include approximate usage percentage for each color.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Layout Analysis
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Analyze the layout structure:
|
|
103
|
+
|
|
104
|
+
1. Grid system (columns, gutters)
|
|
105
|
+
2. Container widths
|
|
106
|
+
3. Section divisions
|
|
107
|
+
4. Responsive breakpoint hints
|
|
108
|
+
5. Flexbox vs Grid recommendations
|
|
109
|
+
|
|
110
|
+
Output CSS/Tailwind structure.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Output Formats
|
|
114
|
+
|
|
115
|
+
- **Markdown** (default): Structured text
|
|
116
|
+
- **JSON**: For design tokens
|
|
117
|
+
- **Code**: Direct implementation
|
|
118
|
+
|
|
119
|
+
## Storage
|
|
120
|
+
|
|
121
|
+
Save findings to `.opencode/memory/design/analysis/`
|
|
122
|
+
|
|
123
|
+
## Related Skills
|
|
124
|
+
|
|
125
|
+
| Need | Skill |
|
|
126
|
+
| --------------------------- | --------------------- |
|
|
127
|
+
| Found accessibility issues | `accessibility-audit` |
|
|
128
|
+
| Need to implement design | `mockup-to-code` |
|
|
129
|
+
| Want design tokens | `design-system-audit` |
|
|
130
|
+
| Need aesthetic improvements | `frontend-aesthetics` |
|