shadcn-components

shadcn-components is a cursor rule for Cursor from maccman/ai-monorepo-scaffold. It costs 8 tokens per session (1,231 once invoked), scanned A, original, MIT.

Project instructions for adding shadcn UI components to a React web app. These components are reusable interface pieces such as alerts, menus, avatars, and progress indicators.

In plain words
What is it for?
Use them when installing or using supported shadcn components in the web app, especially under the project's shared UI components folder.
Why use it?
They specify the required installation command and remind developers to check whether a component is already present and read its current documentation.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them when installing or using supported shadcn components in the web app, especially under the project's shared UI components folder.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/maccman/ai-monorepo-scaffold/shadcn-components
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.

Clone the repo
git clone --depth 1 https://github.com/maccman/ai-monorepo-scaffold

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 shadcn-components

README.md
[![agentmods](https://agentmods.dev/badge/rules/maccman/ai-monorepo-scaffold/shadcn-components/github.svg)](https://agentmods.dev/rules/maccman/ai-monorepo-scaffold/shadcn-components)
Your own site
<a href="https://agentmods.dev/rules/maccman/ai-monorepo-scaffold/shadcn-components"><img src="https://agentmods.dev/badge/rules/maccman/ai-monorepo-scaffold/shadcn-components/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 shadcn-components

Your own site · 80×15
<a href="https://agentmods.dev/rules/maccman/ai-monorepo-scaffold/shadcn-components"><img src="https://agentmods.dev/badge/rules/maccman/ai-monorepo-scaffold/shadcn-components.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,231 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.00008 $0.01231
Opus 5 $0.00004 $0.00616
Sonnet 5 $0.00002 $0.00246
Haiku 4.5 $0.00001 $0.00123

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

Security

Grade A, and why

shadcn-components 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 10d 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/rules/shadcn-components.mdc · 76 lines

How it starts

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

The following official shadcn-ui components are available. Please check to see if they are installed under ./apps/web/components/ui before installing them with pnpm dlx shadcn@latest add <component-id>.

Notice that The 'shadcn-ui' package is deprecated. Please use the 'shadcn' package instead. For example:

pnpm dlx shadcn@latest add progress --cwd apps/web

YOU MUST use pnpm dlx shadcn@latest when installing shadcn packages.

Docs for each components are available at https://ui.shadcn.com/docs/components/<component-id>. Fetch and read the docs before using the component so that your knowledge is up-to-date.

  • accordion - Accordion: Stack of headings that expand/collapse to reveal hidden content.
  • alert - Alert: Static call-out box for status or info messages.
  • alert-dialog - Alert Dialog: Modal that interrupts the flow to confirm or warn about critical actions.
  • aspect-ratio - Aspect Ratio: Wrapper that locks children to a fixed width-to-height ratio (great for responsive media).
  • avatar - Avatar: Small user/asset image or initials placeholder.
  • badge - Badge: Tiny label for counts or status (e.g. "New", "3").
  • breadcrumb - Breadcrumb: Navigation trail that shows "where you are" in the app hierarchy.
  • button - Button: Click/tap element that triggers an action.
  • calendar - Calendar: Stand-alone calendar view, used by Date Picker or on its own.
  • card - Card: Content container with optional header/body/footer.
  • carousel - Carousel: Horizontal slider that cycles through a set of items or images.
  • chart - Chart: Light wrapper for quick bar/line/pie visualizations.
  • checkbox - Checkbox: Square control for on/off selection of independent items.
  • collapsible - Collapsible: Utility that hides/reveals content with smooth height animation.
  • combobox - Combobox: Autocomplete text input that filters a long list and lets users pick an item.
  • command - Command Palette: VS Code-style keyboard overlay for fuzzy-searching actions.
  • context-menu - Context Menu: Right-click (long-press) menu with context-specific commands.
  • data-table - Data Table: Table with helpers for sorting, filtering and pagination.
  • date-picker - Date Picker: Input field that pops a calendar for choosing dates or ranges.
  • dialog - Dialog: Generic modal overlay for arbitrary interactive content.
  • drawer - Drawer: Slide-in panel (often from edge/bottom) for secondary workflows.
  • dropdown-menu - Dropdown Menu: Triggered list of options/actions that auto-dismisses on selection.
  • form - Form: Helpers and styles for accessible, validated forms.
  • hover-card - Hover Card: Lightweight popover that appears on hover/focus to show extra info.
  • input - Input: Standard single-line text field.
  • input-otp - Input OTP: Grouped inputs optimised for entering one-time pass-codes.
  • label - Label: Accessible label element for any form control.
  • menubar - Menubar: Horizontal desktop-app-style menu with dropdown sub-menus.
  • navigation-menu - Navigation Menu: Multi-level nav bar with active indicators and hover previews.
  • pagination - Pagination: Next/previous + numbered page controls for paginated data sets.
  • popover - Popover: Non-modal floating panel anchored to a trigger (e.g. emoji picker).
  • progress - Progress: Linear bar that shows completion percentage.
  • radio-group - Radio Group: Set of mutually-exclusive selection buttons.
  • resizable - Resizable: Wrapper that lets users drag to resize split panes.
  • scroll-area - Scroll Area: Augments native scrolling with custom styling and shadows.
  • select - Select: Styled single-select dropdown (native replacement).
  • separator - Separator: Horizontal or vertical rule dividing content.
  • sheet - Sheet: Mobile-friendly slide-up bottom sheet (from tiny to full-screen).
  • sidebar - Sidebar: Vertical navigation rail that can collapse/expand.
  • skeleton - Skeleton: Grey placeholder shapes shown while real content loads.
  • slider - Slider: Draggable handle on a track for numeric values or ranges.
  • sonner - Sonner: Opinionated toast component (thin wrapper around the Sonner library).
  • switch - Switch: Toggle switch for true/false settings.
  • table - Table: Basic static table markup & styling.
  • tabs - Tabs: Tab strip that swaps between associated panels.
  • textarea - Textarea: Multi-line text input.
  • toast - Toast: Ephemeral message that pops at screen edge and auto-dismisses.
  • toggle - Toggle: Pressable button that stays pressed/un-pressed to indicate state.
  • toggle-group - Toggle Group: Collection of toggles acting as single- or multi-select controls.
  • tooltip - Tooltip: Small hover/focus label supplying helper text.
  • spinner - Spinner: An indicator to show a loading state.
  • kbd - Kbd: Display a keyboard key or group of keys.
  • button-group - Button Group: A group of buttons for actions and split buttons.
  • input-group - Input Group: Input with icons, buttons, labels and more.
  • field - Field: One component. All your forms.
  • item - Item: Display lists of items, cards, and more.
  • empty - Empty: Use this one for empty states.

Read the full file on GitHub · 76 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. 10d ago First seen · 76 lines · 8 tokens per session scan A 3f825a6780f4

Subscribe to this mod's changes

shadcn-components is a cursor rule published in the GitHub repository maccman/ai-monorepo-scaffold (304 stars, last pushed 10mo ago), licensed MIT. It adds 8 tokens to every session and 1,231 once invoked, about $0.0000 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-30.