跳到主要内容
知仓学习社ZHICANG

ui-component

Generate a new UI component following the StyleSeed design conventions

不碰外部(只输出文字)无严重或高危命中sickn33/agentic-awesome-skills

它会碰到什么

扫了多少1 个文本文件,3 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

UI Component Generator

When to Use

Use this skill when you need generate a new UI component following the StyleSeed design conventions.

When NOT to use

  • For full-page scaffolding → use /ss-page
  • For composed multi-component patterns → use /ss-pattern
  • For tweaking an existing component — just edit the file directly
  • For non-StyleSeed projects (no components/ui/ directory or no Tailwind v4)

Generate a new component: $0

Description: $ARGUMENTS

Instructions

  1. First, read the design system seed for context:
  • Read CLAUDE.md for component conventions
  • Read css/theme.css for available design tokens
  • Read components/ui/button.tsx as a reference pattern
  1. Follow these conventions strictly:
  • Use function declaration (not const)
  • Add data-slot="component-name" attribute
  • Use cn() from @/components/ui/utils for all className merging
  • Use React.ComponentProps<> for prop typing
  • Always support className prop for overrides
  • Use CVA (class-variance-authority) if the component has variants
  • Use semantic color tokens (bg-card, text-foreground) — never inline hex
  1. Design token usage:
  • Colors: text-foreground, bg-card, text-brand, text-muted-foreground, border-border
  • Shadows: shadow-[var(--shadow-card)], shadow-[var(--shadow-elevated)]
  • Radius: rounded-md, rounded-lg, rounded-2xl
  • Spacing: multiples of 6px (p-1.5, p-3, p-6)
  • Motion: duration-[var(--duration-fast)], ease-[var(--ease-default)]
  1. Typography rules:
  • Display (36-48px): leading-none tracking-[-0.02em]
  • Heading (18-24px): leading-snug tracking-[-0.01em]
  • Body (14-17px): leading-normal (default tracking)
  • Caption uppercase (10-13px): tracking-[0.05em]
  • Use size- shorthand instead of w- h-*
  • Use ms-/me- instead of ml-/mr- (logical properties)
  1. Accessibility requirements:
  • Minimum touch target: 44x44px (min-h-11 min-w-11)
  • Support aria-* attributes passthrough
  • Use focus-visible:ring-2 focus-visible:ring-ring for keyboard focus
  • Respect prefers-reduced-motion for animations
  1. Export the component as a named export (not default)
  1. Place the file in the appropriate directory:
  • Primitive/reusable → src/components/ui/
  • Composed pattern → src/components/patterns/

Example

User request:

> Generate a new UI component following the StyleSeed design conventions.

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

同名技能的其他版本

有 3 个不同仓库或目录里都有叫 ui-component 的技能。它们内容并不相同,别混用: