Token导航 LogoToken导航

Agent Skill · 开发规范

epic-ui-guidelines(史诗般的用户界面指南)

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

epic-ui-guidelines 是开发规范类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在开发规范类的 1,265 个 Skill 里排第 608。

总安装 744周安装 31GitHub Stars 5,504下载 248核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:epic-ui-guidelines(史诗般的用户界面指南)
来源仓库:https://github.com/epicweb-dev/epic-stack
仓库路径:skills/epic-ui-guidelines
安装命令:
npx skills add https://github.com/epicweb-dev/epic-stack --skill epic-ui-guidelines
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/epicweb-dev/epic-stack --skill epic-ui-guidelines

这个 Skill 是做什么的

开发规范类 Skill 用来统一代码风格、目录结构和评审口径,产出多为检查清单或改写建议。

Epic UI Guidelines 提供无障碍组件构建、Tailwind CSS 用法和语义 HTML 实现规范,关注真实用户需求。适合需要创建可访问表单、响应式布局或遵循品牌视觉一致性要求的界面开发任务。组件设计应以功能为核心,避免堆砌装饰元素干扰核心操作流程。

安装命令为 npx skills add https://github.com/epicweb-dev/epic-stack --skill epic-ui-guidelines。实际页面修改后应通过截图或浏览器预览检查文本截断、对齐偏移等视觉表现问题。

来源仓库内路径:skills/epic-ui-guidelines

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/epicweb-dev/epic-stack --skill epic-ui-guideli…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

epic-ui-guidelines 怎么安装?

在终端执行 npx skills add https://github.com/epicweb-dev/epic-stack --skill epic-ui-guidelines。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

epic-ui-guidelines 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

epic-ui-guidelines 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

epic-ui-guidelines 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

epic-ui-guidelines 用的人多吗?

公开数据是累计安装 744 次,近一周安装 31 次,下载 248 次,GitHub 5,504 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

epic-ui-guidelines 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发规范类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发规范类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
vercel-react-best-practices

Vercel React 最佳实践 · Codex、Claude

8,490,72025,918操作浏览器MIT通过
web-design-guidelines

网页设计指南 · Codex、Claude

6,686,01625,885需要联网MIT有提醒
remotion-best-practices

Remotion 最佳实践 · Codex、Claude

6,505,6323,027操作浏览器MIT有提醒
supabase-postgres-best-practices

Supabase Postgres 最佳实践 · Codex、Claude

3,175,5232,030需要联网MIT通过
next-best-practices

Next.js 最佳实践 · Codex、Claude

1,848,240841操作浏览器MIT通过
epic-ui-guidelines

史诗般的用户界面指南 · 本页

7445,504只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Epic Stack: UI Guidelines

When to use this skill

Use this skill when you need to:

  • Create accessible UI components
  • Follow Epic Stack design patterns
  • Use Tailwind CSS effectively
  • Implement semantic HTML
  • Add ARIA attributes correctly
  • Create responsive layouts
  • Ensure proper form accessibility
  • Follow Epic Stack's UI component conventions

Patterns and conventions

UI Philosophy

Following Epic Web principles:

Software is built for people, by people - Accessibility isn't about checking boxes or meeting standards. It's about creating software that works for real people with diverse needs, abilities, and contexts. Every UI decision should prioritize the human experience over technical convenience.

Accessibility is not optional - it's how we ensure our software serves all users, not just some. When you make UI accessible, you're making it better for everyone: clearer labels help all users, keyboard navigation helps power users, and semantic HTML helps search engines.

Example - Human-centered approach:

// ✅ Good - Built for people
function NoteForm() {
	return (
		<Form method="POST">
			<Field
				labelProps={{
					htmlFor: fields.title.id,
					children: 'Note Title', // Clear, human-readable label
				}}
				inputProps={{
					...getInputProps(fields.title),
					placeholder: 'Enter a descriptive title', // Helpful guidance
					autoFocus: true, // Saves time for users
				}}
				errors={fields.title.errors} // Clear error messages
			/>
		</Form>
	)
}

// ❌ Avoid - Technical convenience over user experience
function NoteForm() {
	return (
		<Form method="POST">
			<input name="title" /> {/* No label, no guidance, no accessibility */}
		</Form>
	)
}

Semantic HTML

✅ Good - Use semantic elements:

function UserCard({ user }: { user: User }) {
	return (
		<article>
			<header>
				<h2>{user.name}</h2>
			</header>
			<p>{user.bio}</p>
			<footer>
				<time dateTime={user.createdAt}>{formatDate(user.createdAt)}</time>
			</footer>
		</article>
	)
}

❌ Avoid - Generic divs:

// ❌ Don't use divs for everything
<div>
	<div>{user.name}</div>
	<div>{user.bio}</div>
	<div>{formatDate(user.createdAt)}</div>
