@bastani/atomic 0.5.15 → 0.5.16-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/.agents/skills/harden/SKILL.md +36 -1
- package/README.md +20 -24
- package/package.json +1 -1
- package/.agents/skills/arrange/SKILL.md +0 -124
- package/.agents/skills/extract/SKILL.md +0 -91
- package/.agents/skills/frontend-design/SKILL.md +0 -147
- package/.agents/skills/frontend-design/reference/color-and-contrast.md +0 -132
- package/.agents/skills/frontend-design/reference/interaction-design.md +0 -195
- package/.agents/skills/frontend-design/reference/motion-design.md +0 -99
- package/.agents/skills/frontend-design/reference/responsive-design.md +0 -114
- package/.agents/skills/frontend-design/reference/spatial-design.md +0 -100
- package/.agents/skills/frontend-design/reference/typography.md +0 -133
- package/.agents/skills/frontend-design/reference/ux-writing.md +0 -107
- package/.agents/skills/normalize/SKILL.md +0 -70
- package/.agents/skills/onboard/SKILL.md +0 -245
- package/.agents/skills/teach-impeccable/SKILL.md +0 -71
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: harden
|
|
3
|
-
description:
|
|
3
|
+
description: "Make interfaces production-ready: error handling, empty states, onboarding flows, i18n, text overflow, and edge case management. Use when the user asks to harden, make production-ready, handle edge cases, add error states, design empty states, improve onboarding, or fix overflow and i18n issues."
|
|
4
|
+
version: 2.1.1
|
|
4
5
|
user-invocable: true
|
|
5
6
|
argument-hint: "[target]"
|
|
6
7
|
---
|
|
@@ -224,6 +225,40 @@ t('items', { count }) // Handles complex plural rules
|
|
|
224
225
|
- Feature detection (not browser detection)
|
|
225
226
|
- Test in target browsers
|
|
226
227
|
|
|
228
|
+
### Onboarding & First-Run Experience
|
|
229
|
+
|
|
230
|
+
Production-ready features work for first-time users, not just power users. Design the paths that get new users to value:
|
|
231
|
+
|
|
232
|
+
**Empty states**: Every zero-data screen needs:
|
|
233
|
+
- What will appear here (description or illustration)
|
|
234
|
+
- Why it matters to the user
|
|
235
|
+
- Clear CTA to create the first item or start from a template
|
|
236
|
+
- Visual interest (not just blank space with "No items yet")
|
|
237
|
+
|
|
238
|
+
Empty state types to handle:
|
|
239
|
+
- **First use**: emphasize value, provide templates
|
|
240
|
+
- **User cleared**: light touch, easy to recreate
|
|
241
|
+
- **No results**: suggest a different query, offer to clear filters
|
|
242
|
+
- **No permissions**: explain why, how to get access
|
|
243
|
+
|
|
244
|
+
**First-run experience**: Get users to their "aha moment" as quickly as possible.
|
|
245
|
+
- Show, don't tell -- working examples over descriptions
|
|
246
|
+
- Progressive disclosure -- teach one thing at a time, not everything upfront
|
|
247
|
+
- Make onboarding optional -- let experienced users skip
|
|
248
|
+
- Provide smart defaults so required setup is minimal
|
|
249
|
+
|
|
250
|
+
**Feature discovery**: Teach features when users need them, not upfront.
|
|
251
|
+
- Contextual tooltips at point of use (brief, dismissable, one-time)
|
|
252
|
+
- Badges or indicators on new or unused features
|
|
253
|
+
- Celebrate activation events quietly (a toast, not a modal)
|
|
254
|
+
|
|
255
|
+
**NEVER**:
|
|
256
|
+
- Force long onboarding before users can touch the product
|
|
257
|
+
- Show the same tooltip repeatedly (track and respect dismissals)
|
|
258
|
+
- Block the entire UI during a guided tour
|
|
259
|
+
- Create separate tutorial modes disconnected from the real product
|
|
260
|
+
- Design empty states that just say "No items" with no next action
|
|
261
|
+
|
|
227
262
|
### Input Validation & Sanitization
|
|
228
263
|
|
|
229
264
|
**Client-side validation**:
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](./package.json)
|
|
10
10
|
[](./LICENSE)
|
|
11
11
|
|
|
12
|
-
Atomic is an open-source **TypeScript SDK** for building **any harness you want** around your coding agent — **Claude Code**, **OpenCode**, or **GitHub Copilot CLI**. Chain sessions into pipelines, add human-in-the-loop approval gates, plug in CI and notifications, dispatch **12 specialized sub-agents**, and tap **
|
|
12
|
+
Atomic is an open-source **TypeScript SDK** for building **any harness you want** around your coding agent — **Claude Code**, **OpenCode**, or **GitHub Copilot CLI**. Chain sessions into pipelines, add human-in-the-loop approval gates, plug in CI and notifications, dispatch **12 specialized sub-agents**, and tap **55 built-in skills** — then ship it as TypeScript your whole team runs.
|
|
13
13
|
|
|
14
14
|
> Define how your agent works. Start for yourself, scale to your team.
|
|
15
15
|
|
|
@@ -858,7 +858,7 @@ Use `/agents` in any chat session to see all available sub-agents.
|
|
|
858
858
|
|
|
859
859
|
### Built-in Skills
|
|
860
860
|
|
|
861
|
-
Skills are structured capability modules that give agents best practices and reusable workflows for specific tasks. Atomic ships
|
|
861
|
+
Skills are structured capability modules that give agents best practices and reusable workflows for specific tasks. Atomic ships 55 skills across eight categories; each lives at `.agents/skills/<name>/SKILL.md` and is auto-invoked when the agent detects a relevant trigger.
|
|
862
862
|
|
|
863
863
|
**Development workflows:**
|
|
864
864
|
|
|
@@ -899,25 +899,21 @@ Skills are structured capability modules that give agents best practices and reu
|
|
|
899
899
|
| `bun` | Build, test, deploy with Bun (runtime, package manager, bundler, tests) |
|
|
900
900
|
| `opentui` | Build terminal UIs with OpenTUI (core, React, Solid reconcilers) |
|
|
901
901
|
|
|
902
|
-
**Frontend design & UI polish** — used by `
|
|
903
|
-
|
|
904
|
-
| Skill | Description
|
|
905
|
-
| ---------------------------------------------- |
|
|
906
|
-
| `
|
|
907
|
-
| `
|
|
908
|
-
| `
|
|
909
|
-
| `
|
|
910
|
-
| `
|
|
911
|
-
| `
|
|
912
|
-
| `
|
|
913
|
-
| `
|
|
914
|
-
| `
|
|
915
|
-
| `
|
|
916
|
-
| `
|
|
917
|
-
| `distill` / `quieter` / `bolder` / `overdrive` | Simplify, tone down, amplify, or push designs to their limit |
|
|
918
|
-
| `harden` | Error handling, i18n, overflow, edge-case resilience |
|
|
919
|
-
| `optimize` | Diagnose and fix loading, rendering, animation, bundle-size issues |
|
|
920
|
-
| `onboard` | Design onboarding flows, empty states, first-run experiences |
|
|
902
|
+
**Frontend design & UI polish** — used by `impeccable` and invoked individually for targeted refinement:
|
|
903
|
+
|
|
904
|
+
| Skill | Description |
|
|
905
|
+
| ---------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
906
|
+
| `impeccable` | Create distinctive, production-grade frontend interfaces |
|
|
907
|
+
| `polish` | Final quality pass on alignment, spacing, consistency |
|
|
908
|
+
| `critique` | UX evaluation with quantitative scoring and persona testing |
|
|
909
|
+
| `audit` | Accessibility, performance, theming, responsive, anti-pattern audit |
|
|
910
|
+
| `layout` / `typeset` / `colorize` | Layout, typography, and color refinement |
|
|
911
|
+
| `adapt` | Responsive design: breakpoints, fluid layouts, touch targets |
|
|
912
|
+
| `animate` / `delight` | Add motion, micro-interactions, and personality |
|
|
913
|
+
| `clarify` | Improve UX copy, error messages, microcopy, labels |
|
|
914
|
+
| `distill` / `quieter` / `bolder` / `overdrive` | Simplify, tone down, amplify, or push designs to their limit |
|
|
915
|
+
| `harden` | Error handling, onboarding, empty states, i18n, overflow, edge-case resilience |
|
|
916
|
+
| `optimize` | Diagnose and fix loading, rendering, animation, bundle-size issues |
|
|
921
917
|
|
|
922
918
|
**Evaluation:**
|
|
923
919
|
|
|
@@ -1425,7 +1421,7 @@ If agents fail to spawn on Windows, ensure the agent CLI is in your PATH. Atomic
|
|
|
1425
1421
|
| **Data Flow** | Manual — copy output between steps | Controlled transcript passing via `ctx.transcript()` and `ctx.getMessages()` |
|
|
1426
1422
|
| **Agent Support** | GitHub Copilot CLI | Claude Code + OpenCode + Copilot CLI — switch with a flag |
|
|
1427
1423
|
| **Sub-Agents** | Single general-purpose agent | 12 specialized sub-agents with scoped tools and isolated contexts |
|
|
1428
|
-
| **Skills** | Not available |
|
|
1424
|
+
| **Skills** | Not available | 55 built-in skills (development, design, docs, agent architecture) |
|
|
1429
1425
|
| **Autonomous Execution** | Not available | Ralph — multi-hour autonomous sessions with plan/implement/review/debug loop |
|
|
1430
1426
|
| **Execution Guarantees** | Non-deterministic | Deterministic — strict step ordering, frozen definitions, controlled transcript access |
|
|
1431
1427
|
| **Isolation** | Not addressed | Devcontainer features for containerized execution |
|
|
@@ -1448,7 +1444,7 @@ If agents fail to spawn on Windows, ensure the agent CLI is in your PATH. Atomic
|
|
|
1448
1444
|
| **Execution Model** | DAG-based with conditional edges | Deterministic — strict step ordering, frozen definitions, controlled transcript passing |
|
|
1449
1445
|
| **Parallelism** | Via LangGraph branch nodes | Native parallel sessions via `Promise.all()` with `ctx.session()` in isolated context windows |
|
|
1450
1446
|
| **Sub-Agents** | Researcher, coder, reporter nodes | 12 specialized sub-agents with scoped tools (planner, worker, reviewer, debugger, etc.) |
|
|
1451
|
-
| **Skills** | Not available |
|
|
1447
|
+
| **Skills** | Not available | 55 built-in skills auto-invoked by context |
|
|
1452
1448
|
| **Isolation** | Sandbox containers | Devcontainer features + git worktrees |
|
|
1453
1449
|
| **Interface** | Web UI (Streamlit) | Terminal chat with tmux-based session management |
|
|
1454
1450
|
| **Autonomous** | Not available | Ralph — bounded iteration with plan/implement/review/debug loop |
|
|
@@ -1473,7 +1469,7 @@ If agents fail to spawn on Windows, ensure the agent CLI is in your PATH. Atomic
|
|
|
1473
1469
|
| **Data Flow** | In-context within a single conversation | Controlled transcript passing via `ctx.transcript()` and `ctx.getMessages()` |
|
|
1474
1470
|
| **Self-Improvement** | Closed learning loop — auto-creates skills from experience, persistent user model via Honcho | Skills authored by developers; memory via CLAUDE.md / AGENTS.md context files |
|
|
1475
1471
|
| **Sub-Agents** | `delegate_task` spawns isolated subagents | 12 specialized sub-agents with scoped tools and model tiers (Opus, Sonnet, Haiku) |
|
|
1476
|
-
| **Skills** | 40+ tools + community Skills Hub (agentskills.io) |
|
|
1472
|
+
| **Skills** | 40+ tools + community Skills Hub (agentskills.io) | 55 built-in skills (development, design, docs, agent architecture) |
|
|
1477
1473
|
| **Interface** | Terminal TUI + multi-platform messaging gateway (Telegram, Discord, Slack, WhatsApp, etc.) | Terminal chat with tmux-based session management |
|
|
1478
1474
|
| **Isolation** | Six terminal backends (local, Docker, SSH, Daytona, Singularity, Modal) | Devcontainer features + git worktrees |
|
|
1479
1475
|
| **Autonomous Execution** | Cron scheduler with inactivity-based timeouts | Ralph — bounded iteration with plan/implement/review/debug loop |
|
package/package.json
CHANGED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: arrange
|
|
3
|
-
description: Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy. Use when the user mentions layout feeling off, spacing issues, visual hierarchy, crowded UI, alignment problems, or wanting better composition.
|
|
4
|
-
user-invocable: true
|
|
5
|
-
argument-hint: "[target]"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Assess and improve layout and spacing that feels monotonous, crowded, or structurally weak — turning generic arrangements into intentional, rhythmic compositions.
|
|
9
|
-
|
|
10
|
-
## MANDATORY PREPARATION
|
|
11
|
-
|
|
12
|
-
Invoke /frontend-design — 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.
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Assess Current Layout
|
|
17
|
-
|
|
18
|
-
Analyze what's weak about the current spatial design:
|
|
19
|
-
|
|
20
|
-
1. **Spacing**:
|
|
21
|
-
- Is spacing consistent or arbitrary? (Random padding/margin values)
|
|
22
|
-
- Is all spacing the same? (Equal padding everywhere = no rhythm)
|
|
23
|
-
- Are related elements grouped tightly, with generous space between groups?
|
|
24
|
-
|
|
25
|
-
2. **Visual hierarchy**:
|
|
26
|
-
- Apply the squint test: blur your (metaphorical) eyes — can you still identify the most important element, second most important, and clear groupings?
|
|
27
|
-
- Is hierarchy achieved effectively? (Space and weight alone can be enough — but is the current approach working?)
|
|
28
|
-
- Does whitespace guide the eye to what matters?
|
|
29
|
-
|
|
30
|
-
3. **Grid & structure**:
|
|
31
|
-
- Is there a clear underlying structure, or does the layout feel random?
|
|
32
|
-
- Are identical card grids used everywhere? (Icon + heading + text, repeated endlessly)
|
|
33
|
-
- Is everything centered? (Left-aligned with asymmetric layouts feels more designed, but not a hard and fast rule)
|
|
34
|
-
|
|
35
|
-
4. **Rhythm & variety**:
|
|
36
|
-
- Does the layout have visual rhythm? (Alternating tight/generous spacing)
|
|
37
|
-
- Is every section structured the same way? (Monotonous repetition)
|
|
38
|
-
- Are there intentional moments of surprise or emphasis?
|
|
39
|
-
|
|
40
|
-
5. **Density**:
|
|
41
|
-
- Is the layout too cramped? (Not enough breathing room)
|
|
42
|
-
- Is the layout too sparse? (Excessive whitespace without purpose)
|
|
43
|
-
- Does density match the content type? (Data-dense UIs need tighter spacing; marketing pages need more air)
|
|
44
|
-
|
|
45
|
-
**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.
|
|
46
|
-
|
|
47
|
-
## Plan Layout Improvements
|
|
48
|
-
|
|
49
|
-
Consult the [spatial design reference](reference/spatial-design.md) from the frontend-design skill for detailed guidance on grids, rhythm, and container queries.
|
|
50
|
-
|
|
51
|
-
Create a systematic plan:
|
|
52
|
-
|
|
53
|
-
- **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.
|
|
54
|
-
- **Hierarchy strategy**: How will space communicate importance?
|
|
55
|
-
- **Layout approach**: What structure fits the content? Flex for 1D, Grid for 2D, named areas for complex page layouts.
|
|
56
|
-
- **Rhythm**: Where should spacing be tight vs generous?
|
|
57
|
-
|
|
58
|
-
## Improve Layout Systematically
|
|
59
|
-
|
|
60
|
-
### Establish a Spacing System
|
|
61
|
-
|
|
62
|
-
- 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.
|
|
63
|
-
- Name tokens semantically if using custom properties: `--space-xs` through `--space-xl`, not `--spacing-8`
|
|
64
|
-
- Use `gap` for sibling spacing instead of margins — eliminates margin collapse hacks
|
|
65
|
-
- Apply `clamp()` for fluid spacing that breathes on larger screens
|
|
66
|
-
|
|
67
|
-
### Create Visual Rhythm
|
|
68
|
-
|
|
69
|
-
- **Tight grouping** for related elements (8-12px between siblings)
|
|
70
|
-
- **Generous separation** between distinct sections (48-96px)
|
|
71
|
-
- **Varied spacing** within sections — not every row needs the same gap
|
|
72
|
-
- **Asymmetric compositions** — break the predictable centered-content pattern when it makes sense
|
|
73
|
-
|
|
74
|
-
### Choose the Right Layout Tool
|
|
75
|
-
|
|
76
|
-
- **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.
|
|
77
|
-
- **Use Grid for 2D layouts**: Page-level structure, dashboards, data-dense interfaces, anything where rows AND columns need coordinated control.
|
|
78
|
-
- **Don't default to Grid** when Flexbox with `flex-wrap` would be simpler and more flexible.
|
|
79
|
-
- Use `repeat(auto-fit, minmax(280px, 1fr))` for responsive grids without breakpoints.
|
|
80
|
-
- Use named grid areas (`grid-template-areas`) for complex page layouts — redefine at breakpoints.
|
|
81
|
-
|
|
82
|
-
### Break Card Grid Monotony
|
|
83
|
-
|
|
84
|
-
- Don't default to card grids for everything — spacing and alignment create visual grouping naturally
|
|
85
|
-
- Use cards only when content is truly distinct and actionable — never nest cards inside cards
|
|
86
|
-
- Vary card sizes, span columns, or mix cards with non-card content to break repetition
|
|
87
|
-
|
|
88
|
-
### Strengthen Visual Hierarchy
|
|
89
|
-
|
|
90
|
-
- 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.
|
|
91
|
-
- 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).
|
|
92
|
-
- Create clear content groupings through proximity and separation.
|
|
93
|
-
|
|
94
|
-
### Manage Depth & Elevation
|
|
95
|
-
|
|
96
|
-
- Create a semantic z-index scale (dropdown → sticky → modal-backdrop → modal → toast → tooltip)
|
|
97
|
-
- Build a consistent shadow scale (sm → md → lg → xl) — shadows should be subtle
|
|
98
|
-
- Use elevation to reinforce hierarchy, not as decoration
|
|
99
|
-
|
|
100
|
-
### Optical Adjustments
|
|
101
|
-
|
|
102
|
-
- 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.
|
|
103
|
-
|
|
104
|
-
**NEVER**:
|
|
105
|
-
- Use arbitrary spacing values outside your scale
|
|
106
|
-
- Make all spacing equal — variety creates hierarchy
|
|
107
|
-
- Wrap everything in cards — not everything needs a container
|
|
108
|
-
- Nest cards inside cards — use spacing and dividers for hierarchy within
|
|
109
|
-
- Use identical card grids everywhere (icon + heading + text, repeated)
|
|
110
|
-
- Center everything — left-aligned with asymmetry feels more designed
|
|
111
|
-
- 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.
|
|
112
|
-
- Default to CSS Grid when Flexbox would be simpler — use the simplest tool for the job
|
|
113
|
-
- Use arbitrary z-index values (999, 9999) — build a semantic scale
|
|
114
|
-
|
|
115
|
-
## Verify Layout Improvements
|
|
116
|
-
|
|
117
|
-
- **Squint test**: Can you identify primary, secondary, and groupings with blurred vision?
|
|
118
|
-
- **Rhythm**: Does the page have a satisfying beat of tight and generous spacing?
|
|
119
|
-
- **Hierarchy**: Is the most important content obvious within 2 seconds?
|
|
120
|
-
- **Breathing room**: Does the layout feel comfortable, not cramped or wasteful?
|
|
121
|
-
- **Consistency**: Is the spacing system applied uniformly?
|
|
122
|
-
- **Responsiveness**: Does the layout adapt gracefully across screen sizes?
|
|
123
|
-
|
|
124
|
-
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.
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: extract
|
|
3
|
-
description: Extract and consolidate reusable components, design tokens, and patterns into your design system. Identifies opportunities for systematic reuse and enriches your component library. Use when the user asks to create components, refactor repeated UI patterns, build a design system, or extract tokens.
|
|
4
|
-
user-invocable: true
|
|
5
|
-
argument-hint: "[target]"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Identify reusable patterns, components, and design tokens, then extract and consolidate them into the design system for systematic reuse.
|
|
9
|
-
|
|
10
|
-
## Discover
|
|
11
|
-
|
|
12
|
-
Analyze the target area to identify extraction opportunities:
|
|
13
|
-
|
|
14
|
-
1. **Find the design system**: Locate your design system, component library, or shared UI directory (grep for "design system", "ui", "components", etc.). Understand its structure:
|
|
15
|
-
- Component organization and naming conventions
|
|
16
|
-
- Design token structure (if any)
|
|
17
|
-
- Documentation patterns
|
|
18
|
-
- Import/export conventions
|
|
19
|
-
|
|
20
|
-
**CRITICAL**: If no design system exists, ask before creating one. Understand the preferred location and structure first.
|
|
21
|
-
|
|
22
|
-
2. **Identify patterns**: Look for:
|
|
23
|
-
- **Repeated components**: Similar UI patterns used multiple times (buttons, cards, inputs, etc.)
|
|
24
|
-
- **Hard-coded values**: Colors, spacing, typography, shadows that should be tokens
|
|
25
|
-
- **Inconsistent variations**: Multiple implementations of the same concept (3 different button styles)
|
|
26
|
-
- **Reusable patterns**: Layout patterns, composition patterns, interaction patterns worth systematizing
|
|
27
|
-
|
|
28
|
-
3. **Assess value**: Not everything should be extracted. Consider:
|
|
29
|
-
- Is this used 3+ times, or likely to be reused?
|
|
30
|
-
- Would systematizing this improve consistency?
|
|
31
|
-
- Is this a general pattern or context-specific?
|
|
32
|
-
- What's the maintenance cost vs benefit?
|
|
33
|
-
|
|
34
|
-
## Plan Extraction
|
|
35
|
-
|
|
36
|
-
Create a systematic extraction plan:
|
|
37
|
-
|
|
38
|
-
- **Components to extract**: Which UI elements become reusable components?
|
|
39
|
-
- **Tokens to create**: Which hard-coded values become design tokens?
|
|
40
|
-
- **Variants to support**: What variations does each component need?
|
|
41
|
-
- **Naming conventions**: Component names, token names, prop names that match existing patterns
|
|
42
|
-
- **Migration path**: How to refactor existing uses to consume the new shared versions
|
|
43
|
-
|
|
44
|
-
**IMPORTANT**: Design systems grow incrementally. Extract what's clearly reusable now, not everything that might someday be reusable.
|
|
45
|
-
|
|
46
|
-
## Extract & Enrich
|
|
47
|
-
|
|
48
|
-
Build improved, reusable versions:
|
|
49
|
-
|
|
50
|
-
- **Components**: Create well-designed components with:
|
|
51
|
-
- Clear props API with sensible defaults
|
|
52
|
-
- Proper variants for different use cases
|
|
53
|
-
- Accessibility built in (ARIA, keyboard navigation, focus management)
|
|
54
|
-
- Documentation and usage examples
|
|
55
|
-
|
|
56
|
-
- **Design tokens**: Create tokens with:
|
|
57
|
-
- Clear naming (primitive vs semantic)
|
|
58
|
-
- Proper hierarchy and organization
|
|
59
|
-
- Documentation of when to use each token
|
|
60
|
-
|
|
61
|
-
- **Patterns**: Document patterns with:
|
|
62
|
-
- When to use this pattern
|
|
63
|
-
- Code examples
|
|
64
|
-
- Variations and combinations
|
|
65
|
-
|
|
66
|
-
**NEVER**:
|
|
67
|
-
- Extract one-off, context-specific implementations without generalization
|
|
68
|
-
- Create components so generic they're useless
|
|
69
|
-
- Extract without considering existing design system conventions
|
|
70
|
-
- Skip proper TypeScript types or prop documentation
|
|
71
|
-
- Create tokens for every single value (tokens should have semantic meaning)
|
|
72
|
-
|
|
73
|
-
## Migrate
|
|
74
|
-
|
|
75
|
-
Replace existing uses with the new shared versions:
|
|
76
|
-
|
|
77
|
-
- **Find all instances**: Search for the patterns you've extracted
|
|
78
|
-
- **Replace systematically**: Update each use to consume the shared version
|
|
79
|
-
- **Test thoroughly**: Ensure visual and functional parity
|
|
80
|
-
- **Delete dead code**: Remove the old implementations
|
|
81
|
-
|
|
82
|
-
## Document
|
|
83
|
-
|
|
84
|
-
Update design system documentation:
|
|
85
|
-
|
|
86
|
-
- Add new components to the component library
|
|
87
|
-
- Document token usage and values
|
|
88
|
-
- Add examples and guidelines
|
|
89
|
-
- Update any Storybook or component catalog
|
|
90
|
-
|
|
91
|
-
Remember: A good design system is a living system. Extract patterns as they emerge, enrich them thoughtfully, and maintain them consistently.
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: frontend-design
|
|
3
|
-
description: Create distinctive, production-grade frontend interfaces with high design quality. Generates creative, polished code that avoids generic AI aesthetics. Use when the user asks to build web components, pages, artifacts, posters, or applications, or when any design skill requires project context.
|
|
4
|
-
license: Apache 2.0. Based on Anthropic's frontend-design skill. See NOTICE.md for attribution.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
|
|
8
|
-
|
|
9
|
-
## Context Gathering Protocol
|
|
10
|
-
|
|
11
|
-
Design skills produce generic output without project context. You MUST have confirmed design context before doing any design work.
|
|
12
|
-
|
|
13
|
-
**Required context** — every design skill needs at minimum:
|
|
14
|
-
- **Target audience**: Who uses this product and in what context?
|
|
15
|
-
- **Use cases**: What jobs are they trying to get done?
|
|
16
|
-
- **Brand personality/tone**: How should the interface feel?
|
|
17
|
-
|
|
18
|
-
Individual skills may require additional context — check the skill's preparation section for specifics.
|
|
19
|
-
|
|
20
|
-
**CRITICAL**: You cannot infer this context by reading the codebase. Code tells you what was built, not who it's for or what it should feel like. Only the creator can provide this context.
|
|
21
|
-
|
|
22
|
-
**Gathering order:**
|
|
23
|
-
1. **Check current instructions (instant)**: If your loaded instructions already contain a **Design Context** section, proceed immediately.
|
|
24
|
-
2. **Check .impeccable.md (fast)**: If not in instructions, read `.impeccable.md` from the project root. If it exists and contains the required context, proceed.
|
|
25
|
-
3. **Run teach-impeccable (REQUIRED)**: If neither source has context, you MUST run /teach-impeccable NOW before doing anything else. Do NOT skip this step. Do NOT attempt to infer context from the codebase instead.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Design Direction
|
|
30
|
-
|
|
31
|
-
Commit to a BOLD aesthetic direction:
|
|
32
|
-
- **Purpose**: What problem does this interface solve? Who uses it?
|
|
33
|
-
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
|
|
34
|
-
- **Constraints**: Technical requirements (framework, performance, accessibility).
|
|
35
|
-
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
|
|
36
|
-
|
|
37
|
-
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work—the key is intentionality, not intensity.
|
|
38
|
-
|
|
39
|
-
Then implement working code that is:
|
|
40
|
-
- Production-grade and functional
|
|
41
|
-
- Visually striking and memorable
|
|
42
|
-
- Cohesive with a clear aesthetic point-of-view
|
|
43
|
-
- Meticulously refined in every detail
|
|
44
|
-
|
|
45
|
-
## Frontend Aesthetics Guidelines
|
|
46
|
-
|
|
47
|
-
### Typography
|
|
48
|
-
→ *Consult [typography reference](reference/typography.md) for scales, pairing, and loading strategies.*
|
|
49
|
-
|
|
50
|
-
Choose fonts that are beautiful, unique, and interesting. Pair a distinctive display font with a refined body font.
|
|
51
|
-
|
|
52
|
-
**DO**: Use a modular type scale with fluid sizing (clamp)
|
|
53
|
-
**DO**: Vary font weights and sizes to create clear visual hierarchy
|
|
54
|
-
**DON'T**: Use overused fonts—Inter, Roboto, Arial, Open Sans, system defaults
|
|
55
|
-
**DON'T**: Use monospace typography as lazy shorthand for "technical/developer" vibes
|
|
56
|
-
**DON'T**: Put large icons with rounded corners above every heading—they rarely add value and make sites look templated
|
|
57
|
-
|
|
58
|
-
### Color & Theme
|
|
59
|
-
→ *Consult [color reference](reference/color-and-contrast.md) for OKLCH, palettes, and dark mode.*
|
|
60
|
-
|
|
61
|
-
Commit to a cohesive palette. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
62
|
-
|
|
63
|
-
**DO**: Use modern CSS color functions (oklch, color-mix, light-dark) for perceptually uniform, maintainable palettes
|
|
64
|
-
**DO**: Tint your neutrals toward your brand hue—even a subtle hint creates subconscious cohesion
|
|
65
|
-
**DON'T**: Use gray text on colored backgrounds—it looks washed out; use a shade of the background color instead
|
|
66
|
-
**DON'T**: Use pure black (#000) or pure white (#fff)—always tint; pure black/white never appears in nature
|
|
67
|
-
**DON'T**: Use the AI color palette: cyan-on-dark, purple-to-blue gradients, neon accents on dark backgrounds
|
|
68
|
-
**DON'T**: Use gradient text for "impact"—especially on metrics or headings; it's decorative rather than meaningful
|
|
69
|
-
**DON'T**: Default to dark mode with glowing accents—it looks "cool" without requiring actual design decisions
|
|
70
|
-
|
|
71
|
-
### Layout & Space
|
|
72
|
-
→ *Consult [spatial reference](reference/spatial-design.md) for grids, rhythm, and container queries.*
|
|
73
|
-
|
|
74
|
-
Create visual rhythm through varied spacing—not the same padding everywhere. Embrace asymmetry and unexpected compositions. Break the grid intentionally for emphasis.
|
|
75
|
-
|
|
76
|
-
**DO**: Create visual rhythm through varied spacing—tight groupings, generous separations
|
|
77
|
-
**DO**: Use fluid spacing with clamp() that breathes on larger screens
|
|
78
|
-
**DO**: Use asymmetry and unexpected compositions; break the grid intentionally for emphasis
|
|
79
|
-
**DON'T**: Wrap everything in cards—not everything needs a container
|
|
80
|
-
**DON'T**: Nest cards inside cards—visual noise, flatten the hierarchy
|
|
81
|
-
**DON'T**: Use identical card grids—same-sized cards with icon + heading + text, repeated endlessly
|
|
82
|
-
**DON'T**: Use the hero metric layout template—big number, small label, supporting stats, gradient accent
|
|
83
|
-
**DON'T**: Center everything—left-aligned text with asymmetric layouts feels more designed
|
|
84
|
-
**DON'T**: Use the same spacing everywhere—without rhythm, layouts feel monotonous
|
|
85
|
-
|
|
86
|
-
### Visual Details
|
|
87
|
-
**DO**: Use intentional, purposeful decorative elements that reinforce brand
|
|
88
|
-
**DON'T**: Use glassmorphism everywhere—blur effects, glass cards, glow borders used decoratively rather than purposefully
|
|
89
|
-
**DON'T**: Use rounded elements with thick colored border on one side—a lazy accent that almost never looks intentional
|
|
90
|
-
**DON'T**: Use sparklines as decoration—tiny charts that look sophisticated but convey nothing meaningful
|
|
91
|
-
**DON'T**: Use rounded rectangles with generic drop shadows—safe, forgettable, could be any AI output
|
|
92
|
-
**DON'T**: Use modals unless there's truly no better alternative—modals are lazy
|
|
93
|
-
|
|
94
|
-
### Motion
|
|
95
|
-
→ *Consult [motion reference](reference/motion-design.md) for timing, easing, and reduced motion.*
|
|
96
|
-
|
|
97
|
-
Focus on high-impact moments: one well-orchestrated page load with staggered reveals creates more delight than scattered micro-interactions.
|
|
98
|
-
|
|
99
|
-
**DO**: Use motion to convey state changes—entrances, exits, feedback
|
|
100
|
-
**DO**: Use exponential easing (ease-out-quart/quint/expo) for natural deceleration
|
|
101
|
-
**DO**: For height animations, use grid-template-rows transitions instead of animating height directly
|
|
102
|
-
**DON'T**: Animate layout properties (width, height, padding, margin)—use transform and opacity only
|
|
103
|
-
**DON'T**: Use bounce or elastic easing—they feel dated and tacky; real objects decelerate smoothly
|
|
104
|
-
|
|
105
|
-
### Interaction
|
|
106
|
-
→ *Consult [interaction reference](reference/interaction-design.md) for forms, focus, and loading patterns.*
|
|
107
|
-
|
|
108
|
-
Make interactions feel fast. Use optimistic UI—update immediately, sync later.
|
|
109
|
-
|
|
110
|
-
**DO**: Use progressive disclosure—start simple, reveal sophistication through interaction (basic options first, advanced behind expandable sections; hover states that reveal secondary actions)
|
|
111
|
-
**DO**: Design empty states that teach the interface, not just say "nothing here"
|
|
112
|
-
**DO**: Make every interactive surface feel intentional and responsive
|
|
113
|
-
**DON'T**: Repeat the same information—redundant headers, intros that restate the heading
|
|
114
|
-
**DON'T**: Make every button primary—use ghost buttons, text links, secondary styles; hierarchy matters
|
|
115
|
-
|
|
116
|
-
### Responsive
|
|
117
|
-
→ *Consult [responsive reference](reference/responsive-design.md) for mobile-first, fluid design, and container queries.*
|
|
118
|
-
|
|
119
|
-
**DO**: Use container queries (@container) for component-level responsiveness
|
|
120
|
-
**DO**: Adapt the interface for different contexts—don't just shrink it
|
|
121
|
-
**DON'T**: Hide critical functionality on mobile—adapt the interface, don't amputate it
|
|
122
|
-
|
|
123
|
-
### UX Writing
|
|
124
|
-
→ *Consult [ux-writing reference](reference/ux-writing.md) for labels, errors, and empty states.*
|
|
125
|
-
|
|
126
|
-
**DO**: Make every word earn its place
|
|
127
|
-
**DON'T**: Repeat information users can already see
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## The AI Slop Test
|
|
132
|
-
|
|
133
|
-
**Critical quality check**: If you showed this interface to someone and said "AI made this," would they believe you immediately? If yes, that's the problem.
|
|
134
|
-
|
|
135
|
-
A distinctive interface should make someone ask "how was this made?" not "which AI made this?"
|
|
136
|
-
|
|
137
|
-
Review the DON'T guidelines above—they are the fingerprints of AI-generated work from 2024-2025.
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## Implementation Principles
|
|
142
|
-
|
|
143
|
-
Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details.
|
|
144
|
-
|
|
145
|
-
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices across generations.
|
|
146
|
-
|
|
147
|
-
Remember: the model is capable of extraordinary creative work. Don't hold back—show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# Color & Contrast
|
|
2
|
-
|
|
3
|
-
## Color Spaces: Use OKLCH
|
|
4
|
-
|
|
5
|
-
**Stop using HSL.** Use OKLCH (or LCH) instead. It's perceptually uniform, meaning equal steps in lightness *look* equal—unlike HSL where 50% lightness in yellow looks bright while 50% in blue looks dark.
|
|
6
|
-
|
|
7
|
-
```css
|
|
8
|
-
/* OKLCH: lightness (0-100%), chroma (0-0.4+), hue (0-360) */
|
|
9
|
-
--color-primary: oklch(60% 0.15 250); /* Blue */
|
|
10
|
-
--color-primary-light: oklch(85% 0.08 250); /* Same hue, lighter */
|
|
11
|
-
--color-primary-dark: oklch(35% 0.12 250); /* Same hue, darker */
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
**Key insight**: As you move toward white or black, reduce chroma (saturation). High chroma at extreme lightness looks garish. A light blue at 85% lightness needs ~0.08 chroma, not the 0.15 of your base color.
|
|
15
|
-
|
|
16
|
-
## Building Functional Palettes
|
|
17
|
-
|
|
18
|
-
### The Tinted Neutral Trap
|
|
19
|
-
|
|
20
|
-
**Pure gray is dead.** Add a subtle hint of your brand hue to all neutrals:
|
|
21
|
-
|
|
22
|
-
```css
|
|
23
|
-
/* Dead grays */
|
|
24
|
-
--gray-100: oklch(95% 0 0); /* No personality */
|
|
25
|
-
--gray-900: oklch(15% 0 0);
|
|
26
|
-
|
|
27
|
-
/* Warm-tinted grays (add brand warmth) */
|
|
28
|
-
--gray-100: oklch(95% 0.01 60); /* Hint of warmth */
|
|
29
|
-
--gray-900: oklch(15% 0.01 60);
|
|
30
|
-
|
|
31
|
-
/* Cool-tinted grays (tech, professional) */
|
|
32
|
-
--gray-100: oklch(95% 0.01 250); /* Hint of blue */
|
|
33
|
-
--gray-900: oklch(15% 0.01 250);
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
The chroma is tiny (0.01) but perceptible. It creates subconscious cohesion between your brand color and your UI.
|
|
37
|
-
|
|
38
|
-
### Palette Structure
|
|
39
|
-
|
|
40
|
-
A complete system needs:
|
|
41
|
-
|
|
42
|
-
| Role | Purpose | Example |
|
|
43
|
-
|------|---------|---------|
|
|
44
|
-
| **Primary** | Brand, CTAs, key actions | 1 color, 3-5 shades |
|
|
45
|
-
| **Neutral** | Text, backgrounds, borders | 9-11 shade scale |
|
|
46
|
-
| **Semantic** | Success, error, warning, info | 4 colors, 2-3 shades each |
|
|
47
|
-
| **Surface** | Cards, modals, overlays | 2-3 elevation levels |
|
|
48
|
-
|
|
49
|
-
**Skip secondary/tertiary unless you need them.** Most apps work fine with one accent color. Adding more creates decision fatigue and visual noise.
|
|
50
|
-
|
|
51
|
-
### The 60-30-10 Rule (Applied Correctly)
|
|
52
|
-
|
|
53
|
-
This rule is about **visual weight**, not pixel count:
|
|
54
|
-
|
|
55
|
-
- **60%**: Neutral backgrounds, white space, base surfaces
|
|
56
|
-
- **30%**: Secondary colors—text, borders, inactive states
|
|
57
|
-
- **10%**: Accent—CTAs, highlights, focus states
|
|
58
|
-
|
|
59
|
-
The common mistake: using the accent color everywhere because it's "the brand color." Accent colors work *because* they're rare. Overuse kills their power.
|
|
60
|
-
|
|
61
|
-
## Contrast & Accessibility
|
|
62
|
-
|
|
63
|
-
### WCAG Requirements
|
|
64
|
-
|
|
65
|
-
| Content Type | AA Minimum | AAA Target |
|
|
66
|
-
|--------------|------------|------------|
|
|
67
|
-
| Body text | 4.5:1 | 7:1 |
|
|
68
|
-
| Large text (18px+ or 14px bold) | 3:1 | 4.5:1 |
|
|
69
|
-
| UI components, icons | 3:1 | 4.5:1 |
|
|
70
|
-
| Non-essential decorations | None | None |
|
|
71
|
-
|
|
72
|
-
**The gotcha**: Placeholder text still needs 4.5:1. That light gray placeholder you see everywhere? Usually fails WCAG.
|
|
73
|
-
|
|
74
|
-
### Dangerous Color Combinations
|
|
75
|
-
|
|
76
|
-
These commonly fail contrast or cause readability issues:
|
|
77
|
-
|
|
78
|
-
- Light gray text on white (the #1 accessibility fail)
|
|
79
|
-
- **Gray text on any colored background**—gray looks washed out and dead on color. Use a darker shade of the background color, or transparency
|
|
80
|
-
- Red text on green background (or vice versa)—8% of men can't distinguish these
|
|
81
|
-
- Blue text on red background (vibrates visually)
|
|
82
|
-
- Yellow text on white (almost always fails)
|
|
83
|
-
- Thin light text on images (unpredictable contrast)
|
|
84
|
-
|
|
85
|
-
### Never Use Pure Gray or Pure Black
|
|
86
|
-
|
|
87
|
-
Pure gray (`oklch(50% 0 0)`) and pure black (`#000`) don't exist in nature—real shadows and surfaces always have a color cast. Even a chroma of 0.005-0.01 is enough to feel natural without being obviously tinted. (See tinted neutrals example above.)
|
|
88
|
-
|
|
89
|
-
### Testing
|
|
90
|
-
|
|
91
|
-
Don't trust your eyes. Use tools:
|
|
92
|
-
|
|
93
|
-
- [WebAIM Contrast Checker](https://webaim.org/resources/contrastchecker/)
|
|
94
|
-
- Browser DevTools → Rendering → Emulate vision deficiencies
|
|
95
|
-
- [Polypane](https://polypane.app/) for real-time testing
|
|
96
|
-
|
|
97
|
-
## Theming: Light & Dark Mode
|
|
98
|
-
|
|
99
|
-
### Dark Mode Is Not Inverted Light Mode
|
|
100
|
-
|
|
101
|
-
You can't just swap colors. Dark mode requires different design decisions:
|
|
102
|
-
|
|
103
|
-
| Light Mode | Dark Mode |
|
|
104
|
-
|------------|-----------|
|
|
105
|
-
| Shadows for depth | Lighter surfaces for depth (no shadows) |
|
|
106
|
-
| Dark text on light | Light text on dark (reduce font weight) |
|
|
107
|
-
| Vibrant accents | Desaturate accents slightly |
|
|
108
|
-
| White backgrounds | Never pure black—use dark gray (oklch 12-18%) |
|
|
109
|
-
|
|
110
|
-
```css
|
|
111
|
-
/* Dark mode depth via surface color, not shadow */
|
|
112
|
-
:root[data-theme="dark"] {
|
|
113
|
-
--surface-1: oklch(15% 0.01 250);
|
|
114
|
-
--surface-2: oklch(20% 0.01 250); /* "Higher" = lighter */
|
|
115
|
-
--surface-3: oklch(25% 0.01 250);
|
|
116
|
-
|
|
117
|
-
/* Reduce text weight slightly */
|
|
118
|
-
--body-weight: 350; /* Instead of 400 */
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### Token Hierarchy
|
|
123
|
-
|
|
124
|
-
Use two layers: primitive tokens (`--blue-500`) and semantic tokens (`--color-primary: var(--blue-500)`). For dark mode, only redefine the semantic layer—primitives stay the same.
|
|
125
|
-
|
|
126
|
-
## Alpha Is A Design Smell
|
|
127
|
-
|
|
128
|
-
Heavy use of transparency (rgba, hsla) usually means an incomplete palette. Alpha creates unpredictable contrast, performance overhead, and inconsistency. Define explicit overlay colors for each context instead. Exception: focus rings and interactive states where see-through is needed.
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
**Avoid**: Relying on color alone to convey information. Creating palettes without clear roles for each color. Using pure black (#000) for large areas. Skipping color blindness testing (8% of men affected).
|