@kood/claude-code 0.3.11 → 0.3.12

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 (50) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/templates/.claude/skills/vercel-react-best-practices/AGENTS.md +2249 -0
  4. package/templates/.claude/skills/vercel-react-best-practices/SKILL.md +125 -0
  5. package/templates/.claude/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  6. package/templates/.claude/skills/vercel-react-best-practices/rules/advanced-use-latest.md +49 -0
  7. package/templates/.claude/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
  8. package/templates/.claude/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
  9. package/templates/.claude/skills/vercel-react-best-practices/rules/async-dependencies.md +36 -0
  10. package/templates/.claude/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
  11. package/templates/.claude/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  12. package/templates/.claude/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
  13. package/templates/.claude/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
  14. package/templates/.claude/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  15. package/templates/.claude/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  16. package/templates/.claude/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
  17. package/templates/.claude/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
  18. package/templates/.claude/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
  19. package/templates/.claude/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +82 -0
  20. package/templates/.claude/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
  21. package/templates/.claude/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
  22. package/templates/.claude/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
  23. package/templates/.claude/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
  24. package/templates/.claude/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
  25. package/templates/.claude/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
  26. package/templates/.claude/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
  27. package/templates/.claude/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
  28. package/templates/.claude/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
  29. package/templates/.claude/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
  30. package/templates/.claude/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  31. package/templates/.claude/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
  32. package/templates/.claude/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  33. package/templates/.claude/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
  34. package/templates/.claude/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
  35. package/templates/.claude/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  36. package/templates/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  37. package/templates/.claude/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
  38. package/templates/.claude/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
  39. package/templates/.claude/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
  40. package/templates/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
  41. package/templates/.claude/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  42. package/templates/.claude/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  43. package/templates/.claude/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
  44. package/templates/.claude/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
  45. package/templates/.claude/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
  46. package/templates/.claude/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
  47. package/templates/.claude/skills/vercel-react-best-practices/rules/server-cache-react.md +26 -0
  48. package/templates/.claude/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +79 -0
  49. package/templates/.claude/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
  50. package/templates/.claude/skills/vs-design-diverge/SKILL.md +307 -0
@@ -0,0 +1,307 @@
1
+ ---
2
+ name: vs-design-diverge
3
+ description: Create high-entropy frontend interfaces using Verbalized Sampling (VS). Break mode collapse, avoid AI-slop aesthetics. Use for distinctive design work.
4
+ ---
5
+
6
+ <context>
7
+
8
+ **Purpose:** Mitigate Mode Collapse (tendency to produce generic AI output) and create production-grade frontend interfaces
9
+
10
+ **Principle:** Verbalized Sampling (VS) - Verbalize typical design (P ≈ 0.95), then deliberately select Low-T (low typicality) alternatives
11
+
12
+ </context>
13
+
14
+ ---
15
+
16
+ <workflow>
17
+
18
+ ## Execution Flow
19
+
20
+ ```
21
+ Phase 0: Context Discovery
22
+ ↓ (AskUserQuestion - probe 4 dimensions)
23
+ Phase 1: Identify the Mode
24
+ ↓ (verbalize P ≈ 0.95 baseline, avoid it)
25
+ Phase 2: Sample the Long-Tail
26
+ ↓ (3 directions + T-Score justification)
27
+ Phase 3: Commit to Low-Typicality
28
+ ↓ (lowest T-Score + pass Guardrails)
29
+ Phase 4: Implementation
30
+ ↓ (production-grade code)
31
+ Phase 5: Surprise Validation
32
+ ↓ (AI-typical? → refactor)
33
+ ```
34
+
35
+ ### Phase 0: Context Discovery
36
+
37
+ **Probe these dimensions using AskUserQuestion tool:**
38
+
39
+ | Dimension | Question Examples |
40
+ |-----------|-------------------|
41
+ | **Emotional Tone** | "Trustworthy", "edgy", "playful", "luxurious" - which atmosphere? |
42
+ | **Target Audience** | Who will see this? Technical sophistication? Expectations? |
43
+ | **Reference Points / Anti-References** | Benchmark examples? Styles to explicitly avoid? |
44
+ | **Business Context** | Problem this UI solves? Usage scenario? |
45
+
46
+ **Additional signals:**
47
+ - Existing code: Extract style patterns, color schemes, component conventions
48
+ - User prompt: Parse keywords (landing page, dashboard, portfolio, SaaS, etc.)
49
+ - Follow-up questions: Surface full vision even for simple prompts
50
+
51
+ Gather sufficient context before proceeding to Phase 1.
52
+
53
+ ### Phase 1: Identify the Mode
54
+
55
+ **Verbalize the highest-probability (P ≈ 0.95) design:**
56
+
57
+ AI-slop markers:
58
+ - Inter/Roboto/System fonts
59
+ - Rounded blue/purple buttons
60
+ - Standard F-pattern layouts
61
+ - White backgrounds with gradient accents
62
+ - Generic hero sections with stock imagery
63
+
64
+ **Avoid this baseline.**
65
+
66
+ ### Phase 2: Sample the Long-Tail
67
+
68
+ **Generate 3 directions with T-Score (Typicality Score, 0~1.0):**
69
+
70
+ | Direction | T-Score | Characteristics |
71
+ |-----------|---------|-----------------|
72
+ | **A** | ≈ 0.7 | Modern/Clean, safe |
73
+ | **B** | ≈ 0.4 | Distinctive/Characterful (specific niche style) |
74
+ | **C** | < 0.2 | Experimental/Bold (high-entropy, unexpected) |
75
+
76
+ **T-Score justification required:** Explain WHY each direction has that score. Reference specific design choices.
77
+
78
+ ### Phase 3: Commit to Low-Typicality
79
+
80
+ **Select lowest T-Score that meets:**
81
+ 1. Functional requirements from Phase 0
82
+ 2. All Quality Guardrails
83
+
84
+ Deliberate and intentional choice, not accidental.
85
+
86
+ </workflow>
87
+
88
+ ---
89
+
90
+ <guardrails>
91
+
92
+ ## Quality Principles
93
+
94
+ Experimental designs must satisfy these principles. If violated, increase T-Score until compliance.
95
+
96
+ | Principle | Description |
97
+ |-----------|-------------|
98
+ | **Visual Hierarchy** | Clear priority ordering (1st → 2nd → 3rd) |
99
+ | **Contrast & Legibility** | Text readable against background (WCAG AA minimum) |
100
+ | **Internal Consistency** | Design follows its own logic (not random) |
101
+ | **Functional Clarity** | Interactive elements recognizable, affordances clear |
102
+
103
+ </guardrails>
104
+
105
+ ---
106
+
107
+ <anti_patterns>
108
+
109
+ ## Failure Patterns
110
+
111
+ | Pattern | Symptoms | Validation |
112
+ |---------|----------|------------|
113
+ | **Accidental Design** | Differentiation without intent, randomness | "Why this color/font/layout?" → must have coherent answer |
114
+ | **Frankenstein Style** | Incompatible aesthetics mixed, no unity | "Describe this design's personality in one sentence?" → must be possible |
115
+
116
+ </anti_patterns>
117
+
118
+ ---
119
+
120
+ <aesthetics>
121
+
122
+ ## Frontend Aesthetics Guidelines (VS-Enhanced)
123
+
124
+ **Inversion Principle:** If a choice feels "obvious," it has too much probability mass → consider lower-probability, higher-impact alternatives (when context-appropriate).
125
+
126
+ ### Typography
127
+
128
+ | Category | Content |
129
+ |----------|---------|
130
+ | ❌ **AI-slop** | Inter, Roboto, Arial, System fonts, Space Grotesk (default usage) |
131
+ | ✅ **Low-T** | High-character display faces + refined, unexpected body typefaces. Variable fonts, unusual weights. |
132
+ | **Context-dependent** | Brutalist portfolio → industrial sans-serifs / Luxury brand → refined serifs |
133
+
134
+ ### Color & Theme
135
+
136
+ | Principle | Description |
137
+ |-----------|-------------|
138
+ | ✅ **Uneven distribution** | Cohesive but "dissonant-yet-beautiful" palette |
139
+ | ✅ **CSS Variables** | Systematic theming |
140
+ | ✅ **Texture-first** | Sophisticated noise/lighting over flat fills (when context-appropriate) |
141
+
142
+ ### Spatial Composition
143
+
144
+ | Condition | Approach |
145
+ |-----------|----------|
146
+ | **Standard grid (P=0.9)** | Consider asymmetry, overlapping elements, diagonal flows, editorial whitespace (P=0.1) |
147
+ | **Data-heavy UIs** | Dashboards, tables → conventional grids may be needed (usability priority) |
148
+
149
+ ### Motion
150
+
151
+ | Principle | Description |
152
+ |-----------|-------------|
153
+ | ✅ **Micro-delights** | Staggered reveals, scroll-bound transformations, custom easing |
154
+ | ❌ **Purposeless motion** | Every animation must have purpose |
155
+
156
+ </aesthetics>
157
+
158
+ ---
159
+
160
+ <frameworks>
161
+
162
+ ## AIDA Framework (Conditional)
163
+
164
+ **Apply only for persuasion/conversion goals (landing pages, marketing sites, product showcases):**
165
+
166
+ | Stage | Goal | Design Application |
167
+ |-------|------|-------------------|
168
+ | **A**ttention | Stop scroll, create immediate visual impact | Bold typography, unexpected imagery, striking color contrast |
169
+ | **I**nterest | Build curiosity, encourage exploration | Progressive information reveal, visual storytelling, highlight unique value |
170
+ | **D**esire | Create emotional connection, make them want it | Social proof, benefits visualization, aspirational imagery, micro-interactions |
171
+ | **A**ction | Drive conversion with clear next steps | High-contrast CTAs, reduced friction, urgency cues (when appropriate) |
172
+
173
+ ### Application Conditions
174
+
175
+ | Apply ✅ | Don't Apply ❌ |
176
+ |---------|----------------|
177
+ | Landing/marketing pages | Dashboards, data-heavy UIs (usability priority) |
178
+ | Product launch pages | Documentation/content-focused sites (readability priority) |
179
+ | Client-attracting portfolios | Internal tools (efficiency priority) |
180
+
181
+ **VS + AIDA Integration:** Apply Low-T aesthetics to EACH AIDA stage. Generic hero → Attention failure / Predictable CTA → Action failure. AIDA = "what", VS = "how".
182
+
183
+ </frameworks>
184
+
185
+ ---
186
+
187
+ <implementation>
188
+
189
+ ## Implementation Standards
190
+
191
+ | Standard | Description |
192
+ |----------|-------------|
193
+ | **Production-Grade** | Functional, accessible (A11y), performant |
194
+ | **Complexity-Typicality Balance** | Low-T design → implementation complexity increases proportionally (maintain quality) |
195
+ | **No Complexity Refusal** | Pursue extraordinary work, don't simplify vision |
196
+
197
+ </implementation>
198
+
199
+ ---
200
+
201
+ <validation>
202
+
203
+ ## Final Validation
204
+
205
+ Pre-delivery checklist:
206
+
207
+ 1. **Intentionality**: Can you justify every major design decision?
208
+ 2. **Consistency**: Does the design follow its own internal logic?
209
+ 3. **Guardrails**: Are hierarchy, legibility, consistency, and clarity preserved?
210
+ 4. **Surprise**: Would this stand out in a lineup of AI-generated designs?
211
+
212
+ **Goal:** Maximize "Surprise Score" while maintaining "Production Quality." Deliberate disruption.
213
+
214
+ </validation>
215
+
216
+ ---
217
+
218
+ <examples>
219
+
220
+ ## Practical Examples
221
+
222
+ ### Phase 2: T-Score Justification
223
+
224
+ ```markdown
225
+ **Direction A (T ≈ 0.7): Modern Minimal**
226
+ - Inter font, white background, blue buttons
227
+ - High typicality: 2020s SaaS standard pattern
228
+
229
+ **Direction B (T ≈ 0.4): Brutalist Style**
230
+ - Space Mono font, grid background, angular black buttons
231
+ - Lower typicality: Specific niche, non-mainstream choice
232
+
233
+ **Direction C (T < 0.2): Neo-Baroque**
234
+ - Fraunces Display font, irregular layout, animated gradients
235
+ - Very low probability: Rarely seen on web
236
+ ```
237
+
238
+ ### Typography Code
239
+
240
+ ```css
241
+ /* ❌ AI-slop */
242
+ font-family: 'Inter', system-ui, sans-serif;
243
+
244
+ /* ✅ Low-T (Brutalist portfolio) */
245
+ @import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');
246
+ font-family: 'Space Mono', monospace;
247
+ font-variation-settings: 'wght' 650;
248
+
249
+ /* ✅ Low-T (Luxury brand) */
250
+ @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;500&display=swap');
251
+ font-family: 'Cormorant Garamond', serif;
252
+ letter-spacing: 0.05em;
253
+ ```
254
+
255
+ ### Color System
256
+
257
+ ```css
258
+ /* ❌ AI-slop (even distribution) */
259
+ :root {
260
+ --primary: #3b82f6; /* blue */
261
+ --secondary: #a855f7; /* purple */
262
+ --accent: #10b981; /* green */
263
+ }
264
+
265
+ /* ✅ Low-T (uneven, cohesive) */
266
+ :root {
267
+ --dominant: #0a0908; /* near-black (60%) */
268
+ --support: #8d99ae; /* neutral blue (30%) */
269
+ --punch: #ef233c; /* intense red (10%) */
270
+ --texture: url('data:image/svg+xml,...'); /* noise overlay */
271
+ }
272
+ ```
273
+
274
+ ### AIDA + Low-T Integration
275
+
276
+ ```tsx
277
+ // Hero Section (Attention stage + Low-T)
278
+ <section className="hero">
279
+ <h1 style={{
280
+ fontFamily: 'Fraunces',
281
+ fontSize: 'clamp(3rem, 10vw, 8rem)',
282
+ fontVariationSettings: '"SOFT" 100, "WONK" 1',
283
+ background: 'linear-gradient(135deg, #0a0908, #ef233c)',
284
+ backgroundClip: 'text',
285
+ WebkitTextFillColor: 'transparent',
286
+ }}>
287
+ Disruptive Product Name
288
+ </h1>
289
+ {/* Unexpected imagery treatment */}
290
+ </section>
291
+
292
+ // CTA (Action stage + Low-T)
293
+ <button style={{
294
+ background: '#ef233c',
295
+ color: '#0a0908',
296
+ border: '2px solid #0a0908',
297
+ padding: '1.5rem 3rem',
298
+ fontSize: '1.25rem',
299
+ fontWeight: 700,
300
+ clipPath: 'polygon(5% 0, 100% 0, 95% 100%, 0 100%)', // asymmetric
301
+ transition: 'clip-path 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
302
+ }}>
303
+ Get Started →
304
+ </button>
305
+ ```
306
+
307
+ </examples>