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.
npx agentmods add skills/kws-projects/react-boilerplate/add-shadcn-componentnpx skills add kws-projects/react-boilerplate --skill add-shadcn-componentgit clone --depth 1 https://github.com/kws-projects/react-boilerplateWrote 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.
[](https://agentmods.dev/skills/kws-projects/react-boilerplate/add-shadcn-component)<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>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.
| Model | Per session | Once 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 |
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.
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
- Download it (pins the current version into
shadcn/):
npx shadcn@latest add <name>
-
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
- App code imports from
@/components/ui/<name>(nevershadcn/).
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
sonnerreads its theme fromnext-themes, which this project does not use.src/components/ui/sonner.tsxoverrides thethemeprop with the app'suseTheme(@/app/providers/ThemeContext). Apply the same override pattern in the wrapper for any component that assumesnext-themes. - Naming: the shadcn CLI generates files in kebab-case (e.g.
dropdown-menu.tsx). Leave theshadcn/file as-is (vendored, never renamed). Theui/wrapper uses PascalCase (e.g.DropdownMenu.tsx) to match the project convention. - Animations come from
tw-animate-css(imported insrc/index.css). Keep that import if components useanimate-in/zoom-inutilities. - ESLint disables
react-refresh/only-export-componentsforshadcn/andui/, so co-locating variants with components is fine there.
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.
- 5d ago First seen · 66 lines · 61 tokens per session scan A c06a46bd7a2a
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.
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".
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.
frontend-typescript-rules
Applies React/TypeScript type safety, component design, and state management rules. Use when implementing React components.
next-upgrade
Upgrade Next.js to the latest version following official migration guides and codemods.
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…
i18n
Flutter 국제화(i18n) 가이드라인. flutterlocalizations, intl, ARB 파일 관리, RTL 레이아웃, 복수형/성별 처리, 런타임 로캘 전환.