Token导航 LogoToken导航

Agent Skill · 研究检索

ui-library-usage-auditor(ui 库使用审计员)

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

ui-library-usage-auditor 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 63,559。

总安装 315周安装 13GitHub Stars 3下载 103核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:ui-library-usage-auditor(ui 库使用审计员)
来源仓库:https://github.com/hopeoverture/worldbuilding-app-skills
仓库路径:skills/ui-library-usage-auditor
安装命令:
npx skills add https://github.com/hopeoverture/worldbuilding-app-skills --skill ui-library-usage-auditor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hopeoverture/worldbuilding-app-skills --skill ui-library-usage-auditor

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

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

安装方式:github,可通过 npx skills add 命令从指定仓库添加。适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境。

来源仓库内路径:skills/ui-library-usage-auditor

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

ui-library-usage-auditor 怎么安装?

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

ui-library-usage-auditor 支持哪些 AI 工具?

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

ui-library-usage-auditor 需要什么权限?

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

ui-library-usage-auditor 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

ui-library-usage-auditor 用的人多吗?

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

ui-library-usage-auditor 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
ui-library-usage-auditor

ui 库使用审计员 · 本页

3153只读未明确通过

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

SKILL.md 原文

UI Library Usage Auditor

Review and audit shadcn/ui component usage across the codebase to ensure accessible, consistent, and maintainable UI patterns. This skill identifies issues, suggests improvements, and recommends component extractions or layout optimizations.

When to Use This Skill

Apply this skill when:

  • Auditing UI components for accessibility compliance
  • Reviewing shadcn/ui usage patterns for consistency
  • Identifying opportunities for component extraction
  • Checking layout structure and responsive design
  • Ensuring proper ARIA attributes and semantic HTML
  • Finding duplicate component patterns
  • Reviewing form implementations
  • Checking for proper error handling in UI
  • Validating design system adherence

Audit Categories

1. Accessibility Audit

Check for:

  • Missing ARIA labels and descriptions
  • Improper heading hierarchy
  • Missing alt text on images
  • Insufficient color contrast
  • Missing keyboard navigation support
  • Form fields without labels
  • Non-semantic HTML usage
  • Missing focus indicators
  • Improper button vs link usage
  • Missing skip links for navigation

2. Component Consistency Audit

Check for:

  • Inconsistent component variants across pages
  • Mixed styling approaches (inline vs className)
  • Duplicate component implementations
  • Inconsistent spacing patterns
  • Mixed icon libraries or icon sizes
  • Inconsistent typography usage
  • Non-standard button patterns
  • Inconsistent error message displays
  • Mixed loading state implementations

3. Component Extraction Opportunities

Identify:

  • Repeated component patterns (3+ instances)
  • Complex inline JSX that could be components
  • Reusable form field groups
  • Common layout patterns
  • Shared modal/dialog content
  • Repeated table structures
  • Common card layouts
  • Shared empty states
  • Repeated loading skeletons

4. Layout and Responsiveness

Review:

  • Responsive breakpoint usage
  • Container max-width consistency
  • Grid and flexbox usage patterns
  • Mobile-first responsive design
  • Overflow handling
  • Scroll behavior
  • Fixed positioning issues
  • Z-index management

5. shadcn/ui Best Practices

Verify:

  • Correct component imports from @/components/ui
  • Proper use of composition patterns
  • Correct variant prop usage
  • Proper form component structure
  • Correct dialog/modal patterns
  • Proper toast/notification usage
  • Appropriate dropdown/select usage
  • Correct table implementations

Audit Process

Step 1: Scan Codebase for Components

Use Glob to identify all component files:

# Find all component files
Glob: **/*.tsx
Glob: app/**/*.tsx
Glob: components/**/*.tsx

Step 2: Grep for Specific Patterns

Search for common patterns and potential issues:

# Find form implementations
Grep: pattern="<form" output_mode="files_with_matches"

# Find button usage
Grep: pattern="<Button" output_mode="files_with_matches"

# Find ARIA usage
Grep: pattern="aria-" output_mode="content"

