agentleFS
nisarthnisarth/claude-skills-store/skills/design/frontend-design/SKILL.md

frontend-design

Skill1 starsChanged 7 months agoMITView on GitHub

Implement frontend designs with CSS architecture, responsive layouts, animations, and component styling. Use when translating designs to code, building responsive layouts, creating CSS animations, structuring component styles, or debugging layout issues. Trigger phrases: "implement this design", "CSS for this layout", "responsive layout", "style this component", "animation for", "CSS architecture", "frontend styling", "flexbox layout", "grid layout", "design to code"

187 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use instantly-campaign, albert-dm 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

    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 6 projects that use this

  • 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 5 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

  • julianoczkowskiSkill

    brief-to-tasks

    Break a design brief into an ordered checklist of independently buildable tasks using vertical slices. Saves as a markdown checklist. Use when user wants to break down work, create tasks from a brief, plan implementation order, or mentions "tasks" or "breakdown".

    Also in 7 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 6 projects that use this

  • +6 more from naman10parikh

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 181 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing code, break down the design:

    line 18
  2. Very specific:

    Use CSS Grid for two-dimensional layouts: repeat(auto-fill, minmax(280px, 1fr)) for responsive card grids, named grid areas for dashboard …

    line 87
  3. Very specific:

    Use mobile-first breakpoints (sm: 640px, md: 768px, lg: 1024px, xl: 1280px).

    line 91
  4. Distinctive:

    Performance: Use transform and opacity only for smooth 60fps.

    line 138
  5. Very specific:

    Use CSS custom properties for component theming: define component-level variables (e.g., --card-padding, --card-bg) that reference design …

    line 142
  6. Distinctive:

    Response: Use CSS Grid with auto-fill and minmax for automatic responsive reflow.

    line 163
  7. Distinctive:

    Response: Use CSS keyframes for fade-in with a subtle translateY.

    line 171
  8. Distinctive:

    Mobile-first CSS: Write the mobile layout first, then add complexity at larger breakpoints.

    line 175
  9. Distinctive:

    Avoid magic numbers: Every pixel value should either come from a token or have a comment explaining why it exists.

    line 177
  10. Distinctive:

    Prefer layout primitives: Use flexbox and grid for layout, not floats, absolute positioning, or margin hacks.

    line 178
  11. Distinctive:

    Performance matters: Avoid large layout reflows.

    line 180

“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 Implementation

Implement frontend designs with clean CSS architecture, responsive layouts, meaningful animations, and maintainable component styling.

Workflow

Step 1: Analyze the Design

Before writing code, break down the design:

  1. Layout structure: What is the overall page grid? What are the major sections?
  2. Components: What reusable components do you see? What are their variants?
  3. Responsive behavior: How does this change at different breakpoints?
  4. Interactions: What moves, transitions, or animates?
  5. Design tokens: What colors, fonts, spacing values are used? Do they match existing tokens?
### Design Analysis

**Layout**: [Grid type, columns, max-width]
**Components identified**: [List]
**Breakpoints needed**: [Mobile, Tablet, Desktop, Wide]
**Animations**: [List of interactive elements]
**Token alignment**: [Match with existing system / New tokens needed]

Step 2: Choose the CSS Architecture

Select based on project context:

ApproachBest ForKey Principle
CSS ModulesReact/Vue component librariesScoped by default, co-located
TailwindRapid development, utility-first teamsUtility classes, consistent constraints
Styled Components / CSS-in-JSDynamic theming, runtime stylesCo-located, props-driven
BEMLarge teams, global CSSNaming convention for predictability
Vanilla CSS (custom properties)Simple projects, design systemsNative, no build step

Step 3: Build the Layout

Flexbox Patterns

/* Centered content column */
.page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--content-max-width, 1200px);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Sidebar + main layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-width, 260px);
  flex-shrink: 0;
}
.main-content {
  flex: 1;
  min-width: 0; /* Prevent flex blowout */
}

/* Distribute items with gap */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

Grid Patterns

Use CSS Grid for two-dimensional layouts: repeat(auto-fill, minmax(280px, 1fr)) for responsive card grids, named grid areas for dashboard layouts with sidebar/main/header regions.

