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/maccman/ai-monorepo-scaffoldWrote 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/maccman/ai-monorepo-scaffold/trpc)<a href="https://agentmods.dev/rules/maccman/ai-monorepo-scaffold/trpc"><img src="https://agentmods.dev/badge/rules/maccman/ai-monorepo-scaffold/trpc/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/maccman/ai-monorepo-scaffold/trpc"><img src="https://agentmods.dev/badge/rules/maccman/ai-monorepo-scaffold/trpc.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.00011 | $0.00878 |
| Opus 5.5 | $0.00004 | $0.00351 |
| Sonnet 5.5 | $0.00002 | $0.00176 |
| Haiku 4.5 | $0.00001 | $0.00088 |
Grade A, and why
trpc 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 1mo 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.
What it actually says
The project integrates tRPC with @tanstack/react-query by consistently using helper methods provided by the tRPC client. This approach standardizes how queries and mutations are defined and how their respective React Query keys are generated.
Key characteristics of tRPC usage in this codebase:
-
Client Initialization:
- The tRPC client is obtained within custom React hooks using
const trpc = useTRPC(). ThisuseTRPChook is typically imported from a central client setup file (e.g.,@/client/trpc).
- The tRPC client is obtained within custom React hooks using
-
Using
queryOptionsfor Queries:- When setting up queries with
useQueryfrom@tanstack/react-query, instead of manually defining query keys and fetcher functions, the code leverages aqueryOptionshelper method available on each tRPC query procedure. - This method takes the query input as its first argument and an optional object for tRPC/React Query options (like
enabled) as its second argument. - Example:
// In use-conversation-messages.ts const messagesQuery = useQuery( trpc.message.list.queryOptions( conversationId ? { conversationId } : skipToken, { enabled: queryEnabled }, ), ); // In use-tenant.ts const { data: tenant } = useQuery(trpc.tenant.getTenant.queryOptions());
- When setting up queries with
-
Using
mutationOptionsfor Mutations:- Similarly, for mutations with
useMutationfrom@tanstack/react-query, amutationOptionshelper method is used. This method is available on each tRPC mutation procedure. - It can be called without arguments or with an object containing tRPC-specific options. The result is then spread into the
useMutationhook's options, often alongside React Query mutation callbacks likeonMutate,onSuccess,onError, andonSettled. - Example:
// In use-chat-assets.ts const createPresignedUrlMutation = useMutation( trpc.asset.generatePresignedUrl.mutationOptions(), ); // In use-conversation-delete.ts const mutation = useMutation({ ...trpc.conversation.delete.mutationOptions(), onMutate: async (variables) => { /* ... */ }, onSuccess: () => { /* ... */ }, // ... other callbacks });
- Similarly, for mutations with
-
Generating Query Keys with
queryKey:- For operations that require direct interaction with the React Query cache (e.g., invalidating queries, setting query data optimistically), a
queryKeyhelper method is used. This method is available on tRPC query procedures and takes the query input as an argument. - Example:
// In use-conversation-messages.ts queryClient.invalidateQueries({ queryKey: trpc.conversation.list.queryKey({}), }); queryClient.setQueryData( trpc.message.list.queryKey({ conversationId: message.conversationId }), // ... updater function );
- For operations that require direct interaction with the React Query cache (e.g., invalidating queries, setting query data optimistically), a
-
Procedure Path:
- tRPC procedures are accessed via a path on the initialized
trpcclient object, typically structured astrpc.namespace.procedureName(e.g.,trpc.message.list,trpc.asset.generatePresignedUrl).
- tRPC procedures are accessed via a path on the initialized
-
Integration with
useQueryClient:- The
useQueryClienthook from@tanstack/react-queryis frequently used for cache manipulation tasks like invalidating data, performing optimistic updates, and cancelling outgoing requests, especially within mutation lifecycle callbacks.
- The
This consistent use of queryOptions, mutationOptions, and queryKey helper methods streamlines the integration with @tanstack/react-query, ensuring that query keys are generated correctly and that options are passed in a standardized way. It abstracts away some of the manual setup that might be seen in other tRPC and React Query integrations.
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.
- 1mo ago First seen · 71 lines · 11 tokens per session scan A b9be78f539f7
trpc is a cursor rule published in the GitHub repository maccman/ai-monorepo-scaffold (307 stars, last pushed 12mo ago), licensed MIT. It adds 11 tokens to every session and 878 once invoked, about $0.0000 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.
Other cursor rules, from other repositories
django-python
Rules for writing Python services at PostHog (Python servers powered by the Django framework).
graphql-apollo-client-usage
A usage guide for fetching, changing, and subscribing to GraphQL data with Apollo Client in React. It covers loading and error states, cache updates, refetching, and reusable GraphQL fragments.
react-query-cursorrules-prompt-file
Cursor rules for React development with React Query integration.
services
Service layer architecture, API patterns, and data management with TanStack Query.
backend
Backend development rules for TT Studio - AI model management backend.
backend-architecture
The backend is built on Supabase, providing PostgreSQL database, authentication, and Edge Functions for serverless API endpoints.