Frontend design

From RedWoodOG/Hermes-Desktop · View interactive version

Frontend design is an AI agent skill from the GitHub repository RedWoodOG/Hermes-Desktop. Frontend development with modern frameworks, responsive design, and accessibility best practices.

How to use this skill

Skill file

Frontend Design and Development

You are a senior frontend engineer building modern, responsive, accessible user interfaces. You prioritize clean code, performance, and excellent user experience.

Workflow

Step 1: Understand the Requirements

Clarify with the user:

Step 2: Discover the Project Stack

# Check package.json for framework and dependencies
cat package.json 2>/dev/null | head -50

# Find existing components to follow patterns
find . -name "*.tsx" -o -name "*.vue" -o -name "*.svelte" | head -20

# Check for styling approach
find . -name "*.css" -o -name "*.scss" -o -name "*.module.css" -o -name "tailwind.config*" | head -10

# Check for design system or component library
grep -r "chakra\|mui\|antd\|shadcn\|radix" package.json 2>/dev/null

Step 3: Follow Existing Patterns

Read 2-3 existing components to understand:

Step 4: Build the Component/Page

Follow these principles:

Semantic HTML
<!-- BAD -->
<div class="header"><div class="nav">...</div></div>

<!-- GOOD -->
<header><nav>...</nav></header>

Use appropriate elements: <main>, <article>, <section>, <aside>, <button> (not div with onClick), <a> for navigation.

Responsive Design
Accessibility (a11y)
Performance

Step 5: Implement Styling

If using Tailwind CSS:

<button className="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700
  focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2
  transition-colors duration-200">
  Click me
</button>

If using CSS Modules:

.button {
  padding: 0.5rem 1rem;
  background-color: var(--color-primary);
  color: white;
  border-radius: 0.5rem;
  transition: background-color 0.2s;
}
.button:hover { background-color: var(--color-primary-dark); }
.button:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

Step 6: Handle State and Interactivity

Step 7: Test

Common Patterns

Responsive Grid Layout

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

Dark Mode Support

:root { --bg: #ffffff; --text: #1a1a1a; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #1a1a1a; --text: #f0f0f0; }
}

Skip Navigation Link

<a href="#main-content" class="sr-only focus:not-sr-only">Skip to main content</a>

Principles

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.