Skip to main content
ClaudeWave
Skill171 repo starsupdated 27d ago

frontend-design

Design and build production-ready frontend interfaces with design systems, responsive layouts, accessible components, and dark mode support. Use when the user requests frontend design or provides relevant inputs for this workflow.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/seb1n/awesome-ai-agent-skills /tmp/frontend-design && cp -r /tmp/frontend-design/design-and-ui-ux/frontend-design ~/.claude/skills/frontend-design
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Frontend Design

This skill enables the agent to design and implement frontend interfaces that are visually polished, responsive, accessible, and maintainable. The agent works with design systems — component libraries, spacing scales, color tokens, and typography scales — to produce consistent UI code. It outputs production-ready HTML, CSS (including Tailwind CSS), and framework components (React, Vue, Svelte) with WCAG-compliant accessibility and dark mode support built in.

## Workflow

1. **Analyze Requirements and Constraints**: Identify the target platforms (desktop, tablet, mobile), the framework in use (React, Vue, plain HTML), the styling approach (Tailwind, CSS Modules, styled-components), and any existing design tokens or brand guidelines. Determine the key pages or components needed and their priority order.

2. **Establish the Design System Foundation**: Define the core tokens before writing any component code. This includes a spacing scale (4px base: 4, 8, 12, 16, 24, 32, 48, 64), a type scale (xs through 4xl with corresponding line-heights), a color palette with semantic tokens (primary, secondary, success, warning, error, neutral) in both light and dark variants, and border-radius and shadow tokens. These tokens ensure every component is visually consistent.

3. **Build Components with Variants**: Implement each component with clearly defined variants (size, color, state). Use props or CSS classes to control variants rather than duplicating markup. Include all interactive states: default, hover, focus-visible, active, disabled. Ensure every interactive element has a visible focus ring for keyboard navigation.

4. **Implement Responsive Layouts**: Use CSS Grid for two-dimensional page layouts and Flexbox for one-dimensional component alignment. Define breakpoints (sm: 640px, md: 768px, lg: 1024px, xl: 1280px) and design mobile-first, layering complexity at larger breakpoints. Test that no horizontal scrolling occurs and that tap targets meet the 44x44px minimum on touch devices.

5. **Integrate Accessibility from the Start**: Apply semantic HTML elements (nav, main, article, section, aside) before adding ARIA attributes. Ensure color contrast meets WCAG 2.1 AA (4.5:1 for normal text, 3:1 for large text). Add `aria-label`, `aria-describedby`, and `role` attributes only where semantic HTML is insufficient. Test keyboard navigation order with Tab and Shift+Tab.

6. **Add Dark Mode Support**: Implement dark mode using a CSS custom property strategy or Tailwind's `dark:` variant. Swap background, text, and border tokens while preserving sufficient contrast ratios. Avoid pure black (`#000`) backgrounds — use a dark gray (`#0f172a` or `#1e293b`) for reduced eye strain. Ensure images, shadows, and elevation levels adapt appropriately.

## Usage

Provide the agent with a description of the interface you need, including the framework, styling approach, and any existing design tokens. The agent will produce component code with responsive behavior, accessibility attributes, and dark mode support included.

## Examples

### Example 1: React Card Component with Tailwind CSS Variants

**User Request**: "Create a reusable Card component in React with Tailwind CSS. I need default, elevated, and outlined variants, plus support for dark mode."

**Agent Response**:

```jsx
function Card({ variant = 'default', children, className = '' }) {
  const base = 'rounded-lg p-6 transition-colors duration-200';

  const variants = {
    default:
      'bg-white text-gray-900 dark:bg-slate-800 dark:text-gray-100',
    elevated:
      'bg-white text-gray-900 shadow-lg hover:shadow-xl dark:bg-slate-800 dark:text-gray-100 dark:shadow-slate-900/30',
    outlined:
      'bg-transparent text-gray-900 border border-gray-200 dark:text-gray-100 dark:border-slate-700',
  };

  return (
    <div className={`${base} ${variants[variant]} ${className}`}>
      {children}
    </div>
  );
}

function CardHeader({ title, subtitle }) {
  return (
    <div className="mb-4">
      <h3 className="text-lg font-semibold leading-tight">{title}</h3>
      {subtitle && (
        <p className="mt-1 text-sm text-gray-500 dark:text-gray-400">
          {subtitle}
        </p>
      )}
    </div>
  );
}

function CardFooter({ children }) {
  return (
    <div className="mt-6 flex items-center gap-3 pt-4 border-t border-gray-100 dark:border-slate-700">
      {children}
    </div>
  );
}
```

**Usage of the component**:
```jsx
<Card variant="elevated">
  <CardHeader title="Monthly Revenue" subtitle="Jan 2026" />
  <p className="text-3xl font-bold">$48,250</p>
  <CardFooter>
    <span className="text-sm text-green-600 dark:text-green-400">+12.5% from last month</span>
  </CardFooter>
</Card>
```

### Example 2: Responsive Dashboard Layout with CSS Grid

**User Request**: "Build a responsive dashboard layout with a sidebar, top nav, and main content area. Sidebar should collapse on mobile."

**Agent Response**:

```html
<div class="dashboard">
  <nav class="dashboard__topbar" role="navigation" aria-label="Primary">
    <button class="sidebar-toggle" aria-label="Toggle sidebar" aria-expanded="false">☰</button>
    <h1 class="topbar-title">Dashboard</h1>
    <div class="topbar-actions"><!-- user avatar, notifications --></div>
  </nav>
  <aside class="dashboard__sidebar" role="navigation" aria-label="Sidebar">
    <ul role="list">
      <li><a href="/overview" aria-current="page">Overview</a></li>
      <li><a href="/analytics">Analytics</a></li>
      <li><a href="/settings">Settings</a></li>
    </ul>
  </aside>
  <main class="dashboard__content" id="main-content" role="main">
    <!-- page content -->
  </main>
</div>
```

```css
.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 56px 1fr;
  min-height: 100vh;
}
.dashboard__topbar { grid-column: 1 / -1; }
.dashboard__sidebar { display: none; }

@media (min-width: 768px) {
  .dashboard {
    grid-template-columns: 240px 1fr;
    grid-template-rows: 56px
agent-evaluationSkill

Design reproducible evaluations for AI agents with representative task sets, explicit rubrics, appropriate graders, baselines, regression gates, and failure analysis. Use when defining agent quality, comparing prompts or models, validating a release, measuring tool-use reliability, investigating regressions, or deciding whether an agent is ready for production.

agent-observabilitySkill

Design privacy-aware observability for AI agents using traces, spans, structured events, metrics, cost attribution, dashboards, alerts, and investigation workflows. Use when instrumenting an agent, debugging intermittent tool or model failures, defining service-level objectives, analyzing latency or spend, auditing agent decisions, or preparing production monitoring.

human-in-the-loopSkill

Design and verify auditable human oversight, approval gates, escalation paths, and safe state transitions for AI agent workflows. Use when deciding which agent actions require review, adding approve/reject or dual-control flows, preventing unauthorized autonomous effects, creating decision records, reducing rubber-stamping, or recovering safely from rejected, expired, or failed actions.

mcp-server-buildingSkill

Design, implement, harden, and verify Model Context Protocol (MCP) servers with precise tool contracts, least-privilege authorization, safe transports, structured errors, and interoperability tests. Use when creating a new MCP server, exposing an API or data source through MCP, reviewing an MCP server design, adding or revising MCP tools, or preparing an MCP server for production.

multi-agent-orchestrationSkill

Design and operate bounded multi-agent workflows with task decomposition, dependency graphs, ownership, handoff contracts, shared-state controls, approvals, recovery, and synthesis. Use when a task contains genuinely independent workstreams, specialized roles, parallel research or implementation, reviewer-worker loops, or coordination problems that one agent should not execute sequentially.

tool-schema-designSkill

Design and validate model-facing tool definitions with clear names, action-oriented descriptions, bounded JSON Schema parameters, explicit side effects, safe defaults, idempotency, errors, and realistic tests. Use when creating function-calling tools, MCP tools, agent actions, structured tool inputs, or when a model selects the wrong tool, invents arguments, or causes unsafe side effects.

agent-red-teamingSkill

Plan, execute, document, and retest authorized security assessments of AI agents and multi-agent workflows using safe adversarial cases, synthetic identities, canaries, and evidence-based findings. Use when defining red-team rules of engagement, assessing prompt injection or excessive agency, testing tool and identity boundaries, evaluating memory or cross-agent attacks, scoring a campaign, or verifying remediation in an approved environment.

prompt-injection-defenseSkill

Threat-model and harden AI agents, RAG systems, assistants, and tool-using workflows against direct, indirect, stored, cross-agent, and multimodal prompt injection. Use when reviewing an agent architecture, isolating untrusted content, constraining tools and egress, protecting secrets, adding injection-focused tests, investigating a suspected injection incident, or documenting residual prompt-injection risk.