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 rules/madarco/ragrabbit/cursorrulesgit clone --depth 1 https://github.com/madarco/ragrabbitWhat 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 | $0.01453 | $0.01453 |
| Opus 5 | $0.00727 | $0.00727 |
| Sonnet 5 | $0.00291 | $0.00291 |
| Haiku 4.5 | $0.00145 | $0.00145 |
Grade A, and why
cursorrules 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 yesterday.
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 — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Style and Structure:
- Write concise, technical TypeScript code with accurate examples
- Prefer iteration and modularization over code duplication
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
Fullstack development:
- The main app is saas/app
- Use the packages/auth package for authentication, which exposes an auth function, eg: const session = await authOrLogin(); const email = session.user.email
- Put the components for the UI in the packages/design package: put them in packages/design/components/section name/
- Put the data schema in the packages/db package using DrizzleORM and PostgreSQL. The db can be acquired with
import db from "@repo/db", the schema withimport { usersTable } from "@repo/db/schema", the DrizzleOrm utilities withimport { eq } from "@repo/db/drizzle" - When updating the db schema, run
cd apps/saas && pnpm drizzle-kit generateto generate the new migrations whilepnpm drizzle-kit migrateto apply them to the db. - For API routes prefer using Server Actions in the apps/saas app directly, inside the same folder as the page and route
- For Server Actions, uses the this uses next-safe-action package and prefer using the authActionClient from the packages/actions package, eg: const result = await authActionClient.schema(mySchema).metadata({ name: "myAction" }).action(async ({ parsedInput, ctx }) => { ... });
- Calling a Server Action from a page can be done directly eg: const { data: result } = await myAction({}); or const { executeAsync} = useAction(myAction); const { data } = await executeAsync();
Naming Conventions:
- Use lowercase with dashes for directories (e.g., components/auth-wizard)
- Favor named exports for components
TypeScript Usage:
- Use TypeScript for all code; prefer interfaces over types
- Avoid enums; use maps instead
- Use functional components with TypeScript interfaces, eg
export default function MyComponent({ myProp }: { myProp: string }) { ... }
Syntax and Formatting:
- Use the "function" keyword for pure functions
- Use declarative JSX
Error Handling and Validation:
- Prioritize error handling: handle errors and edge cases early
- Use early returns and guard clauses
- Implement proper error logging and user-friendly messages
- Use Zod for form validation (use z.coerce... with number values)
- Model expected errors as return values in Server Actions
- Use error boundaries for unexpected errors
UI and Styling:
- Use Shadcn UI, Radix, and Tailwind Aria for components and styling
- Implement responsive design with Tailwind CSS; use a mobile-first approach
- Put the components for the UI in the @repo/design/ package
- Use the cn function for tailwind classes from @repo/design/lib/utils
- Use the import "@repo/design/..." always instead of @/, eg import { Button } from "@repo/design/shadcn/button"
- To import design components, use the path: "@repo/design/components/...". For Shadcn components, use the path: "@repo/design/shadcn/..."
- To add a missing Shadcn component, run
cd packages/design && shadcn add ... - To import icons, use the path: "@repo/design/base/icons" this exposes lucide-react icons.
- Always generate also a Storybook story for each component, put it next to the component file.
- For Forms, use the EasyForm component from the @repo/design/components/form package.
An Example Storybook story:
import { Meta, StoryObj } from "@storybook/react";
import { Badge } from "../badge";
const meta: Meta<typeof Badge> = {
title: "UI/Custom/Badge",
component: Badge,
argTypes: {
variant: {
control: "select",
options: ["default", "primary", "secondary", "success", "warning", "danger"],
},
},
};
export default meta;
type Story = StoryObj<typeof Badge>;
export const Default: Story = {
args: {
children: "Default Badge",
},
};
And example of an EasyForm:
const form = useForm<IndexFormValues>({
resolver: zodResolver(addIndexSchema),
defaultValues: { urls: [{ value: "" }] },
mode: "onChange",
});
// Multi field array:
const urlsFieldArray = useFieldArray({
name: "urls",
control: form.control,
});
<EasyForm form={form} onSubmit={onSubmit} message="Form submitted successfully">
<EasyFormFieldText
form={form}
name="name"
title="Name"
description="Please enter your full name"
placeholder="John Doe"
/>
<EasyFormFieldText
form={form}
name="email"
title="Email"
description="Enter your email address"
placeholder="[email protected]"
/>
<EasyFormMultiTextField
form={form}
field={field}
name="multiField"
title="Multi Field"
description="This is a multi EasyFormFieldText component"
placeholder="Enter some text"
/>
<EasyFormFieldNumber form={form} field={field} name="multiField" title="Multi Field" />
<EasyFormFieldSwitch form={form} name="switch" title="Switch" label="Switch Label" />
<EasyFormSubmit form={form} isExecuting={false} />
</EasyForm>
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.
- yesterday First seen · 168 lines · 1,453 tokens per session scan A a6ed2b85df43
cursorrules is a cursor rule published in the GitHub repository madarco/ragrabbit (135 stars, last pushed 7mo ago), licensed MIT. It adds 1,453 tokens to every session, about $0.0073 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.
Other cursor rules, from other repositories
testing
Rules for writing Jest tests in TypeScript.
functions
Rules for writing TypeScript functions.
jsdoc-comments
add jsdoc comments to components and methods.
rules
Rules for placing and organizing Cursor rule files in the repository.
cursorrules
You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind.
nextjs
Best Practices for Next.js with App Router.