trpc

Solid

tRPC end-to-end type safety, procedures, routers, middleware, and React integration.

AI & Automation 1,160 stars 71 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# tRPC Skill Expert assistance for building type-safe APIs with tRPC. ## Capabilities - Create type-safe procedures and routers - Implement middleware for auth/validation - Set up tRPC with Next.js/React - Handle subscriptions - Configure error handling - Build type-safe client hooks ## Usage Invoke this skill when you need to: - Build end-to-end type-safe APIs - Integrate with React/Next.js - Replace REST with type-safe RPC - Implement real-time features ## Patterns ### Router Definition ```typescript // server/trpc/routers/user.ts import { z } from 'zod'; import { router, publicProcedure, protectedProcedure } from '../trpc'; import { TRPCError } from '@trpc/server'; export const userRouter = router({ list: protectedProcedure .input(z.object({ page: z.number().min(1).default(1), limit: z.number().min(1).max(100).default(10), search: z.string().optional(), })) .query(async ({ ctx, input }) => { const users = await ctx.prisma.user.findMany({ where: input.search ? { name: { contains: input.search } } : undefined, skip: (input.page - 1) * input.limit, take: input.limit, }); return users; }), byId: protectedProcedure .input(z.string()) .query(async ({ ctx, input }) => { const user = await ctx.prisma.user.findUnique({ where: { id: input }, }); if (!user) { throw new TRPCError({ code: 'NOT_FOUND' }); } return user; }...

Details

Author
a5c-ai
Repository
a5c-ai/babysitter
Created
4 months ago
Last Updated
today
Language
JavaScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

trpc-fullstack

Build end-to-end type-safe APIs with tRPC — routers, procedures, middleware, subscriptions, and Next.js/React integration patterns.

39,350 Updated today
sickn33
API & Backend Listed

trpc-scaffolder

Scaffolds tRPC routers, procedures, and Zod schemas with full type safety following DevPrep AI patterns

335 Updated today
aiskillstore
API & Backend Listed

trpc-security

Security audit for tRPC applications covering procedure auth via middleware, input validation with Zod, protectedProcedure vs publicProcedure patterns, router composition, context creation, batching abuse, output sanitization, and tRPC-specific patterns across Next.js, Express, Fastify, and standalone adapters. Use this skill whenever the user mentions tRPC, @trpc/server, @trpc/client, @trpc/react-query, createTRPCRouter, protectedProcedure, publicProcedure, t.procedure, ctx, or asks "audit my tRPC app", "tRPC security", "tRPC middleware safe". Trigger when the codebase contains `@trpc/server` or `@trpc/client` in package.json.

1 Updated 1 weeks ago
hlsitechio
AI & Automation Listed

rpc-typesafe

This skill activates when setting up Hono RPC client, configuring type-safe API calls, or discussing client-server type sharing. It provides patterns for the hc client, type inference, and React Query integration.

3 Updated 1 weeks ago
smicolon
API & Backend Listed

glapi-backend-guidelines

GLAPI backend development guide for Next.js + TRPC + Drizzle ORM + PostgreSQL + Clerk. TRPC for internal type-safety, REST API exposure via OpenAPI. Covers layered architecture (routers → services → Drizzle), dual TRPC/REST endpoints, Clerk authentication, and testing strategies.

0 Updated 6 days ago
adteco