# Find inline styles
Grep: pattern='style=' output_mode="files_with_matches"

# Find accessibility issues
Grep: pattern="<img" output_mode="content"  # Check for alt text
Grep: pattern="onClick.*<div" output_mode="content"  # Div as button antipattern

# Find repeated patterns
Grep: pattern="className=\".*flex.*items-center.*gap" output_mode="count"

Step 3: Read and Analyze Components

Read identified files to perform detailed analysis:

Read: /path/to/component.tsx

Analyze for:

  • Component structure and complexity
  • Props interface design
  • State management approach
  • Event handler patterns
  • Conditional rendering logic
  • Accessibility attributes

Step 4: Generate Audit Report

Create structured report with findings organized by:

  • Critical Issues: Accessibility violations, broken patterns
  • Warnings: Inconsistencies, suboptimal patterns
  • Suggestions: Refactoring opportunities, extractions
  • Best Practices: Recommendations for improvement

Common Issues and Solutions

Issue 1: Missing Form Labels

Problem:

<Input
  type="text"
  value={name}
  onChange={(e) => setName(e.target.value)}
/>

Solution:

<FormField
  control={form.control}
  name="name"
  render={({ field }) => (
    <FormItem>
      <FormLabel>Name</FormLabel>
      <FormControl>
        <Input {...field} />
      </FormControl>
      <FormMessage />
    </FormItem>
  )}
/>

Issue 2: Div as Button

Problem:

<div onClick={handleClick} className="cursor-pointer">
  Click me
</div>

Solution:

<Button onClick={handleClick}>
  Click me
</Button>

Issue 3: Missing Image Alt Text

Problem:

<img src="/avatar.jpg" className="rounded-full" />

Solution:

<img
  src="/avatar.jpg"
  alt="User profile avatar"
  className="rounded-full"
/>

Issue 4: Inconsistent Spacing

Problem:

// File 1
<div className="flex gap-4">

// File 2
<div className="flex gap-2">

// File 3
<div className="flex space-x-3">

Solution:

// Standardize spacing scale
<div className="flex gap-4">  // Use consistent gap values (2, 4, 6, 8)

Issue 5: Complex Inline Component

Problem:

// Repeated in multiple files
<Card>
  <CardHeader>
    <div className="flex items-center justify-between">
      <div className="flex items-center gap-3">
        <Avatar>
          <AvatarImage src={user.avatar} />
          <AvatarFallback>{user.initials}</AvatarFallback>
        </Avatar>
        <div>
          <CardTitle>{user.name}</CardTitle>
          <CardDescription>{user.role}</CardDescription>
        </div>
      </div>
      <DropdownMenu>
        {/* Menu items */}
      </DropdownMenu>
    </div>
  </CardHeader>
</Card>

Solution: Extract to reusable component:

// components/UserCard.tsx
export function UserCard({ user }: UserCardProps) {
  return (
    <Card>
      <CardHeader>
        <div className="flex items-center justify-between">
          <div className="flex items-center gap-3">
            <Avatar>
              <AvatarImage src={user.avatar} alt={user.name} />
              <AvatarFallback>{user.initials}</AvatarFallback>
            </Avatar>
            <div>
              <CardTitle>{user.name}</CardTitle>
              <CardDescription>{user.role}</CardDescription>
            </div>
          </div>
          <UserMenu user={user} />
        </div>
      </CardHeader>
    </Card>
  )
}

Issue 6: Improper Heading Hierarchy

Problem:

<div className="page">
  <h1>Dashboard</h1>
  <div className="section">
    <h3>Recent Activity</h3>  {/* Skipped h2 */}
  </div>
</div>

Solution:

<div className="page">
  <h1>Dashboard</h1>
  <div className="section">
    <h2>Recent Activity</h2>  {/* Proper hierarchy */}
  </div>
</div>

Issue 7: Missing Loading States

Problem:

<Button onClick={handleSubmit}>
  Submit
</Button>

Solution:

<Button onClick={handleSubmit} disabled={isSubmitting}>
  {isSubmitting ? (
    <>
      <Loader2 className="mr-2 h-4 w-4 animate-spin" />
      Submitting...
    </>
  ) : (
    'Submit'
  )}
</Button>

Issue 8: Inconsistent Error Display

Problem:

// Mixing different error patterns
{error && <p className="text-red-500">{error}</p>}
{error && <span style={{ color: 'red' }}>{error}</span>}
{error && <Alert variant="destructive">{error}</Alert>}

Solution:

// Standardize on Alert component
{error && (
  <Alert variant="destructive">
    <AlertCircle className="h-4 w-4" />
    <AlertDescription>{error}</AlertDescription>
  </Alert>
)}

Audit Report Template

Generate audit reports using this structure:

# UI Library Usage Audit Report

**Generated:** [Date]
**Scope:** [Files/directories audited]
**Total Components Reviewed:** [Count]

## Executive Summary

[Brief overview of findings and overall code health]

## Critical Issues (Must Fix)

### 1. Accessibility Violations

- **Issue:** Missing alt text on images
  - **Files:** `app/characters/[id]/page.tsx:45`, `components/CharacterCard.tsx:23`
  - **Fix:** Add descriptive alt attributes to all images
  - **Priority:** High

- **Issue:** Form inputs without labels
  - **Files:** `app/create-location/page.tsx:78`
  - **Fix:** Wrap inputs in FormField with FormLabel
  - **Priority:** High

### 2. Broken Patterns

- **Issue:** Divs used as buttons with onClick handlers
  - **Files:** `components/Navigation.tsx:34`, `app/timeline/page.tsx:102`
  - **Fix:** Replace with Button component
  - **Priority:** High

## Warnings (Should Fix)

### 1. Inconsistent Patterns

- **Issue:** Mixed spacing scales (gap-2, gap-3, gap-4, space-x-2)
  - **Occurrences:** 47 instances across 23 files
  - **Recommendation:** Standardize on gap-{2,4,6,8} scale
  - **Priority:** Medium

- **Issue:** Inconsistent loading states
  - **Files:** `app/characters/actions.ts`, `app/locations/actions.ts`
  - **Recommendation:** Create shared LoadingButton component
  - **Priority:** Medium

### 2. Component Duplication

- **Issue:** Character card pattern repeated 5 times
  - **Files:** Multiple files listed
  - **Recommendation:** Extract CharacterCard component
  - **Priority:** Medium

## Suggestions (Consider)

### 1. Component Extraction Opportunities

#### EntityCard Component
**Occurrences:** 8 similar patterns
**Files:**
- `app/characters/page.tsx:67-89`
- `app/locations/page.tsx:54-76`
- `app/items/page.tsx:43-65`

**Proposed Component:**

interface EntityCardProps { title: string description: string image?: string tags?: string[] actions?: ReactNode }

