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/.

Good fit Use it to install, customize, upgrade, and expose shadcn/ui components through the project's component folders.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kws-projects/react-boilerplate/add-shadcn-component
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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-shadcn-component

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.5 $0.00024 $0.00280
Sonnet 5.5 $0.00012 $0.00140
Haiku 4.5 $0.00006 $0.00070

Measured 3mo ago against content hash c06a46bd7a2a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 5mo ago), licensed MIT. It adds 61 tokens to every session and 699 once invoked, about $0.0002 per session on Opus 5.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

add-shadcn-component compared with skills from other repositories

add-shadcn-component next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-shadcn-componentkws-projects/react-boilerplateSkill35mo agoMITA61Cursor
antdant-design/ant-design-proSkill39k10d agoMITA69Claude Code
merge-seedkriasoft/react-starter-kitSkill24k21d agoMITA49Claude Code, Codex
saas-builderixartz/SaaS-BoilerplateSkill7.5k3d agoMITA75Claude Code, Codex
tianji-artifactsmsgbyte/tianjiSkill3.1kyesterdayApache-2.0A72Claude Code, Codex
pro-upgradeant-design/ant-design-proSkill39k10d agoMITC63Claude Code
frontend-technical-specshinpr/ai-coding-project-boilerplateSkill239yesterdayMITA45Claude Code