AI SummaryHeuristic scoring (no AI key configured).
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "- — Cursor Rules" prompt rules to my project. Repository: https://github.com/lellelel-source/- Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Cursor Rules for -
Overview
tRPC enables end-to-end typesafe APIs, allowing you to build and consume APIs without schemas, code generation, or runtime errors. These rules will help you follow best practices for tRPC v11.
Project Structure
For a clean tRPC setup, follow this recommended structure: ` . ├── src │ ├── pages │ │ ├── _app.tsx # add createTRPCNext setup here │ │ ├── api │ │ │ └── trpc │ │ │ └── [trpc].ts # tRPC HTTP handler │ │ ├── server │ │ │ ├── routers │ │ │ │ ├── _app.ts # main app router │ │ │ │ ├── [feature].ts # feature-specific routers │ │ │ │ └── [...] │ │ │ ├── context.ts # create app context │ │ │ └── trpc.ts # procedure helpers │ │ └── utils │ │ └── trpc.ts # typesafe tRPC hooks `
Initialize tRPC Backend
`typescript // server/trpc.ts import { initTRPC } from '@trpc/server'; // Initialize tRPC backend (should be done once per backend) const t = initTRPC.create(); // Export reusable router and procedure helpers export const router = t.router; export const publicProcedure = t.procedure; `
Create Router
`typescript // server/routers/_app.ts import { z } from 'zod'; import { router, publicProcedure } from '../trpc'; export const appRouter = router({ // Your procedures here greeting: publicProcedure .input(z.object({ name: z.string() })) .query(({ input }) => { return Hello ${input.name}; }), }); // Export type definition of API (not the router itself!) export type AppRouter = typeof appRouter; `
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts