Borrowing it
Nothing to install: this file belongs to madarco/ragrabbit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/madarco/ragrabbit/main/.cursorrulesgit clone --depth 1 https://github.com/madarco/ragrabbitWrote 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/madarco/ragrabbit/cursorrules)<a href="https://agentmods.dev/rules/madarco/ragrabbit/cursorrules"><img src="https://agentmods.dev/badge/rules/madarco/ragrabbit/cursorrules/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.
<a href="https://agentmods.dev/rules/madarco/ragrabbit/cursorrules"><img src="https://agentmods.dev/badge/rules/madarco/ragrabbit/cursorrules.svg" alt="Reviewed on agentmods" width="80" 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.01453 | $0.01453 |
| Opus 5.5 | $0.00581 | $0.00581 |
| Sonnet 5.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 2mo 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 — 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.
- 2mo ago 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 10mo ago), licensed MIT. It adds 1,453 tokens to every session, about $0.0058 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-30.
cursorrules compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cursorrulesmadarco/ragrabbit | Cursor rule | 135 | 10mo ago | MIT | A | 1,453 | Cursor |
| testingthedaviddias/llms-txt-hub | Cursor rule | 924 | yesterday | none | A | 1,167 | Cursor |
| functionsthedaviddias/llms-txt-hub | Cursor rule | 924 | yesterday | none | A | 506 | Cursor |
| jsdoc-commentsthedaviddias/llms-txt-hub | Cursor rule | 924 | yesterday | none | A | 411 | Cursor |
| rulesthedaviddias/llms-txt-hub | Cursor rule | 924 | yesterday | none | A | 461 | Cursor |
| nextjsthedaviddias/llms-txt-hub | Cursor rule | 924 | yesterday | none | A | 157 | Cursor |
| sharedthedaviddias/llms-txt-hub | Cursor rule | 924 | yesterday | none | A | 154 | Cursor |