library/specializations/web-development/skills/trpc/SKILL.md
tRPC end-to-end type safety, procedures, routers, middleware, and React integration.
npx skillsauth add a5c-ai/babysitter trpcInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expert assistance for building type-safe APIs with tRPC.
Invoke this skill when you need to:
// 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;
}),
create: protectedProcedure
.input(z.object({
name: z.string().min(1),
email: z.string().email(),
}))
.mutation(async ({ ctx, input }) => {
return ctx.prisma.user.create({ data: input });
}),
});
// In component
const { data, isLoading } = trpc.user.list.useQuery({ page: 1 });
const createUser = trpc.user.create.useMutation();
<button onClick={() => createUser.mutate({ name, email })}>
Create
</button>
development
Model documentation skill for generating model cards following Google's model card framework.
development
MLflow integration skill for experiment tracking, model registry, and artifact management. Enables LLMs to log experiments, compare runs, manage model lifecycle, and retrieve artifacts through the MLflow API.
data-ai
LIME-based local explanation skill for individual predictions across tabular, text, and image data.
devops
Kubeflow Pipelines skill for ML workflow orchestration, component management, and Kubernetes-native ML.