ui-component
Generate a new UI component that follows StyleSeed Toss conventions for structure, tokens, accessibility, and component ergonomics.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- ui-component
- risk
- safe
- tags
- [ "ui", "components", "design-system", "frontend", "styleseed" ]
- tools
- [ "claude", "cursor", "codex", "gemini" ]
- author
- bitjaru
- source
- community
- category
- design
- date_added
- 2026-04-08
- description
- Generate a new UI component that follows StyleSeed Toss conventions for structure, tokens, accessibility, and component ergonomics.
- source_repo
- bitjaru/styleseed
- source_type
- community
03 SKILL.md 正文
UI Component
Overview
Part of StyleSeed, this skill generates components that respect the Toss seed's design language instead of improvising ad hoc markup and styling. It emphasizes semantic tokens, predictable typing, reusable variants, and mobile-friendly accessibility defaults.
When to Use
- Use when you need a new UI primitive or composed component inside a StyleSeed-based project
- Use when you want a component to match the existing Toss seed conventions
- Use when a component should be reusable, typed, and design-token driven
- Use when the AI might otherwise invent spacing, colors, or interaction patterns
How It Works
Step 1: Read the Local Design Context
Before generating code, inspect the seed's source of truth:
CLAUDE.mdfor conventionscss/theme.cssfor semantic tokens- at least one representative component from
components/ui/
If the user already has a better local example, follow the local codebase over a generic template.
Step 2: Choose the Correct Home
Place the output where it belongs:
src/components/ui/for primitives and low-level building blockssrc/components/patterns/for composed sections or multi-part patterns
Do not create a new primitive if an existing one can be extended safely.
Step 3: Follow the Structural Rules
Use these defaults unless the host project strongly disagrees:
- function declaration instead of a
constcomponent React.ComponentProps<>or equivalent native prop typingclassNamepassthrough supportcn()or the project's standard class mergerdata-slotfor component identification- CVA or equivalent only when variants are genuinely needed
Step 4: Use Semantic Tokens Only
Do not hardcode visual values if the design system has a token for them.
Preferred examples:
bg-cardtext-foregroundtext-muted-foregroundborder-bordershadow-[var(--shadow-card)]
Step 5: Preserve StyleSeed Typography and Spacing
- Use the scale already defined by the seed
- Prefer multiples of 6px
- Use logical spacing utilities where supported
- Keep display and heading text tight, body text readable, captions restrained
Step 6: Bake in Accessibility
- Touch targets should be at least 44x44px for interactive elements
- Keyboard focus must be visible
- Pass through
aria-*attributes where appropriate - Respect reduced-motion preferences for nonessential motion
Output
Provide:
- The generated component
- The target path
- Any required imports or dependencies
- Notes on variants, tokens, or follow-up integration work
Best Practices
- Compose from existing primitives before inventing new ones
- Keep the component API small and predictable
- Prefer semantic layout classes over arbitrary values
- Export named components unless the host project uses another standard consistently
Additional Resources
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
04 同仓库更多 Skills
vercel-sandbox
Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include "Vercel Sandbox browser", "microVM Chrome", "agent-browser in sandbox", "browser automation on Vercel", or any task requiring Chrome in a Vercel Sandbox.
slack
Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include "check my Slack", "what channels have unreads", "send a message to", "search Slack for", "extract from Slack", "find who said", or any task requiring programmatic Slack interaction.
electron
Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.
dogfood
Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", "test this app/site/platform", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
shadcn
Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", "switch to --preset", and for building a design system or applying a DESIGN.md or brand spec to shadcn/ui.