PatrickJS/awesome-cursorrules is a collection of Markdown rule files that give Cursor AI editor project-specific instructions about code, frameworks, workflows, and standards. Developers use it to find reusable guidance for shaping Cursor’s behavior in different kinds of software projects.
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/patrickjs/awesome-cursorrules/react-tanstack-router-querygit clone --depth 1 https://github.com/PatrickJS/awesome-cursorrulesWrote 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/patrickjs/awesome-cursorrules/react-tanstack-router-query)<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/react-tanstack-router-query"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/react-tanstack-router-query.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.00000 | $0.00924 |
| Opus 5 | $0.00000 | $0.00462 |
| Sonnet 5 | $0.00000 | $0.00185 |
| Haiku 4.5 | $0.00000 | $0.00092 |
Grade A, and why
react-tanstack-router-query 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 3d 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 — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert in React, TanStack Router v1, TanStack Query v5, TypeScript, and Vite.
Architecture
- TanStack Router: routing, URL state, navigation
- TanStack Query: server state, caching, mutations
- Loader = bridge: prefetches into Query cache before render → zero loading spinners for route data
- Components are pure UI: read from Query cache, trigger mutations
Setup
// src/lib/queryClient.ts
export const queryClient = new QueryClient({
defaultOptions: { queries: { staleTime: 60_000 } },
})
// src/lib/router.ts
export const router = createRouter({
routeTree,
context: { queryClient },
defaultPreload: 'intent',
defaultPreloadStaleTime: 0,
})
declare module '@tanstack/react-router' {
interface Register { router: typeof router }
}
// src/main.tsx
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} context={{ queryClient }} />
</QueryClientProvider>
Query Definitions
// src/queries/posts.ts
export const postKeys = {
all: ['posts'] as const,
detail: (id: string) => [...postKeys.all, 'detail', id] as const,
list: (f?: PostFilters) => [...postKeys.all, 'list', f] as const,
}
export const postQueryOptions = (id: string) =>
queryOptions({ queryKey: postKeys.detail(id), queryFn: () => fetchPost(id) })
export const postsQueryOptions = (filters?: PostFilters) =>
queryOptions({ queryKey: postKeys.list(filters), queryFn: () => fetchPosts(filters) })
Loader + Component (zero loading state)
export const Route = createFileRoute('/posts/$postId')({
loader: ({ context: { queryClient }, params }) =>
queryClient.ensureQueryData(postQueryOptions(params.postId)),
component: PostDetail,
})
function PostDetail() {
const { postId } = Route.useParams()
const { data: post } = useQuery(postQueryOptions(postId)) // always in cache from loader
return <h1>{post!.title}</h1>
}
Search Params → Query Key
const searchSchema = z.object({ page: z.number().default(1), q: z.string().optional() })
export const Route = createFileRoute('/posts/')({
validateSearch: searchSchema,
loader: ({ context: { queryClient }, location: { search } }) =>
queryClient.ensureQueryData(postsQueryOptions(search)),
component: PostsList,
})
function PostsList() {
const search = Route.useSearch()
const { data } = useQuery(postsQueryOptions(search))
// ...
}
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.
- 3d ago First seen · 117 lines · 0 tokens per session scan A 4e97e220b6d6
react-tanstack-router-query is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,732 stars, last pushed 3mo ago), licensed CC0-1.0. It costs nothing until one of its globs matches a file; then it loads 924 tokens. 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
react
React and Next.js component conventions.
testing
Testing conventions for Vitest and React Testing Library -- the agent pulls this in when writing or modifying tests.
react
React: hooks, composition, performance patterns.
t3-stack
T3 Stack: tRPC + Prisma + NextAuth integration patterns.
tanstack-query
TanStack Query / React Query: query keys, mutations, caching, optimistic updates.
vercel-ai-sdk
Vercel AI SDK: streaming AI responses, tool calling, structured output.