搜索

PythonReactSEOPDF
GitHub Skill

ux-prompts

This skill should be used when the user asks to "generate build prompts", "create implementation prompts", "break down the UX spec", "prepare prompts for v0/Bolt/Claude", "sequence the build tasks", or needs to transform UX specifications into sequential, self-contained prompts for UI generation tools.

min-hinthar☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

UX Spec to Build-Order Prompts

Transform detailed UX specifications into a sequence of self-contained prompts optimized for UI generation tools. Each prompt builds one discrete feature with full context included.

When to Use

  • User has a UX spec, PRD, or detailed feature documentation
  • Output needs to feed into UI generation tools (v0, Bolt, Claude, etc.)
  • User wants build-order sequencing (foundations → features → polish)
  • Large specs that would overwhelm a single prompt

Not for: Quick component requests, already-atomic features, specs that fit in one prompt.

Build Order Strategy

Generate prompts in this sequence:

Phase Contents Why First
1. Foundation Design tokens, shared types, base styles Everything depends on these
2. Layout Shell Page structure, navigation, panels Container for all features
3. Core Components Primary UI elements (cards, inputs, buttons) Building blocks
4. Interactions Drag-drop, selections, pickers Depend on components
5. States & Feedback Empty, loading, error, success states Refinement layer
6. Polish Animations, responsive, edge cases Final layer

Extraction Process

Step 1: Identify Atomic Units

List discrete buildable features:

  • Each screen/view
  • Each reusable component
  • Each interaction pattern
  • Each state variation
Step 2: Map Dependencies

For each unit, note what it requires:

  • "Cart drawer requires Cart Item component"
  • "Checkout flow requires Address form"
Step 3: Sequence by Dependencies

Order units so dependencies come first. Group tightly-coupled items into single prompts.

Step 4: Write Self-Contained Prompts

For each prompt:

  1. Re-state relevant context (no references to other prompts)
  2. Include specific measurements from spec
  3. Include all states
  4. Include all interactions
  5. Set explicit boundaries (what's excluded)

Self-Containment Rules

Each prompt MUST include:

  • Enough context to understand the feature in isolation
  • All visual specs (colors, spacing, dimensions)
  • All states that feature can have
  • All interactions for that feature

Each prompt MUST NOT:

  • Reference "see previous prompt" or "as described earlier"
  • Assume knowledge from other prompts
  • Leave specs vague ("appropriate styling")

Prompt Structure Template

## [Feature Name]

### Context
[What this is and where it fits in the app]

### Requirements
- [Specific dimensions, colors, spacing]
- [Layout structure]
- [Content elements]

### States
- Default: [description]
- Hover: [description]
- Loading: [description]
- Error: [description]
- [Other states]

### Interactions
- [Click behavior]
- [Hover behavior]
- [Keyboard support]

### Constraints
- This prompt includes: [list]
- This prompt does NOT include: [list]

### Verification
- [ ] [Testable criterion]
- [ ] [Testable criterion]

Output Format

# Build-Order Prompts: [Project Name]

## Overview
[1-2 sentence summary]

## Build Sequence
1. [Prompt name] - [brief description]
2. [Prompt name] - [brief description]
...

---

## Prompt 1: [Feature Name]
[Full self-contained prompt]

---

## Prompt 2: [Feature Name]
[Full self-contained prompt]

Output Location

Write prompts to same directory as source UX spec:

  • UX spec feature-x-ux-spec.md → output feature-x-prompts.md
  • For sprint-based output: sprints/sprint-1-foundation.md, sprints/sprint-2-components.md

Additional Resources

Reference Files

For prompt quality and verification:

  • references/quality-amplifiers.md — Specificity ladder, context density, extraction patterns
  • references/verification-templates.md — Per-type verification checklists
  • references/anti-patterns.md — Common mistakes and fixes
Example Files

Working examples in examples/:

  • component-prompt.md — Complete component prompt (Product Card)
  • flow-prompt.md — Complete page/flow prompt (Checkout Flow)

Quick Reference

Quality Checklist
  • Every measurement from spec captured
  • Every state from spec captured
  • Every interaction from spec captured
  • No prompt references another prompt
  • Build order respects dependencies
  • Each prompt executable with zero context
Specificity Ladder
Level Example
Vague "Use appropriate spacing"
Better "Use consistent spacing"
Good "8px padding, 16px gap"
Excellent "8px padding (var(--space-2)), 16px gap, matching card pattern"
Sprint Batching
Risk Prompt Types Ship After
Low Tokens, types, utilities Immediately
Medium Components, animations Unit tests
High Checkout, auth, payments E2E tests
Verification Footer by Type
Type Key Checks
Component Types, states, keyboard, dark mode
Page E2E happy path, error states, responsive
Animation 60fps, reduced motion, no blocking
Form Validation, labels, autofill

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!