Step 4: Implement Responsive Behavior

Use mobile-first breakpoints (sm: 640px, md: 768px, lg: 1024px, xl: 1280px). Write base styles for mobile, then add complexity at larger breakpoints with @media (min-width). Use container queries (container-type: inline-size) for component-level responsiveness that adapts to parent size rather than viewport.

Responsive checklist:

  • Layout reflows naturally at each breakpoint
  • Text remains readable (16px minimum on mobile)
  • Touch targets are at least 44x44px on mobile
  • Images scale without distortion or overflow
  • No horizontal scrolling at any viewport size
  • Navigation adapts (hamburger, collapsed, full)

Step 5: Add Animations and Transitions

/* Interaction transitions */
.button {
  transition: background-color 150ms ease-in-out,
              transform 100ms ease-in-out;
}
.button:hover {
  background-color: var(--color-action-hover);
}
.button:active {
  transform: scale(0.98);
}

/* Enter/exit animations */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-enter {
  animation: fade-in 200ms ease-out;
}

/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

Animation principles:

  • Duration: 100-200ms for micro-interactions, 200-400ms for layout transitions
  • Easing: ease-out for entrances, ease-in for exits, ease-in-out for state changes
  • Purpose: Animations should provide feedback, orient the user, or show continuity. Never purely decorative.
  • Performance: Use transform and opacity only for smooth 60fps. Avoid animating width, height, top, left.

Step 6: Style Components

Use CSS custom properties for component theming: define component-level variables (e.g., --card-padding, --card-bg) that reference design tokens. Override these variables in modifier classes for variants (e.g., .card--featured). Add transitions on interactive properties (box-shadow, background-color) for hover and focus states.

Step 7: Quality Checklist

Before shipping:

  • Renders correctly in Chrome, Firefox, Safari, Edge
  • Mobile layout tested on actual devices (not just responsive mode)
  • Dark mode supported (if applicable)
  • Focus styles visible for keyboard navigation
  • No layout shifts during loading (CLS-friendly)
  • Images use appropriate format (WebP with fallback) and have explicit dimensions
  • CSS custom properties used for all design tokens
  • No magic numbers (every value references a token or is explained)
  • prefers-reduced-motion respected
  • prefers-color-scheme respected (if applicable)

Examples

Example 1: Card Grid

User: "Implement a responsive card grid from this design." Response: Use CSS Grid with auto-fill and minmax for automatic responsive reflow. Define the card component with proper spacing tokens. Add hover state with shadow transition. Ensure cards maintain consistent height with flexbox internal layout.

Example 2: Navigation

User: "Build a responsive navbar that collapses on mobile." Response: Desktop: horizontal flex layout with logo, nav links, and user menu. Mobile: hamburger trigger with slide-out or dropdown menu. Use a media query for the breakpoint. Handle focus management for the mobile menu (trap focus when open, return on close).

Example 3: Animation

User: "Add a page transition animation." Response: Use CSS keyframes for fade-in with a subtle translateY. Apply to page content on route change. Keep duration under 300ms. Respect prefers-reduced-motion by disabling animation for users who request it.

Best Practices

  1. Mobile-first CSS. Write the mobile layout first, then add complexity at larger breakpoints. This produces simpler, more maintainable CSS.
  2. Use custom properties for tokens. Colors, spacing, fonts, and shadows should all reference CSS custom properties. This enables theming and consistency.
  3. Avoid magic numbers. Every pixel value should either come from a token or have a comment explaining why it exists.
  4. Prefer layout primitives. Use flexbox and grid for layout, not floats, absolute positioning, or margin hacks. Modern CSS layout is powerful and predictable.
  5. Test on real devices. Browser responsive mode does not catch all mobile issues. Touch behavior, viewport quirks, and font rendering differ on actual devices.
  6. Performance matters. Avoid large layout reflows. Use will-change sparingly. Prefer transform/opacity for animations. Lazy-load images below the fold.
  7. Respect user preferences. Support prefers-reduced-motion, prefers-color-scheme, and prefers-contrast where possible. These are not edge cases.
  8. Co-locate styles with components. Whether using CSS Modules, styled-components, or Tailwind, keep styles close to the components that use them. Global CSS files become unmaintainable.

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.