Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计未展示

shadcn-ui-%26-blocksshadcn/ui UI 26 blocks 搜索

Agent Skill

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

总安装

5,962

周安装

164

GitHub Stars

15

下载量

2,032
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:shadcn-ui-%26-blocks(shadcn/ui UI 26 blocks 搜索)
来源仓库:https://github.com/masonjames/shadcnblocks-skill
仓库路径:skills/shadcn-ui-%26-blocks
安装命令:
npx skills add https://github.com/masonjames/shadcnblocks-skill --skill 'Shadcn UI & Blocks'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/masonjames/shadcnblocks-skill --skill 'Shadcn UI & Blocks'

简介

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。

  • 它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性。
  • 使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素。
  • 涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。
  • 支持通过 npx 命令从指定 GitHub 仓库安装使用。

SKILL.md

Shadcn UI & ShadcnBlocks Integration

This skill enables building polished frontends using shadcn/ui components and premium ShadcnBlocks templates. Its primary capability is intelligently recommending the best block or component for any UI need — not just the right category, but the right *variant* within that category — then handling setup and installation.

When to Use

Activate this skill when:

  • Creating a new frontend, landing page, marketing site, or app UI
  • The project uses or should use React/Next.js with Tailwind CSS
  • Pre-built UI sections (hero, pricing, features, testimonials, etc.) would accelerate development
  • The user needs a specific UI element (form, chart, dialog, navigation, etc.)
  • The user mentions shadcn, shadcn/ui, shadcnblocks, or Tailwind-based UI components

Blocks vs Components

BlocksComponents
WhatFull page sectionsReusable UI elements
SizeHero, pricing, footer, etc.Buttons, inputs, dialogs, etc.
Count1,338 across 71 categories1,189 across 60+ groups
AccessPremium (API key required)Free
Install@shadcnblocks/<name><number>@shadcnblocks/<type>-<style>-<number>

Use blocks to compose full page layouts from pre-built sections. Use components for individual UI elements inside custom code.


Intelligent Block Selection

The 0-2 Question Rule

When recommending blocks, follow this progressive disclosure flow:

  • 0 questions: The user's request is specific enough to match directly (e.g., "add a hero with email capture form" → match on cta_pattern: form_capture)
  • 1 question: The section is clear but the style/layout is ambiguous (e.g., "add a feature section" → ask about layout preference)
  • 2 questions max: Both section and style are unclear (e.g., "add a section to show our product" → ask section type, then style)

Never ask more than 2 questions. If still ambiguous, pick the best 2-3 and explain the tradeoffs.

Decision Flow: Infer → Ask → Shortlist

Step 1 — Infer from the request (always do this first)

Extract as many constraints as possible before asking anything:

  • Section type: hero, feature, pricing, testimonial, cta, faq, navbar, footer, contact, stats
  • Goal keywords: "signup" → convert/capture_leads, "trust" → trust, "compare plans" → compare
  • Layout hints: "grid" → grid_cards, "side by side" → split, "accordion" → accordion interaction
  • Tone hints: "clean" → minimal, "bold" → bold, "professional" → enterprise
  • Media hints: "with screenshots" → screenshot media, "video" → video media
  • Density hints: "simple" → minimal density, "detailed" → rich density

Step 2 — Ask targeted questions (only if needed)

Use AskUserQuestion for structured multiple-choice refinement. Consult references/block-index.mdselection_prompts for the pre-defined questions and options per section.

Sections with pre-defined prompts: hero, feature, pricing, testimonial, cta, faq, navbar, footer, contact, stats.

Example for a feature section request:

AskUserQuestion:
  question: "How do you want to showcase your features?"
  options:
    - "Card grid (3-4 columns with icons)" — Classic feature grid with icon + description per card
    - "Alternating image + text rows" — Deep-dive with large visuals, great for product tours
    - "Bento / asymmetric grid" — Modern editorial layout with mixed-size cards
    - "Simple icon list or checklist" — Compact, scannable benefit list

If AskUserQuestion is unavailable, ask the same question inline with numbered options.

Step 3 — Match tags and return 2-3 best picks

Map the user's answer to tag filters, then match against references/block-index.md entries. Return exactly 2-3 recommendations in this format:

Here are the best matches for your [section type]:

1. **[block-id]** — [1-line "why this one"]
   Layout: [layout] · Tone: [tone] · [key differentiator]

2. **[block-id]** — [1-line "why this one"]
   Layout: [layout] · Tone: [tone] · [key differentiator]

3. **[block-id]** — [1-line "why this one"]
   Layout: [layout] · Tone: [tone] · [key differentiator]

Which one works best? I'll install it and set it up.

After the user picks, provide the install command and compose it into the page.

Tag Dimensions Used for Matching

These are the key dimensions from references/block-index.md used to differentiate blocks:

DimensionWhat it tells youExample values
layoutVisual arrangementcentered, split_right_media, grid_cards, bento, alternating
toneAesthetic feelminimal, modern, bold, enterprise, elegant, playful
goalBusiness purposeawareness, explain, trust, convert, capture_leads, compare
cta_patternAction typesingle_primary, primary_secondary, form_capture, multi_action
mediaVisual contentscreenshot, illustration, video, icons, avatars, logos
interactionDynamic behaviorstatic, accordion, tabs, carousel, toggle, hover
items_countNumber of items displayedfew, moderate, many
content_densityHow much contentminimal, standard, rich
complexityImplementation effortlow, medium, high

When to Use Which Reference

ScenarioUse
Recommending best-fit blocks (default)references/block-index.md — tagged picks with selection prompts
User wants a specific numbered variantreferences/block-catalog.md — full catalog with all variant numbers
Section not in block-index (e.g., blog, gallery)references/block-catalog.md — fall back to category defaults
User wants to browse all optionsDirect to https://shadcnblocks.com/explorer/blocks
Need an individual UI elementreferences/component-catalog.md — free components

Quick Category Reference

For sections not yet in block-index.md, use these defaults:

Content & Blog

NeedCategoryStart With
Blog listingblog (22 variants)blog1
Blog post pageblogpost (7 variants)blogpost1
Changelogchangelog (7 variants)changelog1
Code snippetscode-example (5 variants)code-example1

About & Team

NeedCategoryStart With
About sectionabout (17 variants)about1
Team pageteam (14 variants)team1
Company timelinetimeline (15 variants)timeline1
Job listingscareers (9 variants)careers1

Ecommerce

NeedCategoryStart With
Product cardsproduct-card (10 variants)product-card1
Product listingproduct-list (10 variants)product-list1
Product detailproduct-detail (10 variants)product-detail1
Shopping cartshopping-cart (11 variants)shopping-cart1
Checkoutcheckout (6 variants)checkout1
Order historyorder-history (5 variants)order-history1

App & Dashboard

NeedCategoryStart With
Dashboard chartschart-card (27 variants)chart-card10
Data tablesdata-table (32 variants)data-table1
App sidebarsidebar (21 variants)sidebar1
App shell layoutapplication-shell (14 variants)application-shell1
User profileuser-profile (12 variants)user-profile1

Portfolio

NeedCategoryStart With
Image gallerygallery (48 variants)gallery1
Project listingprojects (25 variants)projects1
Project detailproject (33 variants)project1
Case studiescase-studies (6 variants)case-studies1

Visual & Decorative

NeedCategoryStart With
Background patternsbackground-pattern (40 variants)background-pattern1
Animated shadersshader (10 variants)shader1
Bento grid layoutbento (8 variants)bento1

Navigation & Misc

NeedCategoryStart With
Announcement barbanner (7 variants)banner1
Sale/promo barpromo-banner (7 variants)promo-banner1
Partner logoslogos (13 variants)logos1
Comparisonscompare (10 variants)compare1

Selecting the Right Component

Consult references/component-catalog.md for the full catalog. Key groups:

NeedComponent GroupExample
Form layoutForm (86)form-signin-1
Labeled inputField (38)field-standard-1
Input with addonInput Group (39)input-group-standard-1
Searchable selectCombobox (42)combobox-standard-1
File uploadFile Upload (44)file-upload-standard-1
Date pickerDate Picker (8)date-picker-standard-1
Alert messageAlert (25)alert-error-1
Confirm dialogAlert Dialog (39)alert-dialog-standard-1
Loading skeletonSkeleton (30)skeleton-standard-1
Toast notificationSonner (24)sonner-standard-1
Empty stateEmpty (22)empty-standard-1
Modal dialogDialog (17)dialog-standard-1
Side panelSheet (29) / Drawer (22)sheet-standard-1
AccordionAccordion (21)accordion-standard-1
Data chartChart (70)chart-standard-1
Command paletteCommand (21)command-standard-1
Dropdown menuDropdown Menu (30)dropdown-menu-standard-1
Keyboard shortcutsKBD (39)kbd-standard-1

Core Workflow

1. Ensure Project Foundation

Verify the project has shadcn/ui initialized. If not:

npx shadcn@latest init

This creates components.json in the project root.

2. Configure ShadcnBlocks Registry

Check if components.json already has the @shadcnblocks registry. If not, run:

bash "${CLAUDE_PLUGIN_ROOT}/skills/shadcn-ui/scripts/setup-shadcnblocks.sh" .

This adds the @shadcnblocks registry to components.json and sets SHADCNBLOCKS_API_KEY in .env.

If the script can't run (e.g., jq missing), configure manually:

  1. Add to .env: SHADCNBLOCKS_API_KEY=<key>
  2. Add registry to components.json:
{
  "registries": {
    "@shadcnblocks": {
      "url": "https://shadcnblocks.com/r/{name}",
      "headers": {
        "Authorization": "Bearer ${SHADCNBLOCKS_API_KEY}"
      }
    }
  }
}

3. Select and Install Blocks

Use the intelligent selection flow (above) to recommend the best blocks, then install:

# Blocks (full page sections)
npx shadcn add @shadcnblocks/hero125
npx shadcn add @shadcnblocks/pricing3

# Components (UI elements)
npx shadcn add @shadcnblocks/accordion-standard-1
npx shadcn add @shadcnblocks/file-upload-standard-1

4. Compose the Page

Import and compose blocks in the page layout:

import { Navbar1 } from "@/components/navbar1";
import { Hero125 } from "@/components/hero125";
import { Feature3 } from "@/components/feature3";
import { Footer1 } from "@/components/footer1";

export default function LandingPage() {
  return (
    <>
      <Navbar1 />
      <Hero125 />
      <Feature3 />
      <Footer1 />
    </>
  );
}

Blocks are fully editable source code, not locked dependencies. Customize props and content after installation.

Landing Page Assembly Pattern

For a typical marketing landing page, use the intelligent selection flow for each section. A common assembly:

npx shadcn add @shadcnblocks/navbar1      # Simple nav with CTA
npx shadcn add @shadcnblocks/hero125      # Modern centered hero
npx shadcn add @shadcnblocks/logos1        # Trust logos strip
npx shadcn add @shadcnblocks/feature3     # 3-column feature cards
npx shadcn add @shadcnblocks/stats1       # Metrics bar
npx shadcn add @shadcnblocks/testimonial1 # Social proof grid
npx shadcn add @shadcnblocks/pricing3     # 3-tier pricing cards
npx shadcn add @shadcnblocks/faq1         # Accordion FAQ
npx shadcn add @shadcnblocks/cta1         # Final call to action
npx shadcn add @shadcnblocks/footer1      # Multi-column footer

Each of these was selected for a "modern SaaS" tone. For different tones (enterprise, minimal, bold, playful), the selection flow will recommend different variants.

API Key Management

The ShadcnBlocks API key can be provided in multiple ways (checked in order):

  1. Environment variable (simplest): Set SHADCNBLOCKS_API_KEY in your shell or .env file
  2. 1Password CLI: The helper script uses op read to retrieve the key. Set OP_SHADCNBLOCKS_REF to your 1Password reference path, or it defaults to op://Platform Infra/ShadcnBlocks API Key/credential

Retrieve the key using the helper script:

bash "${CLAUDE_PLUGIN_ROOT}/skills/shadcn-ui/scripts/get-api-key.sh"

Security: Never hardcode the API key in source files. Always use .env with SHADCNBLOCKS_API_KEY and ensure .env is in .gitignore.

Troubleshooting

IssueResolution
Auth error on installVerify SHADCNBLOCKS_API_KEY is set in .env with a valid key
Registry not foundCheck registries key exists in components.json
components.json missingRun npx shadcn@latest init
1Password accessRun op signin; verify vault with op vault list
Block not foundCheck block name at https://shadcnblocks.com

Reference Files

  • references/block-index.md — Tagged picks with selection prompts for intelligent block recommendation (primary source)
  • references/block-catalog.md — Full catalog of 1,338 blocks across 71 categories with variant numbers and install commands
  • references/component-catalog.md — Full catalog of 1,189 components across 60+ groups with install syntax
  • references/setup-guide.md — Detailed step-by-step setup with troubleshooting

Scripts

  • scripts/setup-shadcnblocks.sh — Automated project setup (retrieves key, configures registry)
  • scripts/get-api-key.sh — Retrieve API key (env var or 1Password)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.96%
按下载量换算710

Claude

30.63%
按下载量换算622

Cursor

18.22%
按下载量换算370

Gemini CLI

9.36%
按下载量换算190

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills