@ia-ccun/code-agent-cli 0.0.47 → 0.0.49-beta.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/config/agent/skills/design-md/README.md +34 -0
- package/config/agent/skills/design-md/SKILL.md +172 -0
- package/config/agent/skills/design-md/examples/DESIGN.md +154 -0
- package/config/agent/skills/fireworks-tech-graph/LICENSE +21 -0
- package/config/agent/skills/fireworks-tech-graph/README.md +528 -0
- package/config/agent/skills/fireworks-tech-graph/README.zh.md +499 -0
- package/config/agent/skills/fireworks-tech-graph/SKILL.md +537 -0
- package/config/agent/skills/fireworks-tech-graph/agentloop-core.svg +101 -0
- package/config/agent/skills/fireworks-tech-graph/agents/openai.yaml +4 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style1-flat.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style2-dark.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style3-blueprint.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style4-notion.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style5-glass.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style6-claude.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style7-openai.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/agent-memory-types-style4.json +181 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/api-flow-style7.json +40 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/mem0-style1.json +297 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/microservices-style3.json +64 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/multi-agent-style5.json +45 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/system-architecture-style6.json +48 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/tool-call-style2.json +182 -0
- package/config/agent/skills/fireworks-tech-graph/package.json +42 -0
- package/config/agent/skills/fireworks-tech-graph/references/icons.md +406 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-1-flat-icon.md +108 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-2-dark-terminal.md +107 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-3-blueprint.md +113 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-4-notion-clean.md +94 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-5-glassmorphism.md +125 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-6-claude-official.md +209 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-7-openai.md +215 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-diagram-matrix.md +135 -0
- package/config/agent/skills/fireworks-tech-graph/references/svg-layout-best-practices.md +100 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/README.md +244 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/generate-diagram.sh +157 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/generate-from-template.py +1556 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/test-all-styles.sh +135 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/validate-svg.sh +292 -0
- package/config/agent/skills/fireworks-tech-graph/templates/agent-architecture.svg +28 -0
- package/config/agent/skills/fireworks-tech-graph/templates/architecture.svg +23 -0
- package/config/agent/skills/fireworks-tech-graph/templates/comparison-matrix.svg +14 -0
- package/config/agent/skills/fireworks-tech-graph/templates/data-flow.svg +28 -0
- package/config/agent/skills/fireworks-tech-graph/templates/er-diagram.svg +21 -0
- package/config/agent/skills/fireworks-tech-graph/templates/flowchart.svg +21 -0
- package/config/agent/skills/fireworks-tech-graph/templates/sequence.svg +20 -0
- package/config/agent/skills/fireworks-tech-graph/templates/state-machine.svg +20 -0
- package/config/agent/skills/fireworks-tech-graph/templates/timeline.svg +19 -0
- package/config/agent/skills/fireworks-tech-graph/templates/use-case.svg +21 -0
- package/config/agent/skills/impeccable/adapt/SKILL.md +205 -0
- package/config/agent/skills/impeccable/animate/SKILL.md +178 -0
- package/config/agent/skills/impeccable/arrange/SKILL.md +128 -0
- package/config/agent/skills/impeccable/audit/SKILL.md +129 -0
- package/config/agent/skills/impeccable/bolder/SKILL.md +120 -0
- package/config/agent/skills/impeccable/clarify/SKILL.md +186 -0
- package/config/agent/skills/impeccable/colorize/SKILL.md +146 -0
- package/config/agent/skills/impeccable/critique/SKILL.md +123 -0
- package/config/agent/skills/impeccable/delight/SKILL.md +307 -0
- package/config/agent/skills/impeccable/distill/SKILL.md +125 -0
- package/config/agent/skills/impeccable/extract/SKILL.md +95 -0
- package/config/agent/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
- package/config/agent/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
- package/config/agent/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
- package/config/agent/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
- package/config/agent/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
- package/config/agent/skills/impeccable/frontend-design/reference/typography.md +133 -0
- package/config/agent/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
- package/config/agent/skills/impeccable/harden/SKILL.md +358 -0
- package/config/agent/skills/impeccable/normalize/SKILL.md +74 -0
- package/config/agent/skills/impeccable/onboard/SKILL.md +249 -0
- package/config/agent/skills/impeccable/optimize/SKILL.md +269 -0
- package/config/agent/skills/impeccable/overdrive/SKILL.md +145 -0
- package/config/agent/skills/impeccable/polish/SKILL.md +206 -0
- package/config/agent/skills/impeccable/quieter/SKILL.md +106 -0
- package/config/agent/skills/impeccable/teach-impeccable/SKILL.md +72 -0
- package/config/agent/skills/impeccable/typeset/SKILL.md +119 -0
- package/package.json +1 -1
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: adapt
|
|
3
|
+
description: 使设计适配不同的屏幕尺寸、设备、场景或平台,确保跨环境体验一致。
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
user-invocable: true
|
|
6
|
+
args:
|
|
7
|
+
- name: target
|
|
8
|
+
description: The feature or component to adapt (optional)
|
|
9
|
+
required: false
|
|
10
|
+
- name: context
|
|
11
|
+
description: What to adapt for (mobile, tablet, desktop, print, email, etc.)
|
|
12
|
+
required: false
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
Adapt existing designs to work effectively across different contexts - different screen sizes, devices, platforms, or use cases.
|
|
16
|
+
|
|
17
|
+
## MANDATORY PREPARATION
|
|
18
|
+
|
|
19
|
+
Use the frontend-design skill — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run teach-impeccable first. Additionally gather: target platforms/devices and usage contexts.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Assess Adaptation Challenge
|
|
24
|
+
|
|
25
|
+
Understand what needs adaptation and why:
|
|
26
|
+
|
|
27
|
+
1. **Identify the source context**:
|
|
28
|
+
- What was it designed for originally? (Desktop web? Mobile app?)
|
|
29
|
+
- What assumptions were made? (Large screen? Mouse input? Fast connection?)
|
|
30
|
+
- What works well in current context?
|
|
31
|
+
|
|
32
|
+
2. **Understand target context**:
|
|
33
|
+
- **Device**: Mobile, tablet, desktop, TV, watch, print?
|
|
34
|
+
- **Input method**: Touch, mouse, keyboard, voice, gamepad?
|
|
35
|
+
- **Screen constraints**: Size, resolution, orientation?
|
|
36
|
+
- **Connection**: Fast wifi, slow 3G, offline?
|
|
37
|
+
- **Usage context**: On-the-go vs desk, quick glance vs focused reading?
|
|
38
|
+
- **User expectations**: What do users expect on this platform?
|
|
39
|
+
|
|
40
|
+
3. **Identify adaptation challenges**:
|
|
41
|
+
- What won't fit? (Content, navigation, features)
|
|
42
|
+
- What won't work? (Hover states on touch, tiny touch targets)
|
|
43
|
+
- What's inappropriate? (Desktop patterns on mobile, mobile patterns on desktop)
|
|
44
|
+
|
|
45
|
+
**CRITICAL**: Adaptation is not just scaling - it's rethinking the experience for the new context.
|
|
46
|
+
|
|
47
|
+
## Plan Adaptation Strategy
|
|
48
|
+
|
|
49
|
+
Create context-appropriate strategy:
|
|
50
|
+
|
|
51
|
+
### Mobile Adaptation (Desktop → Mobile)
|
|
52
|
+
|
|
53
|
+
**Layout Strategy**:
|
|
54
|
+
- Single column instead of multi-column
|
|
55
|
+
- Vertical stacking instead of side-by-side
|
|
56
|
+
- Full-width components instead of fixed widths
|
|
57
|
+
- Bottom navigation instead of top/side navigation
|
|
58
|
+
|
|
59
|
+
**Interaction Strategy**:
|
|
60
|
+
- Touch targets 44x44px minimum (not hover-dependent)
|
|
61
|
+
- Swipe gestures where appropriate (lists, carousels)
|
|
62
|
+
- Bottom sheets instead of dropdowns
|
|
63
|
+
- Thumbs-first design (controls within thumb reach)
|
|
64
|
+
- Larger tap areas with more spacing
|
|
65
|
+
|
|
66
|
+
**Content Strategy**:
|
|
67
|
+
- Progressive disclosure (don't show everything at once)
|
|
68
|
+
- Prioritize primary content (secondary content in tabs/accordions)
|
|
69
|
+
- Shorter text (more concise)
|
|
70
|
+
- Larger text (16px minimum)
|
|
71
|
+
|
|
72
|
+
**Navigation Strategy**:
|
|
73
|
+
- Hamburger menu or bottom navigation
|
|
74
|
+
- Reduce navigation complexity
|
|
75
|
+
- Sticky headers for context
|
|
76
|
+
- Back button in navigation flow
|
|
77
|
+
|
|
78
|
+
### Tablet Adaptation (Hybrid Approach)
|
|
79
|
+
|
|
80
|
+
**Layout Strategy**:
|
|
81
|
+
- Two-column layouts (not single or three-column)
|
|
82
|
+
- Side panels for secondary content
|
|
83
|
+
- Master-detail views (list + detail)
|
|
84
|
+
- Adaptive based on orientation (portrait vs landscape)
|
|
85
|
+
|
|
86
|
+
**Interaction Strategy**:
|
|
87
|
+
- Support both touch and pointer
|
|
88
|
+
- Touch targets 44x44px but allow denser layouts than phone
|
|
89
|
+
- Side navigation drawers
|
|
90
|
+
- Multi-column forms where appropriate
|
|
91
|
+
|
|
92
|
+
### Desktop Adaptation (Mobile → Desktop)
|
|
93
|
+
|
|
94
|
+
**Layout Strategy**:
|
|
95
|
+
- Multi-column layouts (use horizontal space)
|
|
96
|
+
- Side navigation always visible
|
|
97
|
+
- Multiple information panels simultaneously
|
|
98
|
+
- Fixed widths with max-width constraints (don't stretch to 4K)
|
|
99
|
+
|
|
100
|
+
**Interaction Strategy**:
|
|
101
|
+
- Hover states for additional information
|
|
102
|
+
- Keyboard shortcuts
|
|
103
|
+
- Right-click context menus
|
|
104
|
+
- Drag and drop where helpful
|
|
105
|
+
- Multi-select with Shift/Cmd
|
|
106
|
+
|
|
107
|
+
**Content Strategy**:
|
|
108
|
+
- Show more information upfront (less progressive disclosure)
|
|
109
|
+
- Data tables with many columns
|
|
110
|
+
- Richer visualizations
|
|
111
|
+
- More detailed descriptions
|
|
112
|
+
|
|
113
|
+
### Print Adaptation (Screen → Print)
|
|
114
|
+
|
|
115
|
+
**Layout Strategy**:
|
|
116
|
+
- Page breaks at logical points
|
|
117
|
+
- Remove navigation, footer, interactive elements
|
|
118
|
+
- Black and white (or limited color)
|
|
119
|
+
- Proper margins for binding
|
|
120
|
+
|
|
121
|
+
**Content Strategy**:
|
|
122
|
+
- Expand shortened content (show full URLs, hidden sections)
|
|
123
|
+
- Add page numbers, headers, footers
|
|
124
|
+
- Include metadata (print date, page title)
|
|
125
|
+
- Convert charts to print-friendly versions
|
|
126
|
+
|
|
127
|
+
### Email Adaptation (Web → Email)
|
|
128
|
+
|
|
129
|
+
**Layout Strategy**:
|
|
130
|
+
- Narrow width (600px max)
|
|
131
|
+
- Single column only
|
|
132
|
+
- Inline CSS (no external stylesheets)
|
|
133
|
+
- Table-based layouts (for email client compatibility)
|
|
134
|
+
|
|
135
|
+
**Interaction Strategy**:
|
|
136
|
+
- Large, obvious CTAs (buttons not text links)
|
|
137
|
+
- No hover states (not reliable)
|
|
138
|
+
- Deep links to web app for complex interactions
|
|
139
|
+
|
|
140
|
+
## Implement Adaptations
|
|
141
|
+
|
|
142
|
+
Apply changes systematically:
|
|
143
|
+
|
|
144
|
+
### Responsive Breakpoints
|
|
145
|
+
|
|
146
|
+
Choose appropriate breakpoints:
|
|
147
|
+
- Mobile: 320px-767px
|
|
148
|
+
- Tablet: 768px-1023px
|
|
149
|
+
- Desktop: 1024px+
|
|
150
|
+
- Or content-driven breakpoints (where design breaks)
|
|
151
|
+
|
|
152
|
+
### Layout Adaptation Techniques
|
|
153
|
+
|
|
154
|
+
- **CSS Grid/Flexbox**: Reflow layouts automatically
|
|
155
|
+
- **Container Queries**: Adapt based on container, not viewport
|
|
156
|
+
- **`clamp()`**: Fluid sizing between min and max
|
|
157
|
+
- **Media queries**: Different styles for different contexts
|
|
158
|
+
- **Display properties**: Show/hide elements per context
|
|
159
|
+
|
|
160
|
+
### Touch Adaptation
|
|
161
|
+
|
|
162
|
+
- Increase touch target sizes (44x44px minimum)
|
|
163
|
+
- Add more spacing between interactive elements
|
|
164
|
+
- Remove hover-dependent interactions
|
|
165
|
+
- Add touch feedback (ripples, highlights)
|
|
166
|
+
- Consider thumb zones (easier to reach bottom than top)
|
|
167
|
+
|
|
168
|
+
### Content Adaptation
|
|
169
|
+
|
|
170
|
+
- Use `display: none` sparingly (still downloads)
|
|
171
|
+
- Progressive enhancement (core content first, enhancements on larger screens)
|
|
172
|
+
- Lazy loading for off-screen content
|
|
173
|
+
- Responsive images (`srcset`, `picture` element)
|
|
174
|
+
|
|
175
|
+
### Navigation Adaptation
|
|
176
|
+
|
|
177
|
+
- Transform complex nav to hamburger/drawer on mobile
|
|
178
|
+
- Bottom nav bar for mobile apps
|
|
179
|
+
- Persistent side navigation on desktop
|
|
180
|
+
- Breadcrumbs on smaller screens for context
|
|
181
|
+
|
|
182
|
+
**IMPORTANT**: Test on real devices, not just browser DevTools. Device emulation is helpful but not perfect.
|
|
183
|
+
|
|
184
|
+
**NEVER**:
|
|
185
|
+
- Hide core functionality on mobile (if it matters, make it work)
|
|
186
|
+
- Assume desktop = powerful device (consider accessibility, older machines)
|
|
187
|
+
- Use different information architecture across contexts (confusing)
|
|
188
|
+
- Break user expectations for platform (mobile users expect mobile patterns)
|
|
189
|
+
- Forget landscape orientation on mobile/tablet
|
|
190
|
+
- Use generic breakpoints blindly (use content-driven breakpoints)
|
|
191
|
+
- Ignore touch on desktop (many desktop devices have touch)
|
|
192
|
+
|
|
193
|
+
## Verify Adaptations
|
|
194
|
+
|
|
195
|
+
Test thoroughly across contexts:
|
|
196
|
+
|
|
197
|
+
- **Real devices**: Test on actual phones, tablets, desktops
|
|
198
|
+
- **Different orientations**: Portrait and landscape
|
|
199
|
+
- **Different browsers**: Safari, Chrome, Firefox, Edge
|
|
200
|
+
- **Different OS**: iOS, Android, Windows, macOS
|
|
201
|
+
- **Different input methods**: Touch, mouse, keyboard
|
|
202
|
+
- **Edge cases**: Very small screens (320px), very large screens (4K)
|
|
203
|
+
- **Slow connections**: Test on throttled network
|
|
204
|
+
|
|
205
|
+
Remember: You're a cross-platform design expert. Make experiences that feel native to each context while maintaining brand and functionality consistency. Adapt intentionally, test thoroughly.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: animate
|
|
3
|
+
description: 审视功能特性,通过有目的性的动画、微交互和动效来增强可用性与体验愉悦度。
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
user-invocable: true
|
|
6
|
+
args:
|
|
7
|
+
- name: target
|
|
8
|
+
description: The feature or component to animate (optional)
|
|
9
|
+
required: false
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Analyze a feature and strategically add animations and micro-interactions that enhance understanding, provide feedback, and create delight.
|
|
13
|
+
|
|
14
|
+
## MANDATORY PREPARATION
|
|
15
|
+
|
|
16
|
+
Use the frontend-design skill — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run teach-impeccable first. Additionally gather: performance constraints.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Assess Animation Opportunities
|
|
21
|
+
|
|
22
|
+
Analyze where motion would improve the experience:
|
|
23
|
+
|
|
24
|
+
1. **Identify static areas**:
|
|
25
|
+
- **Missing feedback**: Actions without visual acknowledgment (button clicks, form submission, etc.)
|
|
26
|
+
- **Jarring transitions**: Instant state changes that feel abrupt (show/hide, page loads, route changes)
|
|
27
|
+
- **Unclear relationships**: Spatial or hierarchical relationships that aren't obvious
|
|
28
|
+
- **Lack of delight**: Functional but joyless interactions
|
|
29
|
+
- **Missed guidance**: Opportunities to direct attention or explain behavior
|
|
30
|
+
|
|
31
|
+
2. **Understand the context**:
|
|
32
|
+
- What's the personality? (Playful vs serious, energetic vs calm)
|
|
33
|
+
- What's the performance budget? (Mobile-first? Complex page?)
|
|
34
|
+
- Who's the audience? (Motion-sensitive users? Power users who want speed?)
|
|
35
|
+
- What matters most? (One hero animation vs many micro-interactions?)
|
|
36
|
+
|
|
37
|
+
If any of these are unclear from the codebase, STOP and call the AskUserQuestion tool to clarify.
|
|
38
|
+
|
|
39
|
+
**CRITICAL**: Respect `prefers-reduced-motion`. Always provide non-animated alternatives for users who need them.
|
|
40
|
+
|
|
41
|
+
## Plan Animation Strategy
|
|
42
|
+
|
|
43
|
+
Create a purposeful animation plan:
|
|
44
|
+
|
|
45
|
+
- **Hero moment**: What's the ONE signature animation? (Page load? Hero section? Key interaction?)
|
|
46
|
+
- **Feedback layer**: Which interactions need acknowledgment?
|
|
47
|
+
- **Transition layer**: Which state changes need smoothing?
|
|
48
|
+
- **Delight layer**: Where can we surprise and delight?
|
|
49
|
+
|
|
50
|
+
**IMPORTANT**: One well-orchestrated experience beats scattered animations everywhere. Focus on high-impact moments.
|
|
51
|
+
|
|
52
|
+
## Implement Animations
|
|
53
|
+
|
|
54
|
+
Add motion systematically across these categories:
|
|
55
|
+
|
|
56
|
+
### Entrance Animations
|
|
57
|
+
- **Page load choreography**: Stagger element reveals (100-150ms delays), fade + slide combinations
|
|
58
|
+
- **Hero section**: Dramatic entrance for primary content (scale, parallax, or creative effects)
|
|
59
|
+
- **Content reveals**: Scroll-triggered animations using intersection observer
|
|
60
|
+
- **Modal/drawer entry**: Smooth slide + fade, backdrop fade, focus management
|
|
61
|
+
|
|
62
|
+
### Micro-interactions
|
|
63
|
+
- **Button feedback**:
|
|
64
|
+
- Hover: Subtle scale (1.02-1.05), color shift, shadow increase
|
|
65
|
+
- Click: Quick scale down then up (0.95 → 1), ripple effect
|
|
66
|
+
- Loading: Spinner or pulse state
|
|
67
|
+
- **Form interactions**:
|
|
68
|
+
- Input focus: Border color transition, slight scale or glow
|
|
69
|
+
- Validation: Shake on error, check mark on success, smooth color transitions
|
|
70
|
+
- **Toggle switches**: Smooth slide + color transition (200-300ms)
|
|
71
|
+
- **Checkboxes/radio**: Check mark animation, ripple effect
|
|
72
|
+
- **Like/favorite**: Scale + rotation, particle effects, color transition
|
|
73
|
+
|
|
74
|
+
### State Transitions
|
|
75
|
+
- **Show/hide**: Fade + slide (not instant), appropriate timing (200-300ms)
|
|
76
|
+
- **Expand/collapse**: Height transition with overflow handling, icon rotation
|
|
77
|
+
- **Loading states**: Skeleton screen fades, spinner animations, progress bars
|
|
78
|
+
- **Success/error**: Color transitions, icon animations, gentle scale pulse
|
|
79
|
+
- **Enable/disable**: Opacity transitions, cursor changes
|
|
80
|
+
|
|
81
|
+
### Navigation & Flow
|
|
82
|
+
- **Page transitions**: Crossfade between routes, shared element transitions
|
|
83
|
+
- **Tab switching**: Slide indicator, content fade/slide
|
|
84
|
+
- **Carousel/slider**: Smooth transforms, snap points, momentum
|
|
85
|
+
- **Scroll effects**: Parallax layers, sticky headers with state changes, scroll progress indicators
|
|
86
|
+
|
|
87
|
+
### Feedback & Guidance
|
|
88
|
+
- **Hover hints**: Tooltip fade-ins, cursor changes, element highlights
|
|
89
|
+
- **Drag & drop**: Lift effect (shadow + scale), drop zone highlights, smooth repositioning
|
|
90
|
+
- **Copy/paste**: Brief highlight flash on paste, "copied" confirmation
|
|
91
|
+
- **Focus flow**: Highlight path through form or workflow
|
|
92
|
+
|
|
93
|
+
### Delight Moments
|
|
94
|
+
- **Empty states**: Subtle floating animations on illustrations
|
|
95
|
+
- **Completed actions**: Confetti, check mark flourish, success celebrations
|
|
96
|
+
- **Easter eggs**: Hidden interactions for discovery
|
|
97
|
+
- **Contextual animation**: Weather effects, time-of-day themes, seasonal touches
|
|
98
|
+
|
|
99
|
+
## Technical Implementation
|
|
100
|
+
|
|
101
|
+
Use appropriate techniques for each animation:
|
|
102
|
+
|
|
103
|
+
### Timing & Easing
|
|
104
|
+
|
|
105
|
+
**Durations by purpose:**
|
|
106
|
+
- **100-150ms**: Instant feedback (button press, toggle)
|
|
107
|
+
- **200-300ms**: State changes (hover, menu open)
|
|
108
|
+
- **300-500ms**: Layout changes (accordion, modal)
|
|
109
|
+
- **500-800ms**: Entrance animations (page load)
|
|
110
|
+
|
|
111
|
+
**Easing curves (use these, not CSS defaults):**
|
|
112
|
+
```css
|
|
113
|
+
/* Recommended - natural deceleration */
|
|
114
|
+
--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1); /* Smooth, refined */
|
|
115
|
+
--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1); /* Slightly snappier */
|
|
116
|
+
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); /* Confident, decisive */
|
|
117
|
+
|
|
118
|
+
/* AVOID - feel dated and tacky */
|
|
119
|
+
/* bounce: cubic-bezier(0.34, 1.56, 0.64, 1); */
|
|
120
|
+
/* elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); */
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Exit animations are faster than entrances.** Use ~75% of enter duration.
|
|
124
|
+
|
|
125
|
+
### CSS Animations
|
|
126
|
+
```css
|
|
127
|
+
/* Prefer for simple, declarative animations */
|
|
128
|
+
- transitions for state changes
|
|
129
|
+
- @keyframes for complex sequences
|
|
130
|
+
- transform + opacity only (GPU-accelerated)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### JavaScript Animation
|
|
134
|
+
```javascript
|
|
135
|
+
/* Use for complex, interactive animations */
|
|
136
|
+
- Web Animations API for programmatic control
|
|
137
|
+
- Framer Motion for React
|
|
138
|
+
- GSAP for complex sequences
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Performance
|
|
142
|
+
- **GPU acceleration**: Use `transform` and `opacity`, avoid layout properties
|
|
143
|
+
- **will-change**: Add sparingly for known expensive animations
|
|
144
|
+
- **Reduce paint**: Minimize repaints, use `contain` where appropriate
|
|
145
|
+
- **Monitor FPS**: Ensure 60fps on target devices
|
|
146
|
+
|
|
147
|
+
### Accessibility
|
|
148
|
+
```css
|
|
149
|
+
@media (prefers-reduced-motion: reduce) {
|
|
150
|
+
* {
|
|
151
|
+
animation-duration: 0.01ms !important;
|
|
152
|
+
animation-iteration-count: 1 !important;
|
|
153
|
+
transition-duration: 0.01ms !important;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**NEVER**:
|
|
159
|
+
- Use bounce or elastic easing curves—they feel dated and draw attention to the animation itself
|
|
160
|
+
- Animate layout properties (width, height, top, left)—use transform instead
|
|
161
|
+
- Use durations over 500ms for feedback—it feels laggy
|
|
162
|
+
- Animate without purpose—every animation needs a reason
|
|
163
|
+
- Ignore `prefers-reduced-motion`—this is an accessibility violation
|
|
164
|
+
- Animate everything—animation fatigue makes interfaces feel exhausting
|
|
165
|
+
- Block interaction during animations unless intentional
|
|
166
|
+
|
|
167
|
+
## Verify Quality
|
|
168
|
+
|
|
169
|
+
Test animations thoroughly:
|
|
170
|
+
|
|
171
|
+
- **Smooth at 60fps**: No jank on target devices
|
|
172
|
+
- **Feels natural**: Easing curves feel organic, not robotic
|
|
173
|
+
- **Appropriate timing**: Not too fast (jarring) or too slow (laggy)
|
|
174
|
+
- **Reduced motion works**: Animations disabled or simplified appropriately
|
|
175
|
+
- **Doesn't block**: Users can interact during/after animations
|
|
176
|
+
- **Adds value**: Makes interface clearer or more delightful
|
|
177
|
+
|
|
178
|
+
Remember: Motion should enhance understanding and provide feedback, not just add decoration. Animate with purpose, respect performance constraints, and always consider accessibility. Great animation is invisible - it just makes everything feel right.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arrange
|
|
3
|
+
description: 优化布局、间距和视觉韵律,修正单调的网格、不一致的间距和薄弱的视觉层级,打造有意图的视觉组合。
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
user-invocable: true
|
|
6
|
+
args:
|
|
7
|
+
- name: target
|
|
8
|
+
description: The feature or component to improve layout for (optional)
|
|
9
|
+
required: false
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions.
|
|
13
|
+
|
|
14
|
+
## MANDATORY PREPARATION
|
|
15
|
+
|
|
16
|
+
Use the frontend-design skill — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run teach-impeccable first.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Assess Current Layout
|
|
21
|
+
|
|
22
|
+
Analyze what's weak about the current spatial design:
|
|
23
|
+
|
|
24
|
+
1. **Spacing**:
|
|
25
|
+
- Is spacing consistent or arbitrary? (Random padding/margin values)
|
|
26
|
+
- Is all spacing the same? (Equal padding everywhere = no rhythm)
|
|
27
|
+
- Are related elements grouped tightly, with generous space between groups?
|
|
28
|
+
|
|
29
|
+
2. **Visual hierarchy**:
|
|
30
|
+
- Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings?
|
|
31
|
+
- Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?)
|
|
32
|
+
- Does whitespace guide the eye to what matters?
|
|
33
|
+
|
|
34
|
+
3. **Grid & structure**:
|
|
35
|
+
- Is there a clear underlying structure, or does the layout feel random?
|
|
36
|
+
- Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly)
|
|
37
|
+
- Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule)
|
|
38
|
+
|
|
39
|
+
4. **Rhythm & variety**:
|
|
40
|
+
- Does the layout have visual rhythm? (Alternating tight/generous spacing)
|
|
41
|
+
- Is every section structured the same way? (Monotonous repetition)
|
|
42
|
+
- Are there intentional moments of surprise or emphasis?
|
|
43
|
+
|
|
44
|
+
5. **Density**:
|
|
45
|
+
- Is the layout too cramped? (Not enough breathing room)
|
|
46
|
+
- Is the layout too sparse? (Excessive whitespace without purpose)
|
|
47
|
+
- Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air)
|
|
48
|
+
|
|
49
|
+
**CRITICAL**: Layout problems are often the root cause of interfaces feeling "off" even when colors and fonts are fine. Space is a design material — use it with intention.
|
|
50
|
+
|
|
51
|
+
## Plan Layout Improvements
|
|
52
|
+
|
|
53
|
+
Consult the [spatial design reference](reference/spatial-design.md) from the frontend-design skill for detailed guidance on grids, rhythm, and container queries.
|
|
54
|
+
|
|
55
|
+
Create a systematic plan:
|
|
56
|
+
|
|
57
|
+
- **Spacing system**: Use a consistent scale — whether that's a framework's built-in scale (e.g., Tailwind), rem-based tokens, or a custom system. The specific values matter less than consistency.
|
|
58
|
+
- **Hierarchy strategy**: How will space communicate importance?
|
|
59
|
+
- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts.
|
|
60
|
+
- **Rhythm**: Where should spacing be tight vs generous?
|
|
61
|
+
|
|
62
|
+
## Improve Layout Systematically
|
|
63
|
+
|
|
64
|
+
### Establish a Spacing System
|
|
65
|
+
|
|
66
|
+
- Use a consistent spacing scale — framework scales (Tailwind, etc.), rem-based tokens, or a custom scale all work. What matters is that values come from a defined set, not arbitrary numbers.
|
|
67
|
+
- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8`
|
|
68
|
+
- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks
|
|
69
|
+
- Apply `clamp()` for fluid spacing that breathes on larger screens
|
|
70
|
+
|
|
71
|
+
### Create Visual Rhythm
|
|
72
|
+
|
|
73
|
+
- **Tight grouping** for related elements (8-12px between siblings)
|
|
74
|
+
- **Generous separation** between distinct sections (48-96px)
|
|
75
|
+
- **Varied spacing** within sections — not every row needs the same gap
|
|
76
|
+
- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense
|
|
77
|
+
|
|
78
|
+
### Choose the Right Layout Tool
|
|
79
|
+
|
|
80
|
+
- **Use Flexbox for 1D layouts**: Rows of items, nav bars, button groups, card contents, most component internals. Flex is simpler and more appropriate for the majority of layout tasks.
|
|
81
|
+
- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control.
|
|
82
|
+
- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible.
|
|
83
|
+
- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints.
|
|
84
|
+
- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints.
|
|
85
|
+
|
|
86
|
+
### Break Card Grid Monotony
|
|
87
|
+
|
|
88
|
+
- Don't default to card grids for everything — spacing and alignment create visual grouping naturally
|
|
89
|
+
- Use cards only when content is truly distinct and actionable — never nest cards inside cards
|
|
90
|
+
- Vary card sizes, span columns, or mix cards with non-card content to break repetition
|
|
91
|
+
|
|
92
|
+
### Strengthen Visual Hierarchy
|
|
93
|
+
|
|
94
|
+
- Use the fewest dimensions needed for clear hierarchy. Space alone can be enough — generous whitespace around an element draws the eye. Some of the most sophisticated designs achieve rhythm with just space and weight. Add color or size contrast only when simpler means aren't sufficient.
|
|
95
|
+
- Be aware of reading flow — in LTR languages, the eye naturally scans top-left to bottom-right, but primary action placement depends on context (e.g., bottom-right in dialogs, top in navigation).
|
|
96
|
+
- Create clear content groupings through proximity and separation.
|
|
97
|
+
|
|
98
|
+
### Manage Depth & Elevation
|
|
99
|
+
|
|
100
|
+
- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip)
|
|
101
|
+
- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle
|
|
102
|
+
- Use elevation to reinforce hierarchy, not as decoration
|
|
103
|
+
|
|
104
|
+
### Optical Adjustments
|
|
105
|
+
|
|
106
|
+
- If an icon looks visually off-center despite being geometrically centered, nudge it — but only if you're confident it actually looks wrong. Don't adjust speculatively.
|
|
107
|
+
|
|
108
|
+
**NEVER**:
|
|
109
|
+
- Use arbitrary spacing values outside your scale
|
|
110
|
+
- Make all spacing equal — variety creates hierarchy
|
|
111
|
+
- Wrap everything in cards — not everything needs a container
|
|
112
|
+
- Nest cards inside cards — use spacing and dividers for hierarchy within
|
|
113
|
+
- Use identical card grids everywhere (icon + heading + text, repeated)
|
|
114
|
+
- Center everything — left-aligned with asymmetry feels more designed
|
|
115
|
+
- Default to the hero metric layout (big number, small label, stats, gradient) as a template. If showing real user data, a prominent metric can work — but it should display actual data, not decorative numbers.
|
|
116
|
+
- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job
|
|
117
|
+
- Use arbitrary z-index values (999, 9999) — build a semantic scale
|
|
118
|
+
|
|
119
|
+
## Verify Layout Improvements
|
|
120
|
+
|
|
121
|
+
- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision?
|
|
122
|
+
- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing?
|
|
123
|
+
- **Hierarchy**: Is the most important content obvious within 2 seconds?
|
|
124
|
+
- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful?
|
|
125
|
+
- **Consistency**: Is the spacing system applied uniformly?
|
|
126
|
+
- **Responsiveness**: Does the layout adapt gracefully across screen sizes?
|
|
127
|
+
|
|
128
|
+
Remember: Space is the most underused design tool. A layout with the right rhythm and hierarchy can make even simple content feel polished and intentional.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit
|
|
3
|
+
description: 对界面质量进行全面审计,涵盖无障碍性、性能、主题化和响应式设计,生成包含严重等级和改进建议的详细报告。
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
user-invocable: true
|
|
6
|
+
args:
|
|
7
|
+
- name: area
|
|
8
|
+
description: The feature or area to audit (optional)
|
|
9
|
+
required: false
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Run systematic quality checks and generate a comprehensive audit report with prioritized issues and actionable recommendations. Don't fix issues - document them for other commands to address.
|
|
13
|
+
|
|
14
|
+
**First**: Use the frontend-design skill for design principles and anti-patterns.
|
|
15
|
+
|
|
16
|
+
## Diagnostic Scan
|
|
17
|
+
|
|
18
|
+
Run comprehensive checks across multiple dimensions:
|
|
19
|
+
|
|
20
|
+
1. **Accessibility (A11y)** - Check for:
|
|
21
|
+
- **Contrast issues**: Text contrast ratios < 4.5:1 (or 7:1 for AAA)
|
|
22
|
+
- **Missing ARIA**: Interactive elements without proper roles, labels, or states
|
|
23
|
+
- **Keyboard navigation**: Missing focus indicators, illogical tab order, keyboard traps
|
|
24
|
+
- **Semantic HTML**: Improper heading hierarchy, missing landmarks, divs instead of buttons
|
|
25
|
+
- **Alt text**: Missing or poor image descriptions
|
|
26
|
+
- **Form issues**: Inputs without labels, poor error messaging, missing required indicators
|
|
27
|
+
|
|
28
|
+
2. **Performance** - Check for:
|
|
29
|
+
- **Layout thrashing**: Reading/writing layout properties in loops
|
|
30
|
+
- **Expensive animations**: Animating layout properties (width, height, top, left) instead of transform/opacity
|
|
31
|
+
- **Missing optimization**: Images without lazy loading, unoptimized assets, missing will-change
|
|
32
|
+
- **Bundle size**: Unnecessary imports, unused dependencies
|
|
33
|
+
- **Render performance**: Unnecessary re-renders, missing memoization
|
|
34
|
+
|
|
35
|
+
3. **Theming** - Check for:
|
|
36
|
+
- **Hard-coded colors**: Colors not using design tokens
|
|
37
|
+
- **Broken dark mode**: Missing dark mode variants, poor contrast in dark theme
|
|
38
|
+
- **Inconsistent tokens**: Using wrong tokens, mixing token types
|
|
39
|
+
- **Theme switching issues**: Values that don't update on theme change
|
|
40
|
+
|
|
41
|
+
4. **Responsive Design** - Check for:
|
|
42
|
+
- **Fixed widths**: Hard-coded widths that break on mobile
|
|
43
|
+
- **Touch targets**: Interactive elements < 44x44px
|
|
44
|
+
- **Horizontal scroll**: Content overflow on narrow viewports
|
|
45
|
+
- **Text scaling**: Layouts that break when text size increases
|
|
46
|
+
- **Missing breakpoints**: No mobile/tablet variants
|
|
47
|
+
|
|
48
|
+
5. **Anti-Patterns (CRITICAL)** - Check against ALL the **DON'T** guidelines in the frontend-design skill. Look for AI slop tells (AI color palette, gradient text, glassmorphism, hero metrics, card grids, generic fonts) and general design anti-patterns (gray on color, nested cards, bounce easing, redundant copy).
|
|
49
|
+
|
|
50
|
+
**CRITICAL**: This is an audit, not a fix. Document issues thoroughly with clear explanations of impact. Use other commands (normalize, optimize, harden, etc.) to fix issues after audit.
|
|
51
|
+
|
|
52
|
+
## Generate Comprehensive Report
|
|
53
|
+
|
|
54
|
+
Create a detailed audit report with the following structure:
|
|
55
|
+
|
|
56
|
+
### Anti-Patterns Verdict
|
|
57
|
+
**Start here.** Pass/fail: Does this look AI-generated? List specific tells from the skill's Anti-Patterns section. Be brutally honest.
|
|
58
|
+
|
|
59
|
+
### Executive Summary
|
|
60
|
+
- Total issues found (count by severity)
|
|
61
|
+
- Most critical issues (top 3-5)
|
|
62
|
+
- Overall quality score (if applicable)
|
|
63
|
+
- Recommended next steps
|
|
64
|
+
|
|
65
|
+
### Detailed Findings by Severity
|
|
66
|
+
|
|
67
|
+
For each issue, document:
|
|
68
|
+
- **Location**: Where the issue occurs (component, file, line)
|
|
69
|
+
- **Severity**: Critical / High / Medium / Low
|
|
70
|
+
- **Category**: Accessibility / Performance / Theming / Responsive
|
|
71
|
+
- **Description**: What the issue is
|
|
72
|
+
- **Impact**: How it affects users
|
|
73
|
+
- **WCAG/Standard**: Which standard it violates (if applicable)
|
|
74
|
+
- **Recommendation**: How to fix it
|
|
75
|
+
- **Suggested command**: Which command to use (prefer: /animate, /quieter, /optimize, /adapt, /clarify, /distill, /delight, /onboard, /normalize, /audit, /harden, /polish, /extract, /bolder, /arrange, /typeset, /critique, /colorize, /overdrive — or other installed skills you're sure exist)
|
|
76
|
+
|
|
77
|
+
#### Critical Issues
|
|
78
|
+
[Issues that block core functionality or violate WCAG A]
|
|
79
|
+
|
|
80
|
+
#### High-Severity Issues
|
|
81
|
+
[Significant usability/accessibility impact, WCAG AA violations]
|
|
82
|
+
|
|
83
|
+
#### Medium-Severity Issues
|
|
84
|
+
[Quality issues, WCAG AAA violations, performance concerns]
|
|
85
|
+
|
|
86
|
+
#### Low-Severity Issues
|
|
87
|
+
[Minor inconsistencies, optimization opportunities]
|
|
88
|
+
|
|
89
|
+
### Patterns & Systemic Issues
|
|
90
|
+
|
|
91
|
+
Identify recurring problems:
|
|
92
|
+
- "Hard-coded colors appear in 15+ components, should use design tokens"
|
|
93
|
+
- "Touch targets consistently too small (<44px) throughout mobile experience"
|
|
94
|
+
- "Missing focus indicators on all custom interactive components"
|
|
95
|
+
|
|
96
|
+
### Positive Findings
|
|
97
|
+
|
|
98
|
+
Note what's working well:
|
|
99
|
+
- Good practices to maintain
|
|
100
|
+
- Exemplary implementations to replicate elsewhere
|
|
101
|
+
|
|
102
|
+
### Recommendations by Priority
|
|
103
|
+
|
|
104
|
+
Create actionable plan:
|
|
105
|
+
1. **Immediate**: Critical blockers to fix first
|
|
106
|
+
2. **Short-term**: High-severity issues (this sprint)
|
|
107
|
+
3. **Medium-term**: Quality improvements (next sprint)
|
|
108
|
+
4. **Long-term**: Nice-to-haves and optimizations
|
|
109
|
+
|
|
110
|
+
### Suggested Commands for Fixes
|
|
111
|
+
|
|
112
|
+
Map issues to available commands. Prefer these: /animate, /quieter, /optimize, /adapt, /clarify, /distill, /delight, /onboard, /normalize, /audit, /harden, /polish, /extract, /bolder, /arrange, /typeset, /critique, /colorize, /overdrive. You may also suggest other installed skills you're sure exist, but never invent commands.
|
|
113
|
+
|
|
114
|
+
Examples:
|
|
115
|
+
- "Use `/normalize` to align with design system (addresses N theming issues)"
|
|
116
|
+
- "Use `/optimize` to improve performance (addresses N performance issues)"
|
|
117
|
+
- "Use `/harden` to improve resilience (addresses N edge cases)"
|
|
118
|
+
|
|
119
|
+
**IMPORTANT**: Be thorough but actionable. Too many low-priority issues creates noise. Focus on what actually matters.
|
|
120
|
+
|
|
121
|
+
**NEVER**:
|
|
122
|
+
- Report issues without explaining impact (why does this matter?)
|
|
123
|
+
- Mix severity levels inconsistently
|
|
124
|
+
- Skip positive findings (celebrate what works)
|
|
125
|
+
- Provide generic recommendations (be specific and actionable)
|
|
126
|
+
- Forget to prioritize (everything can't be critical)
|
|
127
|
+
- Report false positives without verification
|
|
128
|
+
|
|
129
|
+
Remember: You're a quality auditor with exceptional attention to detail. Document systematically, prioritize ruthlessly, and provide clear paths to improvement. A good audit makes fixing easy.
|