home / skills / chachamaru127 / claude-code-harness / ui

ui skill

/skills/ui

This skill generates UI components and feedback forms, ensuring accessibility and visual polish while aligning with design constraints for error-free

npx playbooks add skill chachamaru127/claude-code-harness --skill ui

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
3.6 KB
---
name: ui
description: "UIコンポーネントとフィードバックフォームを生成。Use when user mentions components, UI, hero sections, forms, feedback, or contact requests. Do NOT load for: authentication features, backend implementation, database operations, or business logic."
description-en: "Generates UI components and feedback forms. Use when user mentions components, UI, hero sections, forms, feedback, or contact requests. Do NOT load for: authentication features, backend implementation, database operations, or business logic."
description-ja: "UIコンポーネントとフィードバックフォームを生成。Use when user mentions components, UI, hero sections, forms, feedback, or contact requests. Do NOT load for: authentication features, backend implementation, database operations, or business logic."
allowed-tools: ["Read", "Write", "Edit", "Bash"]
user-invocable: false
---

# UI Skills

UIコンポーネントとフォームの生成を担当するスキル群です。

## 制約の優先順位と適用条件

1. 基本は `references/ui-skills.md` の制約を最優先で適用する。
2. `references/frontend-design.md` は「尖った/独自/表現強め/ブランド強化」などが**明示**された場合のみ適用する。
3. UI Skills の MUST/NEVER は原則維持。ただし**ユーザーが明示的に要求した場合のみ**以下の例外を許可する:
   - グラデーション、発光、強い装飾
   - アニメーション(追加・拡張)
   - カスタム easing

## 機能詳細

| 機能 | 詳細 |
|------|------|
| **制約セット** | See [references/ui-skills.md](references/ui-skills.md) / [references/frontend-design.md](references/frontend-design.md) |
| **コンポーネント生成** | See [references/component-generation.md](references/component-generation.md) |
| **フィードバックフォーム** | See [references/feedback-forms.md](references/feedback-forms.md) |

## 実行手順

1. **制約セットを適用**(優先順位に従う)
2. **品質判定ゲート**(Step 0)
3. ユーザーのリクエストを分類
4. 上記の「機能詳細」から適切な参照ファイルを読む
5. その内容に従って生成

### Step 0: 品質判定ゲート(a11y チェックリスト)

UI コンポーネント生成時は、アクセシビリティを確保:

```markdown
♿ アクセシビリティチェックリスト

生成する UI は以下を満たすことを推奨:

### 必須項目
- [ ] 画像に alt 属性を設定
- [ ] フォーム要素に label を関連付け
- [ ] キーボード操作可能(Tab でフォーカス移動)
- [ ] フォーカス状態が視覚的に分かる

### 推奨項目
- [ ] 色だけに依存しない情報伝達
- [ ] コントラスト比 4.5:1 以上(テキスト)
- [ ] aria-label / aria-describedby の適切な使用
- [ ] 見出し構造(h1 → h2 → h3)が論理的

### インタラクティブ要素
- [ ] ボタンに適切なラベル(「詳細」ではなく「製品詳細を見る」)
- [ ] モーダル/ダイアログのフォーカストラップ
- [ ] エラーメッセージがスクリーンリーダーで読まれる
```

### VibeCoder 向け

```markdown
♿ 誰でも使えるデザインにするために

1. **画像には説明をつける**
   - 「商品画像」ではなく「赤いスニーカー、正面から」

2. **クリックできる場所はキーボードでも操作可能に**
   - Tab キーで移動、Enter で決定

3. **色だけで判断させない**
   - 赤=エラー だけでなく、アイコン+テキストも
```

Overview

This skill generates UI components and feedback/contact forms with accessibility and practical design constraints in mind. It focuses on producing reusable, keyboard-friendly components and clear, labeled forms for web frontends. Do not use this skill for authentication features, backend implementation, database operations, or business logic.

How this skill works

The skill applies a prioritized constraint set, runs an accessibility quality gate, classifies the user request (components, hero sections, forms, or feedback), and generates markup and minimal frontend code following the chosen references. Decorative or highly expressive design rules from the stricter reference are only applied if the user explicitly requests brand-forward styling, gradients, or animations. The output emphasizes semantic HTML, ARIA where needed, and clear form labeling.

When to use it

  • When the user asks for UI components (buttons, cards, nav, hero sections).
  • When the user requests a feedback, contact, or support form with accessible labels and validation hints.
  • When producing static frontend component examples or prototypes (HTML/CSS/JS snippets).
  • When you need keyboard-accessible, screen-reader-friendly UI patterns.
  • When the user mentions visual/interaction details but not server-side or auth requirements.

Best practices

  • Always include alt text for images and associate labels with form controls.
  • Ensure keyboard focus order and visible focus styles for interactive elements.
  • Prefer semantic markup (button, nav, form, fieldset, legend, label) and minimal ARIA to fix gaps.
  • Provide clear, descriptive button and error texts (e.g., "View product details").
  • Only add heavy decoration, gradients, or animations when explicitly requested by the user.

Example use cases

  • Generate a responsive hero section with heading, CTA, and accessible image alt text.
  • Create a contact or feedback form with labels, required indicators, error messages, and simple client-side validation hints.
  • Produce a component library card and button examples with keyboard and focus states.
  • Provide an accessible modal dialog pattern with focus trap instructions and ARIA roles.
  • Convert a plain form spec into an accessible HTML/CSS/JS snippet ready for frontend integration.

FAQ

Can this skill produce backend form handling or authentication flows?

No. This skill only generates frontend UI components and client-side form behavior. Backend handling, auth, and database logic are out of scope.

Will generated components meet accessibility standards?

Yes. The skill runs an accessibility quality gate (labels, alt text, keyboard navigation, visible focus) and includes recommended ARIA and contrast guidance.

Can I request animations or strong brand visuals?

Yes, but those are applied only when you explicitly ask for decorative or expressive styling like gradients, glow, or custom easing.