</div>

Form Accessibility

✅ Good - Always use labels:

import { Field } from '#app/components/forms.tsx'

<Field
	labelProps={{
		htmlFor: fields.email.id,
		children: 'Email',
	}}
	inputProps={{
		...getInputProps(fields.email, { type: 'email' }),
		autoFocus: true,
		autoComplete: 'email',
	}}
	errors={fields.email.errors}
/>

The Field component automatically:

  • Associates labels with inputs using htmlFor and id
  • Adds aria-invalid when there are errors
  • Adds aria-describedby pointing to error messages
  • Ensures proper error announcement

❌ Avoid - Unlabeled inputs:

// ❌ Don't forget labels
<input type="email" name="email" />

ARIA Attributes

✅ Good - Use ARIA appropriately:

// Epic Stack's Field component handles this automatically
<Field
	inputProps={{
		...getInputProps(fields.email, { type: 'email' }),
		// aria-invalid and aria-describedby are added automatically
	}}
	errors={fields.email.errors} // Error messages are linked via aria-describedby
/>

✅ Good - ARIA for custom components:

function LoadingButton({ isLoading, children }: { isLoading: boolean; children: React.ReactNode }) {
	return (
		<button aria-busy={isLoading} disabled={isLoading}>
			{isLoading ? 'Loading...' : children}
		</button>
	)
}

Using Radix UI Components

Epic Stack uses Radix UI for accessible, unstyled components.

✅ Good - Use Radix primitives:

import * as Dialog from '@radix-ui/react-dialog'
import { Button } from '#app/components/ui/button.tsx'

function MyDialog() {
	return (
		<Dialog.Root>
			<Dialog.Trigger asChild>
				<Button>Open Dialog</Button>
			</Dialog.Trigger>
			<Dialog.Portal>
				<Dialog.Overlay className="fixed inset-0 bg-black/50" />
				<Dialog.Content className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white p-6">
					<Dialog.Title>Dialog Title</Dialog.Title>
					<Dialog.Description>Dialog description</Dialog.Description>
					<Dialog.Close asChild>
						<Button>Close</Button>
					</Dialog.Close>
				</Dialog.Content>
			</Dialog.Portal>
		</Dialog.Root>
	)
}

Radix components automatically handle:

  • Keyboard navigation
  • Focus management
  • ARIA attributes
  • Screen reader announcements

Tailwind CSS Patterns

✅ Good - Use Tailwind utility classes:

function Card({ children }: { children: React.ReactNode }) {
	return (
		<div className="rounded-lg border border-gray-200 bg-white p-6 shadow-sm">
			{children}
		</div>
	)
}

✅ Good - Use Tailwind responsive utilities:

<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
	{items.map(item => (
		<Card key={item.id}>{item.name}</Card>
	))}
</div>

✅ Good - Use Tailwind dark mode:

<div className="bg-white text-gray-900 dark:bg-gray-800 dark:text-gray-100">
	{content}
</div>

Error Handling in Forms

✅ Good - Display errors accessibly:

import { Field, ErrorList } from '#app/components/forms.tsx'

<Field
	labelProps={{ htmlFor: fields.email.id, children: 'Email' }}
	inputProps={getInputProps(fields.email, { type: 'email' })}
	errors={fields.email.errors} // Errors are displayed below input
/>

<ErrorList errors={form.errors} id={form.errorId} /> // Form-level errors

Errors are automatically:

  • Associated with inputs via aria-describedby
  • Announced to screen readers
  • Visually distinct with error styling

Focus Management

✅ Good - Visible focus indicators:

// Tailwind's default focus:ring handles this
<button className="focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
	Click me
</button>

✅ Good - Focus on form errors:

import { useEffect, useRef } from 'react'

function FormWithErrorFocus() {
	const firstErrorRef = useRef<HTMLInputElement>(null)

	useEffect(() => {
		if (actionData?.errors && firstErrorRef.current) {
			firstErrorRef.current.focus()
		}
	}, [actionData?.errors])

	return <Field inputProps={{ ref: firstErrorRef, ... }} />
}

Keyboard Navigation

✅ Good - Keyboard accessible components:

// Radix components handle keyboard navigation automatically
<Dialog.Trigger asChild>
	<Button>Open</Button>
</Dialog.Trigger>

// Custom components should support keyboard
<button
	onKeyDown={(e) => {
		if (e.key === 'Enter' || e.key === ' ') {
			handleClick()
		}
	}}
>
	Custom Button
</button>

Color Contrast

✅ Good - Use accessible color combinations:

// Use Tailwind's semantic colors that meet WCAG AA
<div className="bg-white text-gray-900"> // High contrast
<div className="text-blue-600 hover:text-blue-700"> // Accessible links

❌ Avoid - Low contrast text:

// ❌ Don't use low contrast
<div className="bg-gray-100 text-gray-200"> // Very low contrast

Responsive Design

✅ Good - Mobile-first approach:

<div className="
	flex flex-col gap-4
	md:flex-row md:gap-8
	lg:gap-12
">
	{/* Content */}
</div>

✅ Good - Responsive typography:

<h1 className="text-2xl md:text-3xl lg:text-4xl">
	Responsive Heading
</h1>

Loading States

✅ Good - Accessible loading indicators:

import { useNavigation } from 'react-router'

function SubmitButton() {
	const navigation = useNavigation()
	const isSubmitting = navigation.state === 'submitting'

	return (
		<button
			type="submit"
			disabled={isSubmitting}
			aria-busy={isSubmitting}
		>
			{isSubmitting ? 'Saving...' : 'Save'}
		</button>
	)
}

Icon Usage

✅ Good - Decorative icons:

import { Icon } from '#app/components/ui/icon.tsx'

<button aria-label="Delete note">
	<Icon name="trash" />
	<span className="sr-only">Delete note</span>
</button>

✅ Good - Semantic icons:

<button>
	<Icon name="check" aria-hidden="true" />
	Save
</button>

Skip Links

✅ Good - Add skip to main content:

// In your root layout
<a href="#main-content" className="sr-only focus:not-sr-only focus:absolute focus:top-0 focus:left-0 focus:z-50 focus:p-4 focus:bg-blue-600 focus:text-white">
	Skip to main content
</a>

<main id="main-content">
	{/* Main content */}
</main>

Progressive Enhancement

✅ Good - Forms work without JavaScript:

// Conform forms work without JavaScript
<Form method="POST" {...getFormProps(form)}>
	<Field {...props} />
	<StatusButton type="submit">Submit</StatusButton>
</Form>

Forms automatically:

  • Submit via native HTML forms if JavaScript is disabled
  • Validate server-side
  • Show errors appropriately

Screen Reader Best Practices

✅ Good - Use semantic HTML first:

// ✅ Semantic HTML provides context automatically
<nav aria-label="Main navigation">
	<ul>
		<li><a href="/">Home</a></li>
		<li><a href="/about">About</a></li>
	</ul>
</nav>

✅ Good - Announce dynamic content:

import { useNavigation } from 'react-router'

function SearchResults({ results }: { results: Result[] }) {
	const navigation = useNavigation()
	const isSearching = navigation.state === 'loading'

	return (
		<div
			role="status"
			aria-live="polite"
			aria-atomic="true"
			className="sr-only"
		>
			{isSearching ? 'Searching...' : `${results.length} results found`}
		</div>
	)
}

✅ Good - Live regions for important updates:

function ToastContainer({ toasts }: { toasts: Toast[] }) {
	return (
		<div aria-live="assertive" aria-atomic="true" className="sr-only">
			{toasts.map(toast => (
				<div key={toast.id} role="alert">
					{toast.message}
				</div>
			))}
		</div>
	)
}

ARIA live region options:

  • aria-live="polite" - For non-critical updates (search results, status messages)
  • aria-live="assertive" - For critical updates (errors, confirmations)
  • aria-atomic="true" - Screen reader reads entire region on update
  • aria-atomic="false" - Screen reader reads only changed parts

Keyboard Navigation Patterns

✅ Good - Tab order follows visual order:

// Elements appear in logical tab order
<nav>
	<a href="/">Home</a>
	<a href="/about">About</a>
	<a href="/contact">Contact</a>
</nav>

✅ Good - Keyboard shortcuts:

import { useEffect } from 'react'

function SearchDialog({ onClose }: { onClose: () => void }) {
	useEffect(() => {
		function handleKeyDown(e: KeyboardEvent) {
			if (e.key === 'Escape') {
				onClose()
			}
		}

		window.addEventListener('keydown', handleKeyDown)
		return () => window.removeEventListener('keydown', handleKeyDown)
	}, [onClose])

	return <Dialog>{/* content */}</Dialog>
}

✅ Good - Focus trap in modals:

// Radix Dialog automatically handles focus trap
<Dialog.Root>
	<Dialog.Content>
		{/* Focus is trapped inside dialog */}
		<Dialog.Close>Close</Dialog.Close>
	</Dialog.Content>
</Dialog.Root>

Focus Management for React Router

✅ Good - Focus on route changes:

import { useEffect } from 'react'
import { useNavigation } from 'react-router'

function RouteComponent() {
	const navigation = useNavigation()
	const mainRef = useRef<HTMLElement>(null)

	useEffect(() => {
		if (navigation.state === 'idle' && mainRef.current) {
			mainRef.current.focus()
		}
	}, [navigation.state])

	return (
		<main ref={mainRef} tabIndex={-1}>
			{/* Content */}
		</main>
	)
}

✅ Good - Focus on errors:

import { useEffect, useRef } from 'react'

function FormWithErrorFocus({ actionData }: Route.ComponentProps) {
	const firstErrorRef = useRef<HTMLInputElement>(null)

	useEffect(() => {
		if (actionData?.errors && firstErrorRef.current) {
			// Focus first error field
			firstErrorRef.current.focus()
			// Announce error
			firstErrorRef.current.setAttribute('aria-invalid', 'true')
		}
	}, [actionData?.errors])

	return <Field inputProps={{ ref: firstErrorRef, ... }} />
}

Typography and Readability

✅ Good - Readable text sizes:

// Use Tailwind's text size scale
<p className="text-base md:text-lg">Readable body text</p>
<h1 className="text-2xl md:text-3xl lg:text-4xl">Clear headings</h1>

✅ Good - Sufficient line height:

// Tailwind defaults provide good line height
<p className="leading-relaxed">Comfortable reading</p>

❌ Avoid - Small or hard-to-read text:

// ❌ Don't use very small text
<p className="text-xs">Hard to read</p>

Touch Target Sizes

✅ Good - Sufficient touch targets:

// Buttons should be at least 44x44px (touch target size)
<button className="min-h-[44px] min-w-[44px] px-4 py-2">
	Click me
</button>

✅ Good - Spacing between interactive elements:

<div className="flex gap-4">
	<Button>Save</Button>
	<Button>Cancel</Button>
</div>

Internationalization (i18n) Considerations

✅ Good - Use semantic HTML for dates/times:

<time dateTime={note.createdAt.toISOString()}>
	{formatDate(note.createdAt)}
</time>

✅ Good - Use semantic HTML for numbers:

// Screen readers can pronounce numbers correctly
<p>Total: <span aria-label={`${count} items`}>{count}</span></p>

✅ Good - Language attributes:

// In root.tsx
<html lang="en">
	<body>
		{/* Content */}
	</body>
</html>

Dark Mode Accessibility

✅ Good - Maintain contrast in dark mode:

// Ensure sufficient contrast in both modes
<div className="bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
	{content}
</div>

✅ Good - Respect user preference:

// Epic Stack automatically handles theme preference
// Use semantic colors that work in both modes
<button className="bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600">
	Button
</button>

Animation and Motion

✅ Good - Respect reduced motion:

// Tailwind automatically respects prefers-reduced-motion
<div className="transition-transform duration-200 hover:scale-105 motion-reduce:transition-none">
	{/* Animations disabled for users who prefer reduced motion */}
</div>

✅ Good - Use CSS for animations:

// ✅ CSS animations can be disabled via prefers-reduced-motion
<div className="animate-fade-in">
	{/* Content */}
</div>

// ❌ JavaScript animations may not respect user preferences

Common mistakes to avoid

  • ❌ Treating accessibility as a checklist: Accessibility is about serving real people, not just meeting standards
  • ❌ Missing form labels: Always use Field component which includes labels - helps all users, not just screen reader users
  • ❌ Using divs for semantic elements: Use <article>, <header>, <nav>, etc. - helps all users understand content structure
  • ❌ Ignoring keyboard navigation: Ensure all interactive elements are keyboard accessible - helps power users and those who can't use a mouse
  • ❌ Low color contrast: Test color combinations for WCAG AA compliance - helps users with visual impairments and in bright sunlight
  • ❌ Missing ARIA attributes: Use Epic Stack components which handle this automatically
  • ❌ Breaking focus management: Let Radix components handle focus
  • ❌ Not testing with screen readers: Test with VoiceOver, NVDA, or JAWS - understand how real users experience your UI
  • ❌ Hiding content from screen readers: Use sr-only instead of display: none for screen reader only content
  • ❌ Ignoring mobile users: Always test on mobile devices - many users only have mobile access
  • ❌ Not using Tailwind's responsive utilities: Use mobile-first responsive design
  • ❌ Not using live regions: Use aria-live for dynamic content announcements
  • ❌ Small touch targets: Ensure interactive elements are at least 44x44px - helps users with motor impairments and on mobile
  • ❌ Ignoring reduced motion: Respect prefers-reduced-motion media query - helps users with vestibular disorders
  • ❌ Poor focus indicators: Ensure focus is always visible - helps keyboard users navigate
  • ❌ Missing skip links: Add skip to main content links for keyboard users

References

平台分布

Claude Code

25.26%
按下载量换算63

Gemini CLI

21.54%
按下载量换算53

OpenCode

16.79%
按下载量换算42

Codex

13.33%
按下载量换算33

Antigravity

8.33%
按下载量换算21

windsurf

3.63%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills