awesome-cursor-rules-mdc is a generator that creates Cursor MDC rule files from structured library information, using semantic search and language models to gather and organize guidance. Developers use it to produce reusable rules for libraries in Cursor, and the catalogue includes 200 of those rules.
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.
git clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdcWrote 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/rules/sanjeed5/awesome-cursor-rules-mdc/shadcn)<a href="https://agentmods.dev/rules/sanjeed5/awesome-cursor-rules-mdc/shadcn"><img src="https://agentmods.dev/badge/rules/sanjeed5/awesome-cursor-rules-mdc/shadcn.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.02035 | $0.02035 |
| Opus 5 | $0.01018 | $0.01018 |
| Sonnet 5 | $0.00407 | $0.00407 |
| Haiku 4.5 | $0.00203 | $0.00203 |
Grade A, and why
shadcn 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 4d 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 — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.
shadcn Best Practices
This document outlines our team's definitive best practices for developing with shadcn/ui. Adhere to these guidelines for all shadcn component development and integration.
1. Code Organization and Structure
Organize components logically to reflect UI hierarchy and promote discoverability.
Rule: Place domain-specific components under components/<domain> and reusable UI primitives under components/ui. Each component must reside in its own PascalCase file.
❌ BAD:
// components/Button.tsx
// components/profile-card.tsx
// components/user-settings/index.tsx (contains multiple components)
✅ GOOD:
// components/ui/Button.tsx
// components/forms/DatePicker.tsx
// components/layout/Sidebar.tsx
// components/forms/index.ts
export * from "./DatePicker";
export * from "./Input";
2. Component Architecture
Favor functional components, composition, and explicit prop definitions.
Rule: Use functional components with React.forwardRef and asChild for seamless integration with Radix primitives.
❌ BAD:
// No ref forwarding, no asChild
const Button = ({ children, onClick }) => (
<button onClick={onClick}>{children}</button>
);
✅ GOOD:
// components/ui/Button.tsx
import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils"; // Assuming you have a cn utility
const buttonVariants = cva(
"inline-flex items-center justify-center rounded-md text-sm font-medium",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive: "bg-destructive text-destructive-foreground",
},
size: {
default: "h-10 px-4 py-2",
sm: "h-9 rounded-md px-3",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
);
export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
}
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button";
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
/>
);
}
);
Button.displayName = "Button";
export { Button, buttonVariants };
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.
- 4d ago First seen · 313 lines · 2,035 tokens per session scan A 4a204c18d7ce
shadcn is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,571 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 2,035 tokens to every session, about $0.0102 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-09-03.
Other cursor rules, from other repositories
nextjs-react-tailwind-cursorrules-prompt-file
Cursor rules for Next.js development with React and Tailwind CSS integration.
react-chakra-ui-cursorrules-prompt-file
Cursor rules for React development with Chakra UI integration.
react-styled-components-cursorrules-prompt-file
Cursor rules for React development with Styled Components integration.
general
Wonder Blocks design system conventions, component patterns, and coding standards.
react-chakra-ui---folder-structure
A standard folder layout for React and Chakra UI projects, including separate locations for components, pages, themes, hooks, utilities, and assets. It also defines how Chakra UI theme files are grouped.
hatch3r-component-conventions
Component structure, styling tokens, loading/error/empty states, form validation timing, and accessible label patterns for Vue, React, and JSX.