agentleFS
jamestorrevillasjamestorrevillas/dev-skills/.github/skills/frontend-design/SKILL.md

frontend-design

Skill4 starsChanged 9 months agoMITView on GitHub

Use this skill when building UI components, designing frontend architecture, implementing styling systems, optimizing performance, ensuring accessibility, or creating production-grade interfaces. Trigger on keywords: frontend, component, UI, styling, React, Next.js, Angular, Tailwind, CSS, responsive, accessibility, performance, animation, design system.

187 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use albert-dm, instantly-campaign and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • yawningwhaleAISkill

    albert-dm

    Reply to DMs and messages the way Albert would. Use when the user asks "how would Albert reply to this", pastes a conversation and wants an Albert-style response, or asks you to draft/write a DM in Albert's voice. Albert sells AI voice agents / automations to local service businesses (Go High Level, lead follow-up, bookings).

    Also in 7 projects that use this

  • yawningwhaleAISkill

    instantly-campaign

    Create a new Instantly cold-email campaign in the proven 5-email structure of the user's top-performing campaign (~16% reply rate). Use when the user wants to launch a new outbound campaign, write a cold email sequence, create an Instantly campaign, draft outreach for a new service or niche, or set up a sales sequence.

    Also in 8 projects that use this

  • SeifBenayedSkill

    file-reading

    Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.

    Also in 7 projects that use this

  • naman10parikhSkill

    ecosystem-reference

    Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.

    Also in 5 projects that use this

  • naman10parikhSkill

    fractal-delegation

    Also in 5 projects that use this

  • stophobiaSkill

    surprise-me

    Create a delightful, unexpected "wow" experience for the user by dynamically discovering and creatively combining other enabled skills. Triggers when the user says "surprise me" or any request expressing a desire for an unexpected creative showcase. Also triggers when the user is bored, wants inspiration, or asks for "something interesting".

    Also in 5 projects that use this

  • +5 more from naman10parikh

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 181 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing a single line of CSS, define:

    line 12
  2. Distinctive:

    Use composition over prop-drilling

    line 33
  3. Distinctive:

    Default to server components.

    line 34
  4. Distinctive:

    Don't default to Inter or Roboto — they signal "AI generated"

    line 62
  5. Distinctive:

    Consider: Geist, Instrument Sans, Plus Jakarta Sans, DM Sans

    line 63
  6. Very specific:

    Images: Use next/image or native lazy loading, modern formats (WebP/AVIF)

    line 79
  7. Distinctive:

    Rule: Start with the simplest option.

    line 120
  8. Distinctive:

    Default to Server Components — fetch data server-side

    line 140
  9. Distinctive:

    Use Client Components only for: event handlers, browser APIs, hooks, real-time updates

    line 141
  10. Very specific:

    Place 'use client' as low in the tree as possible

    line 142
  11. Distinctive:

    Use Server Actions for form submissions and mutations

    line 143

“Common” is measured: kept by at least 6 in 10 of the 181 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontend Design

Design Philosophy

Avoid distributional convergence — the tendency for AI to default to generic purple gradients, Inter font, and rounded-corner cards. Every interface should have a deliberate aesthetic based on its purpose and audience.

Before writing a single line of CSS, define:

  • What emotion should this interface convey?
  • Who is the user and what context are they in?
  • What is the single most important action on this screen?

Component Architecture

Atomic Design Hierarchy

Atoms      → Button, Input, Label, Icon
Molecules  → SearchBar (Input + Button), FormField (Label + Input + Error)
Organisms  → Header, ProductCard, UserProfile
Templates  → PageLayout, DashboardLayout
Pages      → Specific instances with real data

Component Rules

  • One component = one responsibility
  • Props should be explicit, not inferred
  • Use composition over prop-drilling
  • Default to server components; use client components only for interactivity

Styling System

Tailwind Best Practices

// Extract repeated patterns into components, not custom CSS
// BAD: Duplicating classes everywhere
<div className="flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg">

// GOOD: Extract to a component
<Button variant="primary">Click me</Button>

Design Tokens (Custom Properties)

:root {
  --color-primary: #your-brand-color;
  --color-surface: #f8f9fa;
  --spacing-unit: 4px;
  --radius-default: 8px;
  --font-heading: 'Your Chosen Font', sans-serif;
}

Typography That Avoids Generic AI Look

  • Don't default to Inter or Roboto — they signal "AI generated"
  • Consider: Geist, Instrument Sans, Plus Jakarta Sans, DM Sans
  • Mix weights deliberately: 400 for body, 600 for emphasis, 800 for headlines
  • Establish a clear type scale before building

Performance Optimization

Core Web Vitals Targets

MetricTargetWhat It Measures
LCP< 2.5sLargest Contentful Paint — loading
FID/INP< 100msInteraction responsiveness
CLS< 0.1Layout stability

Key Techniques

  • Images: Use next/image or native lazy loading, modern formats (WebP/AVIF)
  • Fonts: font-display: swap, preload critical fonts
  • JS: Code splitting, dynamic imports for heavy components
  • CSS: Purge unused styles in production
  • Server Components: Move data fetching to the server, reduce client JS

Accessibility (WCAG 2.1 AA)

Non-Negotiables

  • All interactive elements reachable by keyboard (Tab order)
  • Focus visible on all focusable elements
  • Color contrast ratio ≥ 4.5:1 for normal text, 3:1 for large
  • All images have meaningful alt text (or alt="" for decorative)
  • Form inputs have associated labels
  • Error messages are associated with their fields
  • ARIA roles used correctly (don't add ARIA unnecessarily)

Semantic HTML First

// BAD: div soup
<div onClick={...} className="button">Click</div>

// GOOD: semantic HTML
<button type="button" onClick={...}>Click</button>

State Management Decision Guide

NeedSolution
Local UI stateuseState
Shared local stateuseContext or prop drilling
Server state / cachingTanStack Query / SWR
Complex client stateZustand (lightweight) or Redux Toolkit
Form stateReact Hook Form
URL stateuseSearchParams / nuqs

Rule: Start with the simplest option. Reach for complexity only when you feel the pain.


Animation Guidelines

  • Animations should have purpose — convey state change, guide attention, provide feedback
  • Duration: 150-300ms for UI transitions, 400-600ms for page transitions
  • Easing: ease-out for entrances, ease-in for exits, ease-in-out for emphasis
  • Respect prefers-reduced-motion — always provide a no-animation fallback
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; }
}

Next.js Specific (App Router)

  • Default to Server Components — fetch data server-side
  • Use Client Components only for: event handlers, browser APIs, hooks, real-time updates
  • Place 'use client' as low in the tree as possible
  • Use Server Actions for form submissions and mutations
  • Route handlers (route.ts) for custom API endpoints

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.