export function EntityCard({ ... }: EntityCardProps) { // Unified card implementation }


#### FormSection Component

**Occurrences:** 12 similar patterns **Recommendation:** Extract reusable form section with heading and fields

### 2. Layout Improvements

- **Issue:** Inconsistent container max-width
  - **Recommendation:** Use standard container classes
  - **Files:** Multiple page components
- **Issue:** Missing responsive breakpoints
  - **Recommendation:** Add mobile-first responsive design
  - **Files:** `app/timeline/page.tsx`, `components/WorldMap.tsx`

## shadcn/ui Best Practices

### Correct Usage [OK]

- [OK] Forms using FormField pattern (23 components)
- [OK] Proper Button variants (89 instances)
- [OK] Consistent Dialog usage (14 components)

### Needs Improvement

- Use Card composition (found 7 instances using raw divs)
- Use Table component instead of custom tables (3 instances)
- Replace custom dropdowns with DropdownMenu (4 instances)

## Accessibility Score

**Overall Score:** 72/100

- **Semantic HTML:** 85/100
- **ARIA Attributes:** 65/100
- **Keyboard Navigation:** 78/100
- **Focus Management:** 70/100
- **Color Contrast:** 88/100

## Recommendations Priority

1. **Immediate (This Week)**
  - Fix missing alt text on images
  - Add labels to all form inputs
  - Replace div buttons with Button component
2. **Short-term (This Month)**
  - Extract repeated CharacterCard pattern
  - Standardize loading state patterns
  - Standardize spacing scale
3. **Long-term (This Quarter)**
  - Implement comprehensive component library documentation
  - Create storybook for all shared components
  - Establish component extraction guidelines

## Metrics

- **Total Files Scanned:** 127
- **Components Reviewed:** 89
- **Issues Found:** 34 critical, 67 warnings, 45 suggestions
- **Average Component Complexity:** Medium
- **Code Duplication Score:** 23% (target: <15%)

## Next Steps

1. Create GitHub issues for critical accessibility violations
2. Schedule team review of component extraction opportunities
3. Update style guide with standardized patterns
4. Plan refactoring sprint for high-priority warnings

Automation with Scripts

Use references/audit-checklist.md for comprehensive checklist of items to verify during audit.

Best Practices for Auditing

  1. Start Broad, Then Focus: Begin with file scanning, then drill into specific issues
  2. Prioritize by Impact: Accessibility issues > Broken patterns > Inconsistencies > Optimizations
  3. Provide Context: Include file paths, line numbers, and code snippets
  4. Suggest Solutions: Don't just identify problems, provide concrete fixes
  5. Quantify Issues: Use metrics to show scope and track improvement
  6. Group Related Issues: Cluster similar problems for efficient fixing
  7. Consider User Impact: Prioritize issues affecting end-user experience
  8. Balance Perfection vs Pragmatism: Focus on high-value improvements

Common Grep Patterns for Auditing

# Find potential accessibility issues
Grep: pattern="<img(?![^>]*alt=)" output_mode="files_with_matches"
Grep: pattern="onClick.*<(div|span)" output_mode="content"
Grep: pattern="<input(?![^>]*aria-label)" output_mode="content"

# Find inconsistent patterns
Grep: pattern="className=\"[^\"]*gap-[13579]" output_mode="count"
Grep: pattern="style=" output_mode="files_with_matches"

# Find component usage
Grep: pattern="from ['\"]@/components/ui" output_mode="content"
Grep: pattern="<Button" output_mode="count"
Grep: pattern="<Form" output_mode="count"

# Find potential duplications
Grep: pattern="<Card>" -A 10 output_mode="content"
Grep: pattern="className=\".*flex.*items-center.*justify-between" output_mode="count"

# Find error handling patterns
Grep: pattern="(error|Error)" output_mode="content"
Grep: pattern="toast\\." output_mode="content"

# Find loading states
Grep: pattern="(isLoading|loading|isPending)" output_mode="content"

Worldbuilding App Specific Checks

Entity Display Patterns

Check for consistent entity card layouts across:

  • Character listings
  • Location browsing
  • Item inventories
  • Faction displays
  • Timeline events

Form Patterns

Audit form consistency for:

  • Character creation/editing
  • Location forms
  • Item/artifact forms
  • Event timeline forms
  • Relationship management forms

Data Visualization

Review accessibility of:

  • World maps (keyboard navigation, screen reader support)
  • Timeline visualizations
  • Relationship graphs
  • Stat displays
  • Progress indicators

Integration with Development Workflow

Use audit findings to:

  1. Create linting rules for common issues
  2. Update team documentation
  3. Create component templates
  4. Establish PR review checklist
  5. Track technical debt
  6. Plan refactoring sprints
  7. Improve component library

Continuous Improvement

After implementing fixes:

  1. Re-run audit to measure improvement
  2. Document new patterns in style guide
  3. Update component library
  4. Share learnings with team
  5. Adjust audit criteria based on findings
  6. Schedule regular audits (monthly/quarterly)

平台分布

Codex

39.27%
按下载量换算40

Claude

29.64%
按下载量换算31

Cursor

18.11%
按下载量换算19

Gemini CLI

10.45%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills