JohnWayneeee/ai-agent-skills / skills/figma-pencil-fsd-tailwind4
figma-pencil-fsd-tailwind4
VerifiedConvert Figma or Pencil designs into production-ready frontend code using Feature-Sliced Design and Tailwind CSS v4. Use when translating designs into code, extracting tokens, mapping UI to FSD layers (shared / entities / features / widgets / pages / app-shell / app), enforcing Server vs Client boundaries when applicable, or validating design-to-code fidelity.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.1 KB |
| references/accessibility-checklist.md | markdown | 2.8 KB |
| references/example-mapping.md | markdown | 4.2 KB |
| references/figma-mcp-workflow.md | markdown | 3.4 KB |
| references/fsd-mapping.md | markdown | 4.5 KB |
| references/pencil-workflow.md | markdown | 2.8 KB |
| references/project-contracts.md | markdown | 3.4 KB |
| references/rsc-boundaries.md | markdown | 2.9 KB |
| references/tailwind-tokens.md | markdown | 3.8 KB |
references/rsc-boundaries.md
View on GitHub# Server / Client Boundaries
Applies only to frameworks that distinguish Server and Client components (React Server Components and similar). Skip this reference entirely if the project does not use such a split.
## Default
Every component is a Server Component until a real reason forces it to the client. The client marker is opt-in, not a default.
Reasons that justify marking a component as client:
- Component state (`useState`, `useReducer`) or refs (`useRef`).
- Effects (`useEffect`, `useLayoutEffect`).
- Event handlers attached to DOM (`onClick`, `onChange`, `onSubmit`).
- Browser-only APIs (`window`, `document`, `localStorage`, `IntersectionObserver`).
- Third-party libraries that internally require the client (most animation libs, charting libs, drag-and-drop, rich text editors).
- Context providers that hold client state.
Reasons that do NOT justify it:
- "It's a UI component."
- "The parent is interactive."
- "It might need state later."
## Per FSD layer
- `shared/ui` primitives: server by default. Mark as client only on intrinsically interactive primitives (Input, Switch, Popover, Tooltip, DropdownMenu). A presentational `Card`, `Badge`, or `Separator` stays on the server.
- `entities/*/ui`: server by default. They render domain data and rarely need the client.
- `features/*`: usually client. Forms, mutations, optimistic UI, filters, anything user-driven.
- `widgets/*`: split. Static composed sections stay server; interactive sections become client islands, ideally with the interactive subtree isolated in a child `features/*` component.
- `pages`: server. They fetch data and compose. Push the client marker to leaf components, not to the page root.
- `app-shell`: server where possible. Interactive shell controls (theme toggle, sidebar collapse, command menu) live in client child components.
## Data fetching
- Fetch on the server: in `pages`, or via server actions invoked from `features`.
- Avoid effect-based fetching when a server fetch is possible.
- Server actions belong next to the `features/*` that triggers them, marked with the framework's server-action directive.
## Composition patterns
- A server parent may render client children freely.
- A client parent may render server children only if they are passed in as `children` or props; a client component cannot `import` and render a server component directly.
- Use the "client island" pattern: keep the page and most widgets on the server, drop a small client component at the exact point where interactivity starts.
## Anti-patterns
- Marking a whole page as client because one button is interactive.
- Re-implementing server-fetchable data with effects in a client `features/*`.
- Passing server-only objects (database handles, large server-only types) into client components as props.
- Adding the client marker to `shared/ui` primitives "just in case".
- Wrapping the entire `app-shell` as a client component to support a theme toggle.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |