create-modern-react 2.3.3 → 2.3.5

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.
Files changed (99) hide show
  1. package/lib/setup.js +24 -1
  2. package/package.json +4 -2
  3. package/scripts/postinstall.js +18 -0
  4. package/templates/base/.claude/skills.tar.gz +0 -0
  5. package/templates/base/.claude/skills/agent-browser/SKILL.md +0 -356
  6. package/templates/base/.claude/skills/agent-browser/references/authentication.md +0 -188
  7. package/templates/base/.claude/skills/agent-browser/references/proxy-support.md +0 -175
  8. package/templates/base/.claude/skills/agent-browser/references/session-management.md +0 -181
  9. package/templates/base/.claude/skills/agent-browser/references/snapshot-refs.md +0 -186
  10. package/templates/base/.claude/skills/agent-browser/references/video-recording.md +0 -162
  11. package/templates/base/.claude/skills/agent-browser/templates/authenticated-session.sh +0 -91
  12. package/templates/base/.claude/skills/agent-browser/templates/capture-workflow.sh +0 -68
  13. package/templates/base/.claude/skills/agent-browser/templates/form-automation.sh +0 -64
  14. package/templates/base/.claude/skills/autoskill/skill.md +0 -134
  15. package/templates/base/.claude/skills/design-principles/skill.md +0 -237
  16. package/templates/base/.claude/skills/frontend-design/skill.md +0 -42
  17. package/templates/base/.claude/skills/learn-together/skill.md +0 -448
  18. package/templates/base/.claude/skills/question-me/skill.md +0 -175
  19. package/templates/base/.claude/skills/react-best-practices/AGENTS.md +0 -2410
  20. package/templates/base/.claude/skills/react-best-practices/README.md +0 -123
  21. package/templates/base/.claude/skills/react-best-practices/SKILL.md +0 -135
  22. package/templates/base/.claude/skills/react-best-practices/metadata.json +0 -15
  23. package/templates/base/.claude/skills/react-best-practices/rules/_sections.md +0 -46
  24. package/templates/base/.claude/skills/react-best-practices/rules/_template.md +0 -28
  25. package/templates/base/.claude/skills/react-best-practices/rules/advanced-event-handler-refs.md +0 -55
  26. package/templates/base/.claude/skills/react-best-practices/rules/advanced-use-latest.md +0 -49
  27. package/templates/base/.claude/skills/react-best-practices/rules/async-api-routes.md +0 -38
  28. package/templates/base/.claude/skills/react-best-practices/rules/async-defer-await.md +0 -80
  29. package/templates/base/.claude/skills/react-best-practices/rules/async-dependencies.md +0 -36
  30. package/templates/base/.claude/skills/react-best-practices/rules/async-parallel.md +0 -28
  31. package/templates/base/.claude/skills/react-best-practices/rules/async-suspense-boundaries.md +0 -99
  32. package/templates/base/.claude/skills/react-best-practices/rules/bundle-barrel-imports.md +0 -59
  33. package/templates/base/.claude/skills/react-best-practices/rules/bundle-conditional.md +0 -31
  34. package/templates/base/.claude/skills/react-best-practices/rules/bundle-defer-third-party.md +0 -49
  35. package/templates/base/.claude/skills/react-best-practices/rules/bundle-dynamic-imports.md +0 -35
  36. package/templates/base/.claude/skills/react-best-practices/rules/bundle-preload.md +0 -50
  37. package/templates/base/.claude/skills/react-best-practices/rules/client-event-listeners.md +0 -74
  38. package/templates/base/.claude/skills/react-best-practices/rules/client-localstorage-schema.md +0 -71
  39. package/templates/base/.claude/skills/react-best-practices/rules/client-passive-event-listeners.md +0 -48
  40. package/templates/base/.claude/skills/react-best-practices/rules/client-swr-dedup.md +0 -56
  41. package/templates/base/.claude/skills/react-best-practices/rules/js-batch-dom-css.md +0 -57
  42. package/templates/base/.claude/skills/react-best-practices/rules/js-cache-function-results.md +0 -80
  43. package/templates/base/.claude/skills/react-best-practices/rules/js-cache-property-access.md +0 -28
  44. package/templates/base/.claude/skills/react-best-practices/rules/js-cache-storage.md +0 -70
  45. package/templates/base/.claude/skills/react-best-practices/rules/js-combine-iterations.md +0 -32
  46. package/templates/base/.claude/skills/react-best-practices/rules/js-early-exit.md +0 -50
  47. package/templates/base/.claude/skills/react-best-practices/rules/js-hoist-regexp.md +0 -45
  48. package/templates/base/.claude/skills/react-best-practices/rules/js-index-maps.md +0 -37
  49. package/templates/base/.claude/skills/react-best-practices/rules/js-length-check-first.md +0 -49
  50. package/templates/base/.claude/skills/react-best-practices/rules/js-min-max-loop.md +0 -82
  51. package/templates/base/.claude/skills/react-best-practices/rules/js-set-map-lookups.md +0 -24
  52. package/templates/base/.claude/skills/react-best-practices/rules/js-tosorted-immutable.md +0 -57
  53. package/templates/base/.claude/skills/react-best-practices/rules/rendering-activity.md +0 -26
  54. package/templates/base/.claude/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
  55. package/templates/base/.claude/skills/react-best-practices/rules/rendering-conditional-render.md +0 -40
  56. package/templates/base/.claude/skills/react-best-practices/rules/rendering-content-visibility.md +0 -38
  57. package/templates/base/.claude/skills/react-best-practices/rules/rendering-hoist-jsx.md +0 -46
  58. package/templates/base/.claude/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
  59. package/templates/base/.claude/skills/react-best-practices/rules/rendering-svg-precision.md +0 -28
  60. package/templates/base/.claude/skills/react-best-practices/rules/rerender-defer-reads.md +0 -39
  61. package/templates/base/.claude/skills/react-best-practices/rules/rerender-dependencies.md +0 -45
  62. package/templates/base/.claude/skills/react-best-practices/rules/rerender-derived-state.md +0 -29
  63. package/templates/base/.claude/skills/react-best-practices/rules/rerender-functional-setstate.md +0 -74
  64. package/templates/base/.claude/skills/react-best-practices/rules/rerender-lazy-state-init.md +0 -58
  65. package/templates/base/.claude/skills/react-best-practices/rules/rerender-memo.md +0 -44
  66. package/templates/base/.claude/skills/react-best-practices/rules/rerender-transitions.md +0 -40
  67. package/templates/base/.claude/skills/react-best-practices/rules/server-after-nonblocking.md +0 -73
  68. package/templates/base/.claude/skills/react-best-practices/rules/server-cache-lru.md +0 -41
  69. package/templates/base/.claude/skills/react-best-practices/rules/server-cache-react.md +0 -76
  70. package/templates/base/.claude/skills/react-best-practices/rules/server-parallel-fetching.md +0 -83
  71. package/templates/base/.claude/skills/react-best-practices/rules/server-serialization.md +0 -38
  72. package/templates/base/.claude/skills/ui-ux-pro-max/SKILL.md +0 -377
  73. package/templates/base/.claude/skills/ui-ux-pro-max/data/charts.csv +0 -26
  74. package/templates/base/.claude/skills/ui-ux-pro-max/data/colors.csv +0 -97
  75. package/templates/base/.claude/skills/ui-ux-pro-max/data/icons.csv +0 -101
  76. package/templates/base/.claude/skills/ui-ux-pro-max/data/landing.csv +0 -31
  77. package/templates/base/.claude/skills/ui-ux-pro-max/data/products.csv +0 -97
  78. package/templates/base/.claude/skills/ui-ux-pro-max/data/react-performance.csv +0 -45
  79. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +0 -54
  80. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  81. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  82. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  83. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  84. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  85. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  86. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +0 -53
  87. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +0 -54
  88. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  89. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  90. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  91. package/templates/base/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  92. package/templates/base/.claude/skills/ui-ux-pro-max/data/styles.csv +0 -68
  93. package/templates/base/.claude/skills/ui-ux-pro-max/data/typography.csv +0 -58
  94. package/templates/base/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
  95. package/templates/base/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  96. package/templates/base/.claude/skills/ui-ux-pro-max/data/web-interface.csv +0 -31
  97. package/templates/base/.claude/skills/ui-ux-pro-max/scripts/core.py +0 -253
  98. package/templates/base/.claude/skills/ui-ux-pro-max/scripts/design_system.py +0 -1067
  99. package/templates/base/.claude/skills/ui-ux-pro-max/scripts/search.py +0 -106
@@ -1,91 +0,0 @@
1
- #!/bin/bash
2
- # Template: Authenticated Session Workflow
3
- # Login once, save state, reuse for subsequent runs
4
- #
5
- # Usage:
6
- # ./authenticated-session.sh <login-url> [state-file]
7
- #
8
- # Setup:
9
- # 1. Run once to see your form structure
10
- # 2. Note the @refs for your fields
11
- # 3. Uncomment LOGIN FLOW section and update refs
12
-
13
- set -euo pipefail
14
-
15
- LOGIN_URL="${1:?Usage: $0 <login-url> [state-file]}"
16
- STATE_FILE="${2:-./auth-state.json}"
17
-
18
- echo "Authentication workflow for: $LOGIN_URL"
19
-
20
- # ══════════════════════════════════════════════════════════════
21
- # SAVED STATE: Skip login if we have valid saved state
22
- # ══════════════════════════════════════════════════════════════
23
- if [[ -f "$STATE_FILE" ]]; then
24
- echo "Loading saved authentication state..."
25
- agent-browser state load "$STATE_FILE"
26
- agent-browser open "$LOGIN_URL"
27
- agent-browser wait --load networkidle
28
-
29
- CURRENT_URL=$(agent-browser get url)
30
- if [[ "$CURRENT_URL" != *"login"* ]] && [[ "$CURRENT_URL" != *"signin"* ]]; then
31
- echo "Session restored successfully!"
32
- agent-browser snapshot -i
33
- exit 0
34
- fi
35
- echo "Session expired, performing fresh login..."
36
- rm -f "$STATE_FILE"
37
- fi
38
-
39
- # ══════════════════════════════════════════════════════════════
40
- # DISCOVERY MODE: Show form structure (remove after setup)
41
- # ══════════════════════════════════════════════════════════════
42
- echo "Opening login page..."
43
- agent-browser open "$LOGIN_URL"
44
- agent-browser wait --load networkidle
45
-
46
- echo ""
47
- echo "┌─────────────────────────────────────────────────────────┐"
48
- echo "│ LOGIN FORM STRUCTURE │"
49
- echo "├─────────────────────────────────────────────────────────┤"
50
- agent-browser snapshot -i
51
- echo "└─────────────────────────────────────────────────────────┘"
52
- echo ""
53
- echo "Next steps:"
54
- echo " 1. Note refs: @e? = username, @e? = password, @e? = submit"
55
- echo " 2. Uncomment LOGIN FLOW section below"
56
- echo " 3. Replace @e1, @e2, @e3 with your refs"
57
- echo " 4. Delete this DISCOVERY MODE section"
58
- echo ""
59
- agent-browser close
60
- exit 0
61
-
62
- # ══════════════════════════════════════════════════════════════
63
- # LOGIN FLOW: Uncomment and customize after discovery
64
- # ══════════════════════════════════════════════════════════════
65
- # : "${APP_USERNAME:?Set APP_USERNAME environment variable}"
66
- # : "${APP_PASSWORD:?Set APP_PASSWORD environment variable}"
67
- #
68
- # agent-browser open "$LOGIN_URL"
69
- # agent-browser wait --load networkidle
70
- # agent-browser snapshot -i
71
- #
72
- # # Fill credentials (update refs to match your form)
73
- # agent-browser fill @e1 "$APP_USERNAME"
74
- # agent-browser fill @e2 "$APP_PASSWORD"
75
- # agent-browser click @e3
76
- # agent-browser wait --load networkidle
77
- #
78
- # # Verify login succeeded
79
- # FINAL_URL=$(agent-browser get url)
80
- # if [[ "$FINAL_URL" == *"login"* ]] || [[ "$FINAL_URL" == *"signin"* ]]; then
81
- # echo "ERROR: Login failed - still on login page"
82
- # agent-browser screenshot /tmp/login-failed.png
83
- # agent-browser close
84
- # exit 1
85
- # fi
86
- #
87
- # # Save state for future runs
88
- # echo "Saving authentication state to: $STATE_FILE"
89
- # agent-browser state save "$STATE_FILE"
90
- # echo "Login successful!"
91
- # agent-browser snapshot -i
@@ -1,68 +0,0 @@
1
- #!/bin/bash
2
- # Template: Content Capture Workflow
3
- # Extract content from web pages with optional authentication
4
-
5
- set -euo pipefail
6
-
7
- TARGET_URL="${1:?Usage: $0 <url> [output-dir]}"
8
- OUTPUT_DIR="${2:-.}"
9
-
10
- echo "Capturing content from: $TARGET_URL"
11
- mkdir -p "$OUTPUT_DIR"
12
-
13
- # Optional: Load authentication state if needed
14
- # if [[ -f "./auth-state.json" ]]; then
15
- # agent-browser state load "./auth-state.json"
16
- # fi
17
-
18
- # Navigate to target page
19
- agent-browser open "$TARGET_URL"
20
- agent-browser wait --load networkidle
21
-
22
- # Get page metadata
23
- echo "Page title: $(agent-browser get title)"
24
- echo "Page URL: $(agent-browser get url)"
25
-
26
- # Capture full page screenshot
27
- agent-browser screenshot --full "$OUTPUT_DIR/page-full.png"
28
- echo "Screenshot saved: $OUTPUT_DIR/page-full.png"
29
-
30
- # Get page structure
31
- agent-browser snapshot -i > "$OUTPUT_DIR/page-structure.txt"
32
- echo "Structure saved: $OUTPUT_DIR/page-structure.txt"
33
-
34
- # Extract main content
35
- # Adjust selector based on target site structure
36
- # agent-browser get text @e1 > "$OUTPUT_DIR/main-content.txt"
37
-
38
- # Extract specific elements (uncomment as needed)
39
- # agent-browser get text "article" > "$OUTPUT_DIR/article.txt"
40
- # agent-browser get text "main" > "$OUTPUT_DIR/main.txt"
41
- # agent-browser get text ".content" > "$OUTPUT_DIR/content.txt"
42
-
43
- # Get full page text
44
- agent-browser get text body > "$OUTPUT_DIR/page-text.txt"
45
- echo "Text content saved: $OUTPUT_DIR/page-text.txt"
46
-
47
- # Optional: Save as PDF
48
- agent-browser pdf "$OUTPUT_DIR/page.pdf"
49
- echo "PDF saved: $OUTPUT_DIR/page.pdf"
50
-
51
- # Optional: Capture with scrolling for infinite scroll pages
52
- # scroll_and_capture() {
53
- # local count=0
54
- # while [[ $count -lt 5 ]]; do
55
- # agent-browser scroll down 1000
56
- # agent-browser wait 1000
57
- # ((count++))
58
- # done
59
- # agent-browser screenshot --full "$OUTPUT_DIR/page-scrolled.png"
60
- # }
61
- # scroll_and_capture
62
-
63
- # Cleanup
64
- agent-browser close
65
-
66
- echo ""
67
- echo "Capture complete! Files saved to: $OUTPUT_DIR"
68
- ls -la "$OUTPUT_DIR"
@@ -1,64 +0,0 @@
1
- #!/bin/bash
2
- # Template: Form Automation Workflow
3
- # Fills and submits web forms with validation
4
-
5
- set -euo pipefail
6
-
7
- FORM_URL="${1:?Usage: $0 <form-url>}"
8
-
9
- echo "Automating form at: $FORM_URL"
10
-
11
- # Navigate to form page
12
- agent-browser open "$FORM_URL"
13
- agent-browser wait --load networkidle
14
-
15
- # Get interactive snapshot to identify form fields
16
- echo "Analyzing form structure..."
17
- agent-browser snapshot -i
18
-
19
- # Example: Fill common form fields
20
- # Uncomment and modify refs based on snapshot output
21
-
22
- # Text inputs
23
- # agent-browser fill @e1 "John Doe" # Name field
24
- # agent-browser fill @e2 "user@example.com" # Email field
25
- # agent-browser fill @e3 "+1-555-123-4567" # Phone field
26
-
27
- # Password fields
28
- # agent-browser fill @e4 "SecureP@ssw0rd!"
29
-
30
- # Dropdowns
31
- # agent-browser select @e5 "Option Value"
32
-
33
- # Checkboxes
34
- # agent-browser check @e6 # Check
35
- # agent-browser uncheck @e7 # Uncheck
36
-
37
- # Radio buttons
38
- # agent-browser click @e8 # Select radio option
39
-
40
- # Text areas
41
- # agent-browser fill @e9 "Multi-line text content here"
42
-
43
- # File uploads
44
- # agent-browser upload @e10 /path/to/file.pdf
45
-
46
- # Submit form
47
- # agent-browser click @e11 # Submit button
48
-
49
- # Wait for response
50
- # agent-browser wait --load networkidle
51
- # agent-browser wait --url "**/success" # Or wait for redirect
52
-
53
- # Verify submission
54
- echo "Form submission result:"
55
- agent-browser get url
56
- agent-browser snapshot -i
57
-
58
- # Take screenshot of result
59
- agent-browser screenshot /tmp/form-result.png
60
-
61
- # Cleanup
62
- agent-browser close
63
-
64
- echo "Form automation complete"
@@ -1,134 +0,0 @@
1
- ---
2
- name: autoskill
3
- description: Analyze coding sessions to detect corrections and preferences, then propose targeted improvements to Skills used in the session. Use this skill when the user asks to "learn from this session", "update skills", or "remember this pattern". Extracts durable preferences and codifies them into the appropriate skill files.
4
- license: Complete terms in LICENSE.txt
5
- ---
6
-
7
- This skill analyzes coding sessions to extract durable preferences from corrections and approvals, then proposes targeted updates to Skills that were active during the session. It acts as a learning mechanism across sessions, ensuring Claude improves based on feedback.
8
-
9
- The user triggers autoskill after a session where Skills were used. The skill detects signals, filters for quality, maps them to the relevant Skill files, and proposes minimal, reversible edits for review.
10
-
11
- ## When to activate
12
-
13
- Trigger on explicit requests:
14
- - "autoskill", "learn from this session", "update skills from these corrections"
15
- - "remember this pattern", "make sure you do X next time"
16
-
17
- Do NOT activate for one-off corrections or when the user declines skill modifications.
18
-
19
- ## Signal detection
20
-
21
- Scan the session for:
22
-
23
- **Corrections** (highest value)
24
- - "No, use X instead of Y"
25
- - "We always do it this way"
26
- - "Don't do X in this codebase"
27
-
28
- **Repeated patterns** (high value)
29
- - Same feedback given 2+ times
30
- - Consistent naming/structure choices across multiple files
31
-
32
- **Approvals** (supporting evidence)
33
- - "Yes, that's right"
34
- - "Perfect, keep doing it this way"
35
-
36
- **Ignore:**
37
- - Context-specific one-offs ("use X here" without "always")
38
- - Ambiguous feedback
39
- - Contradictory signals (ask for clarification instead)
40
-
41
- ## Signal quality filter
42
-
43
- Before proposing any change, ask:
44
- 1. Was this correction repeated, or stated as a general rule?
45
- 2. Would this apply to future sessions, or just this task?
46
- 3. Is it specific enough to be actionable?
47
- 4. Is this **new information** I wouldn't already know?
48
-
49
- Only propose changes that pass all four.
50
-
51
- ### What counts as "new information"
52
-
53
- **Worth capturing:**
54
- - Project-specific conventions ("we use `cn()` not `clsx()` here")
55
- - Custom component/utility locations ("buttons are in `@/components/ui`")
56
- - Team preferences that differ from defaults ("we prefer explicit returns")
57
- - Domain-specific terminology or patterns
58
- - Non-obvious architectural decisions ("auth logic lives in middleware, not components")
59
- - Integrations and API quirks specific to this stack
60
-
61
- **NOT worth capturing (I already know this):**
62
- - General best practices (DRY, separation of concerns)
63
- - Language/framework conventions (React hooks rules, TypeScript basics)
64
- - Common library usage (standard Tailwind classes, typical Next.js patterns)
65
- - Universal security practices (input validation, SQL injection prevention)
66
- - Standard accessibility guidelines
67
-
68
- If I'd give the same advice to any project, it doesn't belong in a skill.
69
-
70
- ## Mapping signals to Skills
71
-
72
- Match each signal to the Skill that was active and relevant during the session:
73
-
74
- - If the signal relates to a Skill that was used, update that Skill's `SKILL.md`
75
- - If 3+ related signals don't fit any active Skill, propose a new Skill
76
- - Ignore signals that don't map to any Skill used in the session
77
-
78
- ## Proposing changes
79
-
80
- For each proposed edit, provide:
81
-
82
- ```
83
- File: path/to/SKILL.md
84
- Section: [existing section or "new section: X"]
85
- Confidence: HIGH | MEDIUM
86
-
87
- Signal: "[exact user quote or paraphrase]"
88
-
89
- Current text (if modifying):
90
- > existing content
91
-
92
- Proposed text:
93
- > updated content
94
-
95
- Rationale: [one sentence]
96
- ```
97
-
98
- Group proposals by file. Present HIGH confidence changes first.
99
-
100
- ## Review flow
101
-
102
- Always present changes for review before applying. Format:
103
-
104
- ```
105
- ## autoskill summary
106
-
107
- Detected [N] durable preferences from this session.
108
-
109
- ### HIGH confidence (recommended to apply)
110
- - [change 1]
111
- - [change 2]
112
-
113
- ### MEDIUM confidence (review carefully)
114
- - [change 3]
115
-
116
- Apply high confidence changes? [y/n/selective]
117
- ```
118
-
119
- Wait for explicit approval before editing any file.
120
-
121
- ## Applying changes
122
-
123
- When approved:
124
- 1. Edit the target file with minimal, focused changes
125
- 2. If git is available, commit with message: `chore(autoskill): [brief description]`
126
- 3. Report what was changed
127
-
128
- ## Constraints
129
-
130
- - Never delete existing rules without explicit instruction
131
- - Prefer additive changes over rewrites
132
- - One concept per change (easy to revert)
133
- - Preserve existing file structure and tone
134
- - When uncertain, downgrade to MEDIUM confidence and ask
@@ -1,237 +0,0 @@
1
- ---
2
- name: design-principles
3
- description: Enforce a precise, minimal design system inspired by Linear, Notion, and Stripe. Use this skill when building dashboards, admin interfaces, or any UI that needs Jony Ive-level precision - clean, modern, minimalist with taste. Every pixel matters.
4
- ---
5
-
6
- # Design Principles
7
-
8
- This skill enforces precise, crafted design for enterprise software, SaaS dashboards, admin interfaces, and web applications. The philosophy is Jony Ive-level precision with intentional personality — every interface is polished, and each is designed for its specific context.
9
-
10
- ## Design Direction (REQUIRED)
11
-
12
- **Before writing any code, commit to a design direction.** Don't default. Think about what this specific product needs to feel like.
13
-
14
- ### Think About Context
15
-
16
- - **What does this product do?** A finance tool needs different energy than a creative tool.
17
- - **Who uses it?** Power users want density. Occasional users want guidance.
18
- - **What's the emotional job?** Trust? Efficiency? Delight? Focus?
19
- - **What would make this memorable?** Every product has a chance to feel distinctive.
20
-
21
- ### Choose a Personality
22
-
23
- Enterprise/SaaS UI has more range than you think. Consider these directions:
24
-
25
- **Precision & Density** — Tight spacing, monochrome, information-forward. For power users who live in the tool. Think Linear, Raycast, terminal aesthetics.
26
-
27
- **Warmth & Approachability** — Generous spacing, soft shadows, friendly colors. For products that want to feel human. Think Notion, Coda, collaborative tools.
28
-
29
- **Sophistication & Trust** — Cool tones, layered depth, financial gravitas. For products handling money or sensitive data. Think Stripe, Mercury, enterprise B2B.
30
-
31
- **Boldness & Clarity** — High contrast, dramatic negative space, confident typography. For products that want to feel modern and decisive. Think Vercel, minimal dashboards.
32
-
33
- **Utility & Function** — Muted palette, functional density, clear hierarchy. For products where the work matters more than the chrome. Think GitHub, developer tools.
34
-
35
- **Data & Analysis** — Chart-optimized, technical but accessible, numbers as first-class citizens. For analytics, metrics, business intelligence.
36
-
37
- Pick one. Or blend two. But commit to a direction that fits the product.
38
-
39
- ### Choose a Color Foundation
40
-
41
- **Don't default to warm neutrals.** Consider the product:
42
-
43
- - **Warm foundations** (creams, warm grays) — approachable, comfortable, human
44
- - **Cool foundations** (slate, blue-gray) — professional, trustworthy, serious
45
- - **Pure neutrals** (true grays, black/white) — minimal, bold, technical
46
- - **Tinted foundations** (slight color cast) — distinctive, memorable, branded
47
-
48
- **Light or dark?** Dark modes aren't just light modes inverted. Dark feels technical, focused, premium. Light feels open, approachable, clean. Choose based on context.
49
-
50
- **Accent color** — Pick ONE that means something. Blue for trust. Green for growth. Orange for energy. Violet for creativity. Don't just reach for the same accent every time.
51
-
52
- ### Choose a Layout Approach
53
-
54
- The content should drive the layout:
55
-
56
- - **Dense grids** for information-heavy interfaces where users scan and compare
57
- - **Generous spacing** for focused tasks where users need to concentrate
58
- - **Sidebar navigation** for multi-section apps with many destinations
59
- - **Top navigation** for simpler tools with fewer sections
60
- - **Split panels** for list-detail patterns where context matters
61
-
62
- ### Choose Typography
63
-
64
- Typography sets tone. Don't always default:
65
-
66
- - **System fonts** — fast, native, invisible (good for utility-focused products)
67
- - **Geometric sans** (Geist, Inter) — modern, clean, technical
68
- - **Humanist sans** (SF Pro, Satoshi) — warmer, more approachable
69
- - **Monospace influence** — technical, developer-focused, data-heavy
70
-
71
- ---
72
-
73
- ## Core Craft Principles
74
-
75
- These apply regardless of design direction. This is the quality floor.
76
-
77
- ### The 4px Grid
78
- All spacing uses a 4px base grid:
79
- - `4px` - micro spacing (icon gaps)
80
- - `8px` - tight spacing (within components)
81
- - `12px` - standard spacing (between related elements)
82
- - `16px` - comfortable spacing (section padding)
83
- - `24px` - generous spacing (between sections)
84
- - `32px` - major separation
85
-
86
- ### Symmetrical Padding
87
- **TLBR must match.** If top padding is 16px, left/bottom/right must also be 16px. Exception: when content naturally creates visual balance.
88
-
89
- ```css
90
- /* Good */
91
- padding: 16px;
92
- padding: 12px 16px; /* Only when horizontal needs more room */
93
-
94
- /* Bad */
95
- padding: 24px 16px 12px 16px;
96
- ```
97
-
98
- ### Border Radius Consistency
99
- Stick to the 4px grid. Sharper corners feel technical, rounder corners feel friendly. Pick a system and commit:
100
-
101
- - Sharp: 4px, 6px, 8px
102
- - Soft: 8px, 12px
103
- - Minimal: 2px, 4px, 6px
104
-
105
- Don't mix systems. Consistency creates coherence.
106
-
107
- ### Depth & Elevation Strategy
108
-
109
- **Match your depth approach to your design direction.** Depth is a tool, not a requirement. Different products need different approaches:
110
-
111
- **Borders-only (flat)** — Clean, technical, dense. Works for utility-focused tools where information density matters more than visual lift. Linear, Raycast, and many developer tools use almost no shadows — just subtle borders to define regions. This isn't lazy; it's intentional restraint.
112
-
113
- **Subtle single shadows** — Soft lift without complexity. A simple `0 1px 3px rgba(0,0,0,0.08)` can be enough. Works for approachable products that want gentle depth without the weight of layered shadows.
114
-
115
- **Layered shadows** — Rich, premium, dimensional. Multiple shadow layers create realistic depth for products that want to feel substantial. Stripe and Mercury use this approach. Best for cards that need to feel like physical objects.
116
-
117
- **Surface color shifts** — Background tints establish hierarchy without any shadows. A card at `#fff` on a `#f8fafc` background already feels elevated. Shadows can reinforce this, but color does the heavy lifting.
118
-
119
- Choose ONE approach and commit. Mixing flat borders on some cards with heavy shadows on others creates visual inconsistency.
120
-
121
- ```css
122
- /* Borders-only approach */
123
- --border: rgba(0, 0, 0, 0.08);
124
- --border-subtle: rgba(0, 0, 0, 0.05);
125
- border: 0.5px solid var(--border);
126
-
127
- /* Single shadow approach */
128
- --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
129
-
130
- /* Layered shadow approach (when appropriate) */
131
- --shadow-layered:
132
- 0 0 0 0.5px rgba(0, 0, 0, 0.05),
133
- 0 1px 2px rgba(0, 0, 0, 0.04),
134
- 0 2px 4px rgba(0, 0, 0, 0.03),
135
- 0 4px 8px rgba(0, 0, 0, 0.02);
136
- ```
137
-
138
- **The craft is in the choice, not the complexity.** A flat interface with perfect spacing and typography is more polished than a shadow-heavy interface with sloppy details.
139
-
140
- ### Card Layouts Vary, Surface Treatment Stays Consistent
141
- Monotonous card layouts are lazy design. A metric card doesn't have to look like a plan card doesn't have to look like a settings card. One might have a sparkline, another an avatar stack, another a progress ring, another a two-column split.
142
-
143
- Design each card's internal structure for its specific content — but keep the surface treatment consistent: same border weight, shadow depth, corner radius, padding scale, typography. Cohesion comes from the container chrome, not from forcing every card into the same layout template.
144
-
145
- ### Isolated Controls
146
- UI controls deserve container treatment. Date pickers, filters, dropdowns — these should feel like crafted objects sitting on the page, not plain text with click handlers.
147
-
148
- **Never use native form elements for styled UI.** Native `<select>`, `<input type="date">`, and similar elements render OS-native dropdowns and pickers that cannot be styled. Build custom components instead:
149
-
150
- - Custom select: trigger button + positioned dropdown menu
151
- - Custom date picker: input + calendar popover
152
- - Custom checkbox/radio: styled div with state management
153
-
154
- **Custom select triggers must use `display: inline-flex` with `white-space: nowrap`** to keep text and chevron icons on the same row. Without this, flex children can wrap to new lines.
155
-
156
- ### Typography Hierarchy
157
- - Headlines: 600 weight, tight letter-spacing (-0.02em)
158
- - Body: 400-500 weight, standard tracking
159
- - Labels: 500 weight, slight positive tracking for uppercase
160
- - Scale: 11px, 12px, 13px, 14px (base), 16px, 18px, 24px, 32px
161
-
162
- ### Monospace for Data
163
- Numbers, IDs, codes, timestamps belong in monospace. Use `tabular-nums` for columnar alignment. Mono signals "this is data."
164
-
165
- ### Iconography
166
- Use **Phosphor Icons** (`@phosphor-icons/react`). Icons clarify, not decorate — if removing an icon loses no meaning, remove it.
167
-
168
- Give standalone icons presence with subtle background containers.
169
-
170
- ### Animation
171
- - 150ms for micro-interactions, 200-250ms for larger transitions
172
- - Easing: `cubic-bezier(0.25, 1, 0.5, 1)`
173
- - No spring/bouncy effects in enterprise UI
174
-
175
- ### Contrast Hierarchy
176
- Build a four-level system: foreground (primary) → secondary → muted → faint. Use all four consistently.
177
-
178
- ### Color for Meaning Only
179
- Gray builds structure. Color only appears when it communicates: status, action, error, success. Decorative color is noise.
180
-
181
- When building data-heavy interfaces, ask whether each use of color is earning its place. Score bars don't need to be color-coded by performance — a single muted color works. Grade badges don't need traffic-light colors — typography can do the hierarchy work. Look at how GitHub renders tables and lists: almost entirely monochrome, with color reserved for status indicators and actionable elements.
182
-
183
- ---
184
-
185
- ## Navigation Context
186
-
187
- Screens need grounding. A data table floating in space feels like a component demo, not a product. Consider including:
188
-
189
- - **Navigation** — sidebar or top nav showing where you are in the app
190
- - **Location indicator** — breadcrumbs, page title, or active nav state
191
- - **User context** — who's logged in, what workspace/org
192
-
193
- When building sidebars, consider using the same background as the main content area. Tools like Supabase, Linear, and Vercel rely on a subtle border for separation rather than different background colors. This reduces visual weight and feels more unified.
194
-
195
- ---
196
-
197
- ## Dark Mode Considerations
198
-
199
- Dark interfaces have different needs:
200
-
201
- **Borders over shadows** — Shadows are less visible on dark backgrounds. Lean more on borders for definition. A border at 10-15% white opacity might look nearly invisible but it's doing its job — resist the urge to make it more prominent.
202
-
203
- **Adjust semantic colors** — Status colors (success, warning, error) often need to be slightly desaturated or adjusted for dark backgrounds to avoid feeling harsh.
204
-
205
- **Same structure, different values** — The hierarchy system (foreground → secondary → muted → faint) still applies, just with inverted values.
206
-
207
- ---
208
-
209
- ## Anti-Patterns
210
-
211
- ### Never Do This
212
- - Dramatic drop shadows (`box-shadow: 0 25px 50px...`)
213
- - Large border radius (16px+) on small elements
214
- - Asymmetric padding without clear reason
215
- - Pure white cards on colored backgrounds
216
- - Thick borders (2px+) for decoration
217
- - Excessive spacing (margins > 48px between sections)
218
- - Spring/bouncy animations
219
- - Gradients for decoration
220
- - Multiple accent colors in one interface
221
-
222
- ### Always Question
223
- - "Did I think about what this product needs, or did I default?"
224
- - "Does this direction fit the context and users?"
225
- - "Does this element feel crafted?"
226
- - "Is my depth strategy consistent and intentional?"
227
- - "Are all elements on the grid?"
228
-
229
- ---
230
-
231
- ## The Standard
232
-
233
- Every interface should look designed by a team that obsesses over 1-pixel differences. Not stripped — *crafted*. And designed for its specific context.
234
-
235
- Different products want different things. A developer tool wants precision and density. A collaborative product wants warmth and space. A financial product wants trust and sophistication. Let the product context guide the aesthetic.
236
-
237
- The goal: intricate minimalism with appropriate personality. Same quality bar, context-driven execution.
@@ -1,42 +0,0 @@
1
- ---
2
- name: frontend-design
3
- description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
4
- license: Complete terms in LICENSE.txt
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
- The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
10
-
11
- ## Design Thinking
12
-
13
- Before coding, understand the context and commit to a BOLD aesthetic direction:
14
- - **Purpose**: What problem does this interface solve? Who uses it?
15
- - **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.
16
- - **Constraints**: Technical requirements (framework, performance, accessibility).
17
- - **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
18
-
19
- **CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
20
-
21
- Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
22
- - Production-grade and functional
23
- - Visually striking and memorable
24
- - Cohesive with a clear aesthetic point-of-view
25
- - Meticulously refined in every detail
26
-
27
- ## Frontend Aesthetics Guidelines
28
-
29
- Focus on:
30
- - **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
31
- - **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
32
- - **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
33
- - **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
34
- - **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
35
-
36
- NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
37
-
38
- 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 (Space Grotesk, for example) across generations.
39
-
40
- **IMPORTANT**: 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. Elegance comes from executing the vision well.
41
-
42
- Remember: Claude 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.