cursorrules

cursorrules is a cursor rule for Cursor from bradleybeatz1313/awesome-agents-md. It costs 645 tokens per session, scanned A, original, MIT.

Project-specific coding rules for a Next.js 15 application using React, TypeScript, Tailwind, PostgreSQL, and several testing and form libraries.

In plain words
What is it for?
Use them when adding routes, forms, server-side changes, components, database code, or tests in this project.
Why use it?
They keep generated or modified code consistent with the project's architecture, naming, imports, database, UI, forms, and testing choices.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/bradleybeatz1313/awesome-agents-md/cursorrules
Clone the repo
git clone --depth 1 https://github.com/bradleybeatz1313/awesome-agents-md

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 cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/bradleybeatz1313/awesome-agents-md/cursorrules.svg)](https://agentmods.dev/rules/bradleybeatz1313/awesome-agents-md/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/bradleybeatz1313/awesome-agents-md/cursorrules"><img src="https://agentmods.dev/badge/rules/bradleybeatz1313/awesome-agents-md/cursorrules.svg" alt="Measured on agentmods" height="20"></a>
Per session 645 This file is loaded in full into every session.
When invoked 645 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00645 $0.00645
Opus 5 $0.00322 $0.00322
Sonnet 5 $0.00129 $0.00129
Haiku 4.5 $0.00064 $0.00064

Measured 4d ago against content hash fdbfd30fbbee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 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.

stacks/nextjs-15/.cursorrules · 63 lines

How it starts

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

Cursor rules — Next.js 15 + React 19 + TypeScript + Tailwind 4

You are working in a Next.js 15 App Router project. See AGENTS.md for full conventions.

The five rules that matter most

  1. Default to Server Components. Only "use client" when you genuinely need state, effects, browser APIs, or a client-only library.
  2. Server Actions for mutations. Don't write API routes for first-party form submissions.
  3. Use cn() from @/lib/utils for className composition. Never concatenate className strings manually.
  4. No any. Use unknown and narrow. The tsc config is strict — don't loosen it.
  5. Named exports only. Default exports are reserved for Next's special files.

Stack details

  • Package manager: pnpm
  • Database: Drizzle ORM with PostgreSQL
  • UI: shadcn components (don't edit components/ui/*)
  • Forms: React Hook Form + Zod
  • Tests: Vitest + Testing Library + Playwright

Imports

Use @/* path alias for everything below project root. Group imports:

  1. React/Next
  2. Third-party
  3. @/lib/*, @/hooks/*
  4. @/components/*
  5. Local relative

When you generate a new route

  • Decide: marketing (public, in app/(marketing)) or app (auth-gated, in app/(app))?
  • If it fetches data, do it in the Server Component, not a useEffect in a Client Component.
  • Wrap async children in <Suspense fallback={<Skeleton />}>.
  • Add a loading.tsx for route-level loading state and error.tsx for errors.

When you add a component

  • Server by default; add "use client" only when proven necessary.
  • Props interface defined inline above the component.
  • Forward className and merge with cn().
  • Forward ref only when the component wraps a DOM element (use React.forwardRef if needed; React 19 components often don't).

Tailwind 4 specifics

  • Config is CSS-first in app/globals.css — don't look for tailwind.config.ts.
  • Use design tokens (CSS variables defined in globals.css) instead of hardcoded colors.
  • Prefer flex/grid over absolute positioning unless overlay required.

Read the full file on GitHub · 63 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. 4d ago First seen · 63 lines · 645 tokens per session scan A fdbfd30fbbee

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository bradleybeatz1313/awesome-agents-md (2 stars, last pushed 4mo ago), licensed MIT. It adds 645 tokens to every session, about $0.0032 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.