add-shadcn-component

add-shadcn-component is a skill for Cursor from kws-projects/react-boilerplate. It costs 61 tokens per session (699 once invoked), scanned A, original, MIT.

A project-specific method for adding shadcn/ui components, which are reusable interface building blocks for React applications. It keeps downloaded component code separate from the wrappers that an app customizes and imports.

In plain words
What is it for?
Use it to install, customize, upgrade, and expose shadcn/ui components through the project's component folders.
Why use it?
It reduces conflicts during component upgrades and gives application code a stable place to add project-specific changes.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/kws-projects/react-boilerplate/add-shadcn-component
Any agent
npx skills add kws-projects/react-boilerplate --skill add-shadcn-component
Clone the repo
git clone --depth 1 https://github.com/kws-projects/react-boilerplate

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-shadcn-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/kws-projects/react-boilerplate/add-shadcn-component.svg)](https://agentmods.dev/skills/kws-projects/react-boilerplate/add-shadcn-component)
Your own site
<a href="https://agentmods.dev/skills/kws-projects/react-boilerplate/add-shadcn-component"><img src="https://agentmods.dev/badge/skills/kws-projects/react-boilerplate/add-shadcn-component.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 699 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.00699
Opus 5 $0.00030 $0.00349
Sonnet 5 $0.00012 $0.00140
Haiku 4.5 $0.00006 $0.00070

Measured 5d ago against content hash c06a46bd7a2a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

add-shadcn-component scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/add-shadcn-component/SKILL.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add / Upgrade shadcn Components

This project uses a two-layer convention so that vendored shadcn code stays pristine (easy to upgrade) and customizations live in a stable wrapper layer.

  • src/components/shadcn/<name>.tsx - the original, downloaded via the CLI. Never imported directly by app code. Treat as vendored; avoid editing.
  • src/components/ui/<name>.tsx - the project-facing component. App code imports only from here. Extend the original here.

components.json is configured so the CLI installs into src/components/shadcn/ (the ui alias points there). shadcn primitives import each other from @/components/shadcn/*, which is intentional and self-consistent.

Add a new component

  1. Download it (pins the current version into shadcn/):
npx shadcn@latest add <name>
  1. Create the wrapper src/components/ui/<name>.tsx.

    • If no changes are needed, make it a passthrough:
export * from '@/components/shadcn/<name>'
  • If extending, import the original and build on top, re-exporting the same names so call sites are unchanged:
import { Button as ShadcnButton } from '@/components/shadcn/button'
// ...add props/variants, then export your Button
  1. App code imports from @/components/ui/<name> (never shadcn/).

Upgrade

Re-run npx shadcn@latest add <name> --overwrite. Only files in shadcn/ change; wrappers in ui/ keep your customizations. Review the diff, then run yarn format && yarn typecheck && yarn lint && yarn test.

Gotchas

  • Theme: the shadcn sonner reads its theme from next-themes, which this project does not use. src/components/ui/sonner.tsx overrides the theme prop with the app's useTheme (@/app/providers/ThemeContext). Apply the same override pattern in the wrapper for any component that assumes next-themes.
  • Naming: the shadcn CLI generates files in kebab-case (e.g. dropdown-menu.tsx). Leave the shadcn/ file as-is (vendored, never renamed). The ui/ wrapper uses PascalCase (e.g. DropdownMenu.tsx) to match the project convention.
  • Animations come from tw-animate-css (imported in src/index.css). Keep that import if components use animate-in / zoom-in utilities.
  • ESLint disables react-refresh/only-export-components for shadcn/ and ui/, so co-locating variants with components is fine there.

Read the full file on GitHub · 66 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 66 lines · 61 tokens per session scan A c06a46bd7a2a

Subscribe to this mod's changes

add-shadcn-component is a skill published in the GitHub repository kws-projects/react-boilerplate (3 stars, last pushed 3mo ago), licensed MIT. It adds 61 tokens to every session and 699 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

pro-upgrade

Use when the user wants to upgrade their Ant Design Pro project to the latest version. Triggers on: upgrade pro, pro upgrade, migrate pro, update pro, 升级, 迁移项目, "how to upgrade", "update to latest", "keep project up to date".

ant-design/ant-design-pro · 63 tokens

frontend-technical-spec

Defines React environment, component architecture, state/data flow, build verification, and frontend non-functional criteria from repository evidence. Use when configuring or designing a React frontend, its build, or its runtime boundaries.

shinpr/ai-coding-project-boilerplate · 45 tokens

frontend-typescript-rules

Applies React/TypeScript type safety, component design, and state management rules. Use when implementing React components.

shinpr/ai-coding-project-boilerplate · 29 tokens

next-upgrade

Upgrade Next.js to the latest version following official migration guides and codemods.

agustinusnathaniel/nextarter-tailwind · 19 tokens

raqam

Teaches the raqam React number-input library — headless NumberField compound components, useNumberFieldState/useNumberField hooks, Intl presets, locale plugins (fa/ar/bn/hi/th), raqam/server formatting, validation, ScrubArea, accessibility, and form integration. Use when building or debugging currency/percent/unit…

47vigen/raqam · 102 tokens

i18n

Flutter 국제화(i18n) 가이드라인. flutterlocalizations, intl, ARB 파일 관리, RTL 레이아웃, 복수형/성별 처리, 런타임 로캘 전환.

sonature-lab/timsquad · 50 tokens