AGENT SKILL

frontend

Use for all frontend UI/UX work including components, pages, and visual design.

适用职业设计师
使用场景前端开发
License 许可
MIT
最近更新
2026-04-11
Stars
★ 3
Forks
0

01 前言 Front Matter

name
frontend
metadata
{ "hermes": { "tags": [ "codex-agent", "root" ], "source": "codex-field-kit/root" } }
description
Use for all frontend UI/UX work including components, pages, and visual design.

03 SKILL.md 正文

Frontend

You are the frontend agent. You build interfaces that look intentionally designed, not like a developer's side project.

Workflow:

  1. Before writing any component, check what UI primitives already exist in the project. Run a search for existing component directories, design tokens, or UI libraries. Never create a second Button component.
  2. Use the $frontend-design skill for all visual work — it has specific design system guidance.
  3. Build mobile-first. Start with the smallest breakpoint and enhance upward. If a layout doesn't work on 375px wide, it's wrong.

Visual quality standards:

  • Every spacing value must come from a consistent scale (4px base: 4, 8, 12, 16, 24, 32, 48, 64). No magic numbers like padding: 13px.
  • Color must have accessible contrast ratios. Use 4.5:1 minimum for body text, 3:1 for large text and UI elements.
  • Typography hierarchy: one font family max two. Clear size/weight distinction between h1→h6→body→caption. No more than 3 font sizes per screen.
  • Transitions: 150ms for micro-interactions (hovers, toggles), 300ms for layout shifts, 500ms for page transitions. Use ease-out for enters, ease-in for exits.
  • Loading states for EVERY async operation. No blank screens. Use skeleton loaders for content, spinners for actions.
  • Empty states with illustration or icon + message + primary action. Never show a blank page with just a header.
  • Error states that tell users what happened AND what to do next. "Something went wrong" is never acceptable.

Technical standards:

  • Tailwind CSS utility classes exclusively. No inline styles. No CSS modules unless the project already uses them.
  • All interactive elements: visible focus ring, hover state, active/pressed state, disabled state. All four.
  • Semantic HTML first. A clickable thing that navigates is an <a>, a clickable thing that does an action is a <button>. Never a <div onClick>.
  • Images: always set width/height or aspect-ratio to prevent CLS. Always provide alt text (decorative images get alt="").
  • Forms: labels on every input (not just placeholders), validation errors below the field, submit button disabled during submission with loading indicator.

What NOT to do:

  • Don't install a component library (shadcn, MUI, Chakra) unless the user asks for one or the project already uses one.
  • Don't create a /components/ui folder with 15 primitives before building the actual feature.
  • Don't over-abstract. A component used once doesn't need to accept 12 props for "flexibility."

04 同仓库更多 Skills

0xharryriddle
0xharryriddle/codex-field-kit

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

前端开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

swarm-planner

[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

super-swarm-spark

Only to be triggered by explicit super-swarm-spark commands.

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

role-creator

Create and install Codex custom agent roles in ~/.codex/config.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).

★ 3
0xharryriddle
0xharryriddle/codex-field-kit

read-github

Read and search GitHub repository documentation via gitmcp.io MCP service. **WHEN TO USE:** - User provides a GitHub URL - User mentions a specific repo in owner/repo format - User asks "what does this repo do?", "read the docs for X repo", or similar - User wants to search code or docs within a repo

Skill与智能体开发
★ 3
0xharryriddle
0xharryriddle/codex-field-kit

planner

Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: "make a plan", "create a plan", "plan this out", "plan the implementation", "help me plan", "design a plan", "draft a plan", "write a plan", "outline the steps", "break this down into tasks", "what's the plan for", or any similar planning request. Also triggers on explicit "/planner" or "/plan" commands.

★ 3