Agent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
JavaScript agent-skillsai-agentsanti-slopclaude-codecodexcursordesign-systemfrontendlanding-pageui-designweb-design
Fix flaws in constraints: loosen depth limit, correct state and typography usage, enforce UI states, handle responsiveness, and temper CSS will-change
Leonxlnxd449b63cadbe
diff --git a/SKILL_v2.md b/SKILL_v2.mdindex b5f799b..7a0415e 100644--- a/SKILL_v2.md+++ b/SKILL_v2.md@@ -9,12 +9,16 @@ description: Senior UI/UX Engineer. Architect digital interfaces overriding defaUnless the user explicitly specifies a different stack, adhere to these structural constraints to maintain consistency:* **Framework:** React or Next.js. Default to Server Components (`RSC`). Use Client Components (`"use client"`) strictly at the leaf level for stateful or interactive UI.-* **Component Architecture:** Max component nesting depth: 2 levels. Organize into:- * Layout/Sections: `/components/sections/*`- * UI Primitives (Buttons, Inputs): `/components/ui/*`-* **State Management:** Prefer local `useState`/`useReducer` for UI states. Avoid global state (Zustand/Redux) unless data explicitly crosses route boundaries.+* **Component Architecture:** Compose modular trees, avoiding monolithic "god components". Organize intuitively:+ * Layout/Sections: `/components/sections/*` (e.g. `TableSection`)+ * UI Primitives / Complex Compounds: `/components/ui/*` (e.g. `DataTable`, `ActionMenu`)+* **State Management:** Use local `useState`/`useReducer` for isolated UI. Use global state (Zustand/Context) to avoid painful prop-drilling in deep component trees (e.g., an audio player controlled from distant child components).* **Styling:** Tailwind CSS (v3 or v4).-* **Icons:** Phosphor Icons or Radix UI Icons. **Mandatory:** Standardize `strokeWidth` globally (e.g., exclusively use `1.5` or `2.0`) for visual consistency.+* **Responsiveness & Spacing:**+ * Standardize breakpoints (`sm`, `md`, `lg`, `xl`).+ * Contain page layouts using `max-w-7xl mx-auto`.+ * Adhere strictly to a 4px baseline grid (e.g., standardizing on Tailwind's `gap-4`, `p-8` scales).+* **Icons:** Phosphor Icons or Radix UI Icons. **Mandatory:** Standardize `strokeWidth` globally (e.g., exclusively use `1.5` or `2.0`).## 2. SKILL CONFIGURATION (Quantitative Dials)The user may provide these values (1-10). They dictate your CSS output metrics and layout choices.@@ -29,49 +33,53 @@ Controls symmetry and layout offsets.### [ MOTION_INTENSITY: 5 ]Controls animation complexity *working within the pre-defined project dependencies*.* **1-3 (Static):** No automatic animations. CSS `:hover` and `:active` states only.-* **4-7 (Fluid CSS):** Use `transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`. Use `animation-delay` cascades for load-ins. Focus strictly on `transform` and `opacity`. **Mandatory:** Add `will-change: transform;` to animated elements to prevent mobile GPU micro-stutters.+* **4-7 (Fluid CSS):** Use `transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`. Use `animation-delay` cascades for load-ins. Focus strictly on `transform` and `opacity`. **Caution:** Apply `will-change: transform` dynamically only to deeply animating elements (and remove it post-animation) rather than applying it globally, to conserve GPU memory.* **8-10 (Advanced Choreography):** Complex scroll-triggered reveals or parallax. **⚠️ REACT RENDER OVERRIDE:** If using `useEffect` or `useRef` for external animation libraries (GSAP, Framer), you MUST return a strict cleanup function (e.g., `ctx.revert()`, observer disconnects) to prevent catastrophic memory leaks.### [ VISUAL_DENSITY: 4 ]Controls spacing tokens and typography tracking.-* **1-3 (Editorial):** `py-24` or `py-32` section padding. `tracking-tighter` on massive display headers. Max `60ch` width for paragraphs.+* **1-3 (Editorial):** `py-24` or `py-32` section padding. `tracking-tighter` on massive display headers.* **4-7 (Standard Application):** `py-12` section padding.* **8-10 (Data-Heavy HUD):** `py-2` to `py-4`. 1px rule lines (`border-b border-gray-200`). Use Monospace (`font-mono`) strictly for numerical data and technical labels.## 3. DESIGN ENGINEERING DIRECTIVES (Bias Correction)LLMs have statistical biases toward specific UI cliché patterns. Proactively construct premium interfaces using these engineered rules:-**Rule 1: Typography Intent**-* **Contextual Selection:** Modern B2B tools (Vercel, Linear style) excel with clean Sans-Serifs (`Inter`, `Geist`) even for massive H1s, heavily relying on tight letter-spacing (`tracking-tighter`). Do not force Serif fonts unless the context explicitly demands an editorial, luxury, or portfolio aesthetic.-* **Execution:** Pair a distinct display weight with a highly legible body weight. Never leave `line-height` at default for titles; use `leading-none` or `leading-tight`.+**Rule 1: Deterministic Typography**+* **Display/Headlines:** Default to `text-4xl md:text-6xl tracking-tighter leading-none`. Pair a distinct display weight with a highly legible body weight.+* **Body/Paragraphs:** Default to `text-base text-gray-600 leading-relaxed max-w-[65ch]`.+* **Contextual Focus:** Modern B2B tools excel with clean Sans-Serifs (`Inter`, `Geist`). Do not force Serif fonts unless the context explicitly demands an editorial or luxury aesthetic.**Rule 2: Color Calibration*** **Constraint:** Limit to a maximum of **1 Accent Color**. Keep accent saturation below 80% to maintain a premium feel.* **Neutrals:** Stick strictly to the standard neutral scales (e.g., Tailwind `gray-50` to `gray-900` or `zinc`).* **Gradients:** The generic 2023 purple-to-blue linear background gradient is BANNED. You MAY use gradients functionally: extremely subtle `radial-gradient` backgrounds for depth (opacity < 15%), or modern, soft mesh-gradients for premium SaaS aesthetics.-**Rule 3: Materiality & Shadows**-* **Constraint:** Standard `box-shadow: rgba(0,0,0,0.1)` is outdated.-* **Execution:** Use extremely soft, ambient shadows tinted to the background hue (e.g., `shadow-[0_8px_30px_rgba(14,30,37,0.12)]`), or disable shadows entirely in favor of crisp `1px solid var(--border-color)` dividing lines. Allow extremely subtle glassmorphism (`backdrop-blur-md bg-white/5`) only when floating over complex, textured backgrounds.+**Rule 3: Materiality, Shadows, and "Anti-Card Overuse"**+* **Constraint:** Standard `box-shadow: rgba(0,0,0,0.1)` is outdated. Do not habitually wrap every section in a bordered card.+* **Execution:** Use cards ONLY when elevation communicates hierarchy and grouping CANNOT be achieved via spacing and alignment alone. When a shadow is used, tint it to the background hue (e.g., `shadow-[0_8px_30px_rgba(14,30,37,0.12)]`), or use crisp `1px solid var(--border-color)` lines.-**Rule 4: Tactile Micro-Interactions**-* **Execution:** Interactive elements must feel physical. On `:active`, use `-translate-y-[1px]` or `scale-[0.98]` to simulate a physical push, rather than merely changing the background color.+**Rule 4: Interactive UI States**+* **Mandatory Generation:** LLMs naturally generate "static" successful states. You MUST implement full interaction cycles:+ * **Loading:** Skeletal loaders matching layout sizes (avoid generic circular spinners).+ * **Empty States:** Beautifully composed empty states indicating how to populate data.+ * **Error States:** Clear, inline error reporting (e.g., forms).+ * **Tactile Feedback:** On `:active`, use `-translate-y-[1px]` or `scale-[0.98]` to simulate a physical push indicating success/action.-## 4. CREATIVE PROACTIVITY (What to Build)-Refer to your internal knowledge base (`resources/100-ai-tells-audit.md` and `resources/creative-coding-compendium.md`) to guide your implementation. Focus on building:-* **High Signal-to-Noise Ratio:** Remove repetitive "card" backgrounds if whitespace and alignment can separate the data visually.-* **Consistent Visual Rhythm:** Ensure horizontal and vertical paddings follow a strict mathematical multiplier (e.g., 4px baseline grid).-* **Tangible Feedback:** Design states indicating loading, success, and hover with physical precision. Use skeletal loaders rather than generic spinners.+**Rule 5: Data & Form Patterns**+* **Forms:** Label MUST sit above input. Helper text is optional but should exist in markup. Error text below input. Use a standard `gap-2` for input blocks.++## 4. CREATIVE PROACTIVITY+If capable within your environment, use local file-reading tools to cross-reference `resources/100-ai-tells-audit.md` and `resources/creative-coding-compendium.md` for inspiration.## 5. PERFORMANCE GUARDRAILS* **DOM Cost:** Limit the use of SVG noise filters/grain over massive full-viewport containers. Calculate them once and lock them to a fixed background layer (`z-[-1] fixed inset-0 pointer-events-none`) to prevent scroll-repainting.-* **Bundle & Resource Optimization:** Output semantic HTML (`<article>`, `<nav>`, `<time>`). Assume aggressive code-splitting for heavy components.* **Hardware Acceleration:** Never animate `top`, `left`, `width`, or `height`. Animate exclusively via `transform` and `opacity`.## 6. PRE-FLIGHT CHECKEvaluate your code against this matrix before output:-- [ ] Is the Component Architecture (Max depth 2, separation of Sections and UI) respected?-- [ ] Is mobile layout collapse (`w-full`, `px-4`) guaranteed for high-variance designs?+- [ ] Is global state used appropriately to avoid deep prop-drilling rather than arbitrarily?+- [ ] Is mobile layout collapse (`w-full`, `px-4`, `max-w-7xl mx-auto`) guaranteed for high-variance designs?- [ ] Do `useEffect` animations contain strict cleanup functions?-- [ ] Is `will-change: transform` applied to fluid CSS animations?-- [ ] Is color saturation controlled (<80%) with a maximum of 1 accent color?+- [ ] Are empty, loading, and error states provided?+- [ ] Are cards omitted in favor of spacing where possible?