frontend-styleguide
Use when asked to create or edit style guides, design systems, component libraries, or update existing frontend components for web projects
What this skill does
# Generating Frontend Styleguides
## Overview
A frontend styleguide is a living document that defines visual patterns, component APIs, and reusable code for a web project. This skill ensures you create comprehensive, efficient styleguides without wasting context on repeated exploration.
**Core principle:** Explore once with subagent, document findings permanently to CLAUDE.md, never explore again.
## When to Use
Use this skill when the user asks to:
- "Create a style guide"
- "Document our component library"
- "Build a design system"
- "Make reusable components"
- "Standardize our frontend patterns"
- "Update the style guide"
- "Add a component to the style guide"
- "Edit existing components"
## First: Creating vs Editing Decision
```dot
digraph create_vs_edit {
"User requests styleguide work" [shape=doublecircle];
"CLAUDE.md has Frontend Style Guide section?" [shape=diamond];
"Creating NEW style guide" [shape=box];
"Editing EXISTING style guide" [shape=box];
"Follow creation workflow" [shape=box];
"Use CLAUDE.md context ONLY" [shape=box];
"User requests styleguide work" -> "CLAUDE.md has Frontend Style Guide section?";
"CLAUDE.md has Frontend Style Guide section?" -> "Creating NEW style guide" [label="no"];
"CLAUDE.md has Frontend Style Guide section?" -> "Editing EXISTING style guide" [label="yes"];
"Creating NEW style guide" -> "Follow creation workflow";
"Editing EXISTING style guide" -> "Use CLAUDE.md context ONLY";
}
```
**CRITICAL RULE:** If CLAUDE.md already has a "Frontend Style Guide" section, you are EDITING. Do NOT re-explore. Use only the documented context in CLAUDE.md.
## Creation Workflow (New Style Guides Only)
```dot
digraph styleguide_creation {
"Creating new style guide" [shape=doublecircle];
"Ask design preferences" [shape=box];
"Launch Explore subagent" [shape=box];
"Document findings to CLAUDE.md" [shape=box];
"Use frontend-design skill" [shape=box];
"Create reusable components" [shape=box];
"Done" [shape=doublecircle];
"Creating new style guide" -> "Ask design preferences";
"Ask design preferences" -> "Launch Explore subagent";
"Launch Explore subagent" -> "Document findings to CLAUDE.md";
"Document findings to CLAUDE.md" -> "Use frontend-design skill";
"Use frontend-design skill" -> "Create reusable components";
"Create reusable components" -> "Done";
}
```
## Editing Workflow (Existing Style Guides)
**When CLAUDE.md already has a "Frontend Style Guide" section:**
1. **Read CLAUDE.md ONLY** - All context you need is already documented
2. **Use frontend-design skill** - Before creating new components
3. **Create/update components** - Using existing patterns from CLAUDE.md
4. **Update CLAUDE.md** - Add new component to inventory
**NEVER:**
- Re-run Explore subagent when editing
- Use Grep/Glob to "check for changes"
- Read unnecessary files
- "Verify" the documented structure
**Why:** You already explored once and documented everything. Re-exploring wastes context. Trust the CLAUDE.md documentation.
### Step 1: Ask Design Preferences FIRST
**Before any exploration**, ask the user these questions using AskUserQuestion:
1. **Design System/Framework:**
- "Which design system or framework should we follow?"
- Options: shadcn/ui, Material UI, Bootstrap, Tailwind CSS, Custom, Other
- Include description of what each provides
2. **Typography:**
- "Should we include/exclude custom fonts?"
- Options: User will specify fonts, Figure it out based on this vibe (user input)
- If Google Fonts selected, ask which font families
3. **Additional Components (optional):**
- "Are there any specialized components beyond standard UI elements you need?"
- Let user list any domain-specific components (charts, calendars, specialized inputs)
**CRITICAL:** Do NOT skip these questions. Design system choice affects everything.
### Step 2: Launch Explore Subagent
**REQUIRED:** Use Task tool with `subagent_type: "Explore"` and only in the frontend/ . Do NOT explore or access any NextJS code or other executable code directories e.g. `node_modules/` or `.next/`
**Never use direct Glob/Grep for codebase exploration.** The Explore agent is 50-100x more context-efficient.
**Exploration parameters:**
```
Task tool with:
- subagent_type: "Explore"
- thoroughness: "medium"
- prompt: "Explore the frontend codebase structure. Find:
1. Component directory structure
2. Styling methodology (CSS modules, Tailwind, styled-components, etc.)
3. Existing component patterns and naming conventions
4. Any existing design tokens or theme configuration
5. Build tooling and framework (React, Vue, etc.)
EXCLUDE: node_modules, dist, build, .next, out, coverage, any installation/executable directories
Summarize findings in a structured format."
```
**Why Explore subagent:** Saves 50-100x context vs running multiple Glob/Grep commands yourself.
### Step 3: Document Findings to CLAUDE.md
**IMMEDIATELY** after Explore completes, write findings to `.claude/CLAUDE.md` in a dedicated section:
```markdown
## Frontend Style Guide
### Project Structure
[Component directories, file organization]
### Styling Approach
[CSS methodology, design tokens, theme system]
### Existing Patterns
[Component patterns, naming conventions]
### Design System
[Framework: shadcn/ui / Material UI / etc.]
[Fonts: Google Fonts - Roboto, Open Sans / System fonts]
### Component Inventory
#### Standard Components
- Button (variants: primary, secondary, outline)
- Input (text, email, password, textarea)
- Card (basic, with header, with actions)
- Modal (dialog, drawer, alert)
- Navigation (navbar, sidebar, tabs)
[etc.]
#### Custom Components
[Any domain-specific components]
```
**Why document to CLAUDE.md:** This becomes permanent project context. You'll never need to re-explore. Future sessions load this instantly.
### Step 4: Use frontend-design Skill
**REQUIRED:** Before creating any components, invoke the frontend-design skill:
```
Skill tool with:
- skill: "frontend-design:frontend-design"
```
The frontend-design skill ensures:
- Distinctive, production-grade aesthetics
- Proper accessibility patterns
- Modern, polished implementation
- Avoids generic AI aesthetics
**Do not create components without using this skill.** It's the difference between generic and professional.
### Step 5: Create Reusable Component Functions
Components must be **functions that can be reused**, not just documentation.
**Structure per component:**
```javascript
/**
* Button Component
*
* @param {Object} props
* @param {'primary'|'secondary'|'outline'} props.variant - Button style variant
* @param {'sm'|'md'|'lg'} props.size - Button size
* @param {boolean} props.disabled - Disabled state
* @param {React.ReactNode} props.children - Button content
* @param {Function} props.onClick - Click handler
* @returns {React.ReactElement}
*/
export function Button({
variant = 'primary',
size = 'md',
disabled = false,
children,
onClick
}) {
// Implementation using design system specified
}
```
**Save to:** `src/components/` or existing component directory (match project structure).
**Update CLAUDE.md** with component location and usage after creation.
## Standard Components (Include by Default)
Unless user specifies otherwise, include these common UI components:
Titles, Headers, Text, Headers, Footers
**Form Elements:**
- Button (primary, secondary, outline, ghost variants)
- Input (text, email, password, number)
- Textarea
- Select/Dropdown
- Checkbox
- Radio buttons
- Switch/Toggle
**Layout:**
- Container
- Card
- Grid
- Stack/Flex
**Navigation:**
- Navbar
- Sidebar
- Tabs
**Feedback:**
- Alert/Toast
- Modal/Dialog
- Tooltip
- Loading spinner
- Progress bar
**Data Display:**
- Table
- Badge
- Avatar
- Divider
**User requested only:** Charts, calendars, specialized domain components.
## File Organization
**Component files:** `src/components/[ComponentName]/` or project's existing structure
**Style Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.