Communitygithub.com

インターフェースを洗練させる

UIのスペーシング、タイポグラフィ、境界線、シャドウ、モーション、ヒットエリア、アイコン、テキスト折り返し、インタラクション状態をレビューまたは改善する際に、具体的な設計・エンジニアリングの詳細を適用してインターフェースを洗練させます。

インターフェースを洗練させる とは?

このスキルは、UIの細部までこだわる設計・エンジニアリングの詳細を適用し、インターフェースの洗練度を高めるためのものです。「UIがなんとなくおかしい」「平坦で安っぽい」「詰まっている」「動きがぎこちない」といったフィードバックに対応します。同心円状の半径ルール、光学的位置合わせ、シャドウと境界線の適切な使い分け、テキスト折り返しの制御、フォントスムージング、画像の輪郭線、モーションの設計、トランジション範囲の最適化、ヒットエリアの確保など、具体的な原則に基づいて改善点を提示します。Claude CodeやCursor、CodexなどのAIエージェントがUIのポリッシュパスを実行する際のガイドとして機能し、フロントエンドのコードレビューで具体的なbefore/afterの推奨事項を生成できます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/make-interfaces-feel-better

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

インターフェースを洗練させる は何をしますか?

このスキルは、小さな設計・エンジニアリングの詳細を積み重ねて、より洗練されたインターフェースにするために使用します。

出典:コミュニティPR #1659(linus707 による)を元に作成。

使用タイミング

  • ユーザーが「UIの感触がおかしい」「平坦」「安っぽい」「詰まっている」「ぎくしゃくしている」「未完成」と言ったとき。
  • コントロール、カード、リスト、ダッシュボード、ナビゲーション、フォーム、ツールバーを作成しているとき。
  • コンポーネントにホバー、アクティブ、フォーカス、エントリー、イグジット、ローディング、空の状態が必要なとき。
  • フロントエンドレビューで具体的な「改善前/改善後」の推奨事項が必要なとき。

基本原則

同心円状の半径

近接するネストされた角丸の面では:

外側の半径 = 内側の半径 + パディング

パディングが大きい場合は、無理に計算に従わず、レイヤーを別々の面として扱います。重要なのは光学的な一貫性であり、計算式を崇拝することではありません。

光学的位置合わせ

幾何学的な中央揃えは、常に視覚的な中央揃えとは限りません。アイコンボタン、再生ボタンの三角形、矢印、星、非対称なアイコンは、わずかなオフセットが必要なことがよくあります。可能であればSVGを修正し、そうでなければピクセル単位のマージンやパディングの変更で調整します。

シャドウと境界線

境界線は区切りとフォーカスリングに使用します。カード、ボタン、ドロップダウン、ポップオーバーに奥行きが必要な場合は、重ねられたシャドウを使用します。シャドウは透過的で、さまざまな背景で機能するよう十分に控えめにする必要があります。

テキスト折り返し

  • 見出しや短いタイトルには text-wrap: balance を使用します。
  • 中程度の長さの本文、キャプション、説明、リスト項目には text-wrap: pretty を使用します。
  • 長い散文、コード、整形済みコンテンツでは両方とも避けてください。
  • カウンター、タイマー、価格、表など、変化する数値には font-variant-numeric: tabular-nums を使用します。

フォントスムージング

macOSでは、プロジェクトがすでに適用していない場合、ルートレイアウトでアンチエイリアスフォントスムージングを適用します:

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

画像の輪郭線

画像のエッジが表面にぼやけて見えないように、微妙なインセットの輪郭線が必要なことがよくあります。

img {
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}

@media (prefers-color-scheme: dark) {
  img {
    outline-color: rgba(255, 255, 255, 0.1);
  }
}

ニュートラルな黒または白のアルファ輪郭線を使用します。画像の輪郭線をブランドカラーの色合いにしないでください。

モーション

インタラクティブな状態変化にはCSSトランジションを使用します。これは、ユーザーがモーションの途中で意図を変えたときに再ターゲットできるためです。キーフレームは、段階的なワンショットのエントランスやローディングシーケンスのために取っておきます。

適切なモーションのデフォルト:

  • エントリー:opacity、小さな translateY、そして必要に応じてblurを組み合わせます。
  • イグジット:エントリーよりも短く静かに、通常は150ms。
  • プレス:触感のあるボタンには scale(0.96)、動きが気を散らす場合は無効にする方法を用意します。
  • アイコンの切り替え:瞬時に表示を切り替えるのではなく、opacity、scale、blurでクロスフェードします。

トランジション範囲

transition: all は決して使用しないでください。変更するプロパティを指定します:

.button {
  transition-property: transform, background-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

will-change は、transform、opacity、filter などのコンポジターに適したプロパティの最初のフレームのスタッターに対してのみ使用します。will-change: all は決して使用しないでください。

ヒットエリア

インタラクティブなコントロールは、少なくとも40x40px、理想的にはレイアウトが許せば44x44pxのヒットエリアを持つ必要があります。表示されるアイコンが小さい場合は、疑似要素で拡張しますが、拡張されたヒットエリアが重ならないようにします。

レビュー出力

UIポリッシュパスをレビューする際は、具体的な変更点を「改善前/改善後」の行で報告します:

原則改善前改善後
同心円状の半径親と子で同じ半径親の半径がパディングを考慮
表形式の数字カウンターが数字の変化でずれるカウンターが tabular-nums を使用
トランジション範囲transition: all明示的なトランジションプロパティ

スニペットだけでは明らかでない場合は、ファイルパスとプロパティを含めます。確認したが変更しなかった原則は省略します。

チェックリスト

  • ネストされた角丸要素が光学的に一貫している。
  • アイコンが視覚的に中央揃えされている。
  • ボタン、カード、ポップオーバーが適切な理由で境界線またはシャドウを使用している。
  • 見出しと短いテキストが不器用な折り返しになっていない。
  • 動的な数値が表形式の数字を使用している。
  • 画像に必要に応じてニュートラルな輪郭線がある。
  • エントリーとイグジットのアニメーションが分割され、控えめで、適切な場合は中断可能である。
  • ボタンに触感のあるアクティブ状態があり、誇張された動きがない。
  • transition: all および will-change: all が使用されていない。
  • 小さなコントロールにも使用可能なヒットエリアがある。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

関連スキル