AGENT SKILL

shadcn-ui

Must always be enabled when working with shadcn-ui.

适用职业设计师
License 许可
MIT
最近更新
2026-11-01
Stars
★ 3
Forks
1

01 前言 Front Matter

name
shadcn-ui
description
Must always be enabled when working with shadcn-ui.

03 SKILL.md 正文

<fundamental_concept>

What is shadcn-ui?

shadcn-ui is NOT an npm package. It's a code distribution platform that copies component source code directly into your project.

Key principle: Components are added via CLI (pnpx shadcn@latest add) from a remote registry, NOT installed as dependencies. </fundamental_concept>

<component_management>

Adding Components

<cli_usage>

Primary Method: CLI

# Add single component
pnpx shadcn@latest add button

# Add multiple components
pnpx shadcn@latest add button card dialog

# Add all components
pnpx shadcn@latest add --all

# Preview component before adding
pnpx shadcn@latest view button

Important: Always use the CLI to add components. Do NOT create component files manually in components/ui/ unless explicitly instructed. </cli_usage>

<catalog_discovery>

Finding Components

  1. Official catalog: Browse components at https://ui.shadcn.com/docs/components
  2. CLI preview: Use pnpx shadcn@latest view <component-name> to preview before adding
  3. Search: Check the documentation site for all 60+ available components organized by category:
    • Form & Input (16 components)
    • Layout & Navigation (8 components)
    • Overlays & Dialogs (11 components)
    • Feedback & Status (7 components)
    • Display & Media (10 components) </catalog_discovery>

<custom_registries>

Custom Registries (if configured)

# Add from namespaced registry
pnpx shadcn@latest add @v0/dashboard

# Add from URL
pnpx shadcn@latest add https://example.com/r/custom-component.json

Registry configuration is in components.json:

{
  "registries": {
    "@acme": "https://registry.acme.com/r/{name}.json"
  }
}

</custom_registries> </component_management>

<critical_constraints>

DO NOT Edit Generated Files

NEVER directly edit files in these directories without explicit user instruction:

  • components/ui/ - CLI-generated component files
  • Any directory specified in components.json aliases

Why?: These files are managed by the CLI. Direct edits will be lost on updates.

<modification_workflow>

When Component Behavior Needs Customization

Step 1: Try usage-side control first

// ✅ Best: Control via props/className/composition at usage site
<Button className="custom-styling" onClick={customHandler} />

Step 2: If usage-side control is insufficient You MUST ask the user for permission before modifying components/ui/ files.

Required information for user approval:

  1. Why extension is needed: Explain what cannot be achieved via props/className
  2. Design approach: Describe how you plan to extend the component (new props, variant, internal logic change, etc.)

Example request:

The Button component needs to support an icon prop for consistent icon positioning. This cannot be achieved via className alone because it requires conditional rendering logic. I propose adding an optional icon?: React.ReactNode prop and rendering it with fixed spacing before children. May I modify components/ui/button.tsx?

Only proceed with modification after receiving explicit user approval. </modification_workflow> </critical_constraints>

<common_tasks>

Common Tasks

For comprehensive reference when documentation is insufficient, consult: https://ui.shadcn.com/llms.txt </common_tasks>

<architecture_notes>

Technical Details

  • Built with: TypeScript, Tailwind CSS, Radix UI primitives
  • Configuration: components.json at project root
  • Customization: Components are yours to own - they're copied into your codebase
  • Updates: Re-run pnpx shadcn@latest add <component> --overwrite to update

Remember: shadcn-ui provides the code, not the package. You maintain full control and ownership. </architecture_notes>

04 同仓库更多 Skills

shengdabai
shengdabai/Tony-Claude-Code-Skills

seedance-prompt-en

Write effective prompts for Jimeng Seedance 2.0 multimodal AI video generation. Use when users want to create video prompts using text, images, videos, and audio inputs with the @ reference system. Covers camera movements, effects replication, video extension, editing, music beat-matching, e-commerce ads, short dramas, and educational content.

★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

onepage-pdf

Convert an HTML page into a single continuous-page PDF (one tall page, no pagination breaks), preserving desktop layout, backgrounds and selectable text. Use when the user asks to turn an HTML file/report/proposal into a "single-page PDF", "long PDF", "不分页 PDF", "单页 PDF", "长图式 PDF", or complains that an HTML-to-PDF export breaks into pages or cuts content. Supports optional string redaction with leak verification.

★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

native-feel-cross-platform-desktop

Use when the user is designing, prototyping, or rewriting a desktop app that must run on multiple OSes (macOS + Windows, optionally Linux) AND feel indistinguishable from a native app to its users — fast launch, native windowing, native input handling, native materials. Trigger words include "cross-platform desktop", "Electron alternative", "Tauri vs native", "WebView wrapper", "near-native performance", "Raycast architecture", "WebKit/WebView2 quirks", "WKWebView", "system tray app", "global hotkey app", "launcher app". Do NOT trigger this skill for pure web apps, pure mobile apps, or for greenfield projects that have no native-feel requirement.

★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

gstack

Router for the gstack skill suite. (gstack)

★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

fireworks-tech-graph

Use when the user wants to create any technical diagram - architecture, data flow, flowchart, sequence, agent/memory, or concept map - and export as SVG+PNG. Trigger on: "画图" "帮我画" "生成图" "做个图" "架构图" "流程图" "可视化一下" "出图" "generate diagram" "draw diagram" "visualize" or any system/flow description the user wants illustrated.

★ 3
shengdabai
shengdabai/Tony-Claude-Code-Skills

dbs-video-extract

接收抖音、小红书、微信视频号等短视频链接或分享文案,查询作品/账号数据并提取语音文字稿,按作者和标题归档为 Markdown。用户希望完整解析短视频、取得数据或文字稿时使用;运行前检查 TikHub 与轻抖使用凭证,缺少时用新手能理解的方式引导购买和安全配置。

★ 3