本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)107k · #772

frontend-ui-engineering

できること

このツールは、経験豊富なエンジニアが作ったように見える、ウェブサイトやアプリ用のユーザーインターフェース(画面やコンポーネント)を作るのに役立ちます。誰でも使えるようにアクセシビリティに配慮し、さまざまな画面サイズでうまく動作し、プロフェッショナルな見た目になるようにします。

使う場面

  • ✓新しい画面やボタンを作るとき
  • ✓既存のページの見た目を調整するとき
  • ✓ウェブサイトがスマートフォンとパソコンの両方でうまく動作する必要があるとき

スキルのリンク

https://github.com/addyosmani/agent-skills/blob/main/skills/frontend-ui-engineering/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/addyosmani/agent-skills/blob/main/skills/frontend-ui-engineering/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“会員登録フォームに「保存」ボタンを作ってください。スマートフォンでも押しやすいようにしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、見た目とロジックを分けて、コードを論理的に整理します。また、確立されたデザインパターンを使い、アクセシビリティのルールに従って品質を確保します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Frontend UI Engineering

Overview

Build production-quality user interfaces that are accessible, performant, and visually polished. The goal is UI that looks like it was built by a design-aware engineer at a top company — not like it was generated by an AI. This means real design system adherence, proper accessibility, thoughtful interaction patterns, and no generic "AI aesthetic."

When to Use

  • Building new UI components or pages
  • Modifying existing user-facing interfaces
  • Implementing responsive layouts
  • Adding interactivity or state management
  • Fixing visual or UX issues

Component Architecture

File Structure

Colocate everything related to a component:

src/components/
  TaskList/
    TaskList.tsx          # Component implementation
    TaskList.test.tsx     # Tests
    TaskList.stories.tsx  # Storybook stories (if using)
    use-task-list.ts      # Custom hook (if complex state)
    types.ts              # Component-specific types (if needed)

Component Patterns

Prefer composition over configuration:

// Good: Composable
<Card>
  <CardHeader>
    <CardTitle>Tasks</CardTitle>
  </CardHeader>
  <CardBody>
    <TaskList tasks={tasks} />
  </CardBody>
</Card>

// Avoid: Over-configured
<Card
  title="Tasks"
  headerVariant="large"
  bodyPadding="md"
  content={<TaskList tasks={tasks} />}
/>

Keep components focused:

// Good: Does one thing
export function TaskItem({ task, onToggle, onDelete }: TaskItemProps) {
  return (
    <li className="flex items-center gap-3 p-3">
      <Checkbox checked={task.done} onChange={() => onToggle(task.id)} />
      <span className={task.done ? 'line-through text-muted' : ''}>{task.title}</span>
      <Button variant="ghost" size="sm" onClick={() => onDelete(task.id)}>
        <TrashIcon />
      </Button>
    </li>
  );
}

Separate data fetching from presentation:

// Container: handles data
export function TaskListContainer() {
  const { tasks, isLoading, error, refetch } = useTasks();

  if (isLoading) return <TaskListSkeleton />;
  if (error) return <ErrorState message="Failed to load tasks" retry={refetch} />;
  if (tasks.length === 0) return <EmptyState message="No tasks yet" />;

  return <TaskList tasks={tasks} />;
}

// Presentation: handles rendering
export function TaskList({ tasks }: { tasks: Task[] }) {
  return (
    <ul role="list" className="divide-y">
      {tasks.map(task => <TaskItem key={task.id} task={task} />)}
    </ul>
  );
}

State Management

Choose the simplest approach that works:

Local state (useState)           → Component-specific UI state
Lifted state                     → Shared between 2-3 sibling components
Context                          → Theme, auth, locale (read-heavy, write-rare)
URL state (searchParams)         → Filters, pagination, shareable UI state
Server state (React Query, SWR)  → Remote data with caching
Global store (Zustand, Redux)    → Complex client state shared app-wide

Avoid prop drilling deeper than 3 levels. If you're passing props through components that don't use them, introduce context or restructure the component tree.

Design System Adherence

Reference-led UI quality

When the product needs a distinct visual direction, collect evidence before choosing a layout:

  1. Search a trusted reference catalogue or use references supplied by the product team.
  2. Study two or three relevant screens. Record decisions about hierarchy, density, navigation, controls, responsive behavior, and interaction states.
  3. Turn those decisions into a short design contract before implementation. Name the screen's job, primary action, required states, responsive rules, and patterns to reject.
  4. Rebuild the useful structure in the product's own components, tokens, content, and visual language. Never copy another product's branding, proprietary text, imagery, or exact layout.

Use references as evidence, not as templates. If references are unavailable, document the assumptions and verify the result against the product's existing design system.

Avoid the AI Aesthetic

AI-generated UI has recognizable patterns. Avoid all of them:

AI Default Why It Is a Problem Production Quality
Purple/indigo everything Models default to visually "safe" palettes, making every app look identical Use the project's actual color palette

…

よくある質問

「アクセシブル」とはどういう意味ですか?

視覚や運動に障害のある人を含め、スクリーンリーダーや他の支援技術を使って、すべての人がインターフェースを使えることを意味します。

「レスポンシブ」とはどういう意味ですか?

スマートフォン、タブレット、パソコンなど、さまざまな画面サイズに合わせてインターフェースが自動的に適応し、すべてが読みやすく使いやすくなることを指します。

なぜ「AI風のデザイン」を避けるのですか?

AIが生成したインターフェースは、一般的な色、形、余白を使いがちで、プロのデザインに合わないことが多いからです。このツールは、高品質で、プロジェクトに合った見た目を作ることを重視しています。

詳細

作者による元の説明

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

repo: addyosmani/agent-skills

人気

GitHubのスター
107k
ランキング
#772
ライセンス
MIT
更新日
2026/10/13

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル