Backend Dev Guidelines
langfuse/langfuse
Build or review Langfuse backend code. An agent skill from langfuse/langfuse.
Build end-to-end type-safe tRPC APIs inside NestJS using the nestjs-trpc adapter — @Router/@Query/@Mutation/@Subscription decorators, TRPCModule.forRoot, injectable middlewares and context, Zod…
$ npx skills add trycompai/crm --skill nestjs-trpc -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install trycompai/crm nestjs-trpc --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/trycompai/crm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/nestjs-trpc .claude/skills/nestjs-trpc && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "nestjs-trpc" agent skill from https://github.com/trycompai/crm/tree/release/.agents/skills/nestjs-trpc into .claude/skills/nestjs-trpc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nestjs-trpc", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/trycompai/crm/tree/release/.agents/skills/nestjs-trpcType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add trycompai/crm --skill nestjs-trpc -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install trycompai/crm nestjs-trpc --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/trycompai/crm.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/nestjs-trpc .agents/skills/nestjs-trpc && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "nestjs-trpc" agent skill from https://github.com/trycompai/crm/tree/release/.agents/skills/nestjs-trpc into .agents/skills/nestjs-trpc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nestjs-trpc", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add trycompai/crm --skill nestjs-trpc -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install trycompai/crm nestjs-trpc --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/trycompai/crm.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/nestjs-trpc .cursor/skills/nestjs-trpc && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "nestjs-trpc" agent skill from https://github.com/trycompai/crm/tree/release/.agents/skills/nestjs-trpc into .cursor/skills/nestjs-trpc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nestjs-trpc", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/trycompai/crm.git --path .agents/skills/nestjs-trpc--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add trycompai/crm --skill nestjs-trpc -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install trycompai/crm nestjs-trpc --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/trycompai/crm.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/nestjs-trpc .gemini/skills/nestjs-trpc && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "nestjs-trpc" agent skill from https://github.com/trycompai/crm/tree/release/.agents/skills/nestjs-trpc into .gemini/skills/nestjs-trpc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nestjs-trpc", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install trycompai/crm nestjs-trpcInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add trycompai/crm --skill nestjs-trpc -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/trycompai/crm.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/nestjs-trpc .github/skills/nestjs-trpc && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "nestjs-trpc" agent skill from https://github.com/trycompai/crm/tree/release/.agents/skills/nestjs-trpc into .github/skills/nestjs-trpc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nestjs-trpc", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add trycompai/crm --skill nestjs-trpc -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install trycompai/crm nestjs-trpc --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/trycompai/crm.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/nestjs-trpc .opencode/skills/nestjs-trpc && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "nestjs-trpc" agent skill from https://github.com/trycompai/crm/tree/release/.agents/skills/nestjs-trpc into .opencode/skills/nestjs-trpc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nestjs-trpc", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
nestjs-trpcBuild end-to-end type-safe tRPC APIs inside NestJS using the nestjs-trpc adapter — @Router/@Query/@Mutation/@Subscription decorators, TRPCModule.forRoot, injectable middlewares and context, Zod…
Nestjs Trpc is an agent skill from trycompai/crm. Build end-to-end type-safe tRPC APIs inside NestJS using the nestjs-trpc adapter — @Router/@Query/@Mutation/@Subscription decorators, TRPCModule.forRoot, injectable middlewares and context, Zod input/output schemas, and the Rust CLI that generates the AppRouter type for clients. Use this skill whenever the user mentions nestjs-trpc, tRPC in a NestJS app, @Router or @Query decorators, TRPCModule, AppRouterHost, "typed API between my Nest backend and frontend", generating AppRouter types, or is migrating a NestJS…
Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/api-reference.md`, `references/codegen-and-client.md` and `references/middlewares-and-context.md`).
It sits in Backend & APIs, covering gRPC and Protobuf and Forms and validation. It works with tRPC, NestJS, Rust and Zod. The repository describes itself as: Comp AI CRM is an open source, CRM designed for AI agents. Agentic-first CRM. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 6d4793d. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npxnpmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npx and npm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Nestjs Trpc loads about 2.8k tokens when it runs, and up to ~16k if it reads all its reference files. Until then it costs about 151 tokens; SKILL.md has 1,011 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from trycompai/crm at commit 6d4793d, republished under its MIT licence (© trycompai). 1,011 words, ~2,836 tokens.
.claude/skills/nestjs-trpc/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.nestjs-trpc lets you define tRPC procedures as decorated NestJS classes instead of
chaining t.procedure builders. Routers are DI-aware classes that look like controllers;
a separate CLI reads those decorators and emits an AppRouter type for the client.
Verified against v2.13.0. The published docs at nestjs-trpc.io still contain v1-era
examples in several places. Where this skill and the docs disagree, this skill matches the
shipped .d.ts files and the official examples/ in the repo — see
Docs errata for the specific traps.
There are two separate systems that both need to be correct, and they fail independently:
| Runtime | Type generation | |
|---|---|---|
| Driven by | Nest DI container at boot | Rust CLI doing static analysis of your source |
| Needs | classes listed in providers | decorators it can read literally |
| Fails as | 404 / "no procedures" / undefined injection | stale or missing AppRouter |
A router that works at runtime but was never picked up by the CLI produces a client with no types, and vice versa. When something is wrong, first ask which of the two is broken.
npm install nestjs-trpc zod @trpc/serverPeer deps (v2.13.0): @nestjs/common & @nestjs/core ^9.3.8 || ^10 || ^11,
@trpc/server ^11, zod ^3.14 || ^4, rxjs 7.8.1, reflect-metadata ^0.1.13 || ^0.2.
tRPC v11 is required — v10 will not work.
Standard NestJS tsconfig.json requirements apply: experimentalDecorators: true,
emitDecoratorMetadata: true. tsc must be resolvable, because the CLI shells out to it
to typecheck what it generates.
// app.module.ts
import { Module } from '@nestjs/common';
import { TRPCModule } from 'nestjs-trpc';
import { UserRouter } from './user.router';
import { UserService } from './user.service';
import { ProtectedMiddleware } from './protected.middleware';
import { AppContext } from './app.context';
@Module({
imports: [
TRPCModule.forRoot({
context: AppContext,
}),
],
providers: [UserRouter, AppContext, UserService, ProtectedMiddleware],
})
export class AppModule {}Routers, middlewares, and the context class are all ordinary providers. Listing them in
providers is what makes DI work — forgetting a router here is the single most common
reason procedures silently don't exist at runtime.
Default mount point is /trpc; override with basePath. Full option table in
references/module-config.md.
// user.router.ts
import { Inject } from '@nestjs/common';
import { Router, Query, Mutation, UseMiddlewares, Input, Ctx } from 'nestjs-trpc';
import { TRPCError } from '@trpc/server';
import { z } from 'zod';
import { UserService } from './user.service';
import { ProtectedMiddleware } from './protected.middleware';
import { userSchema, type User } from './user.schema';
@Router({ alias: 'users' })
export class UserRouter {
constructor(@Inject(UserService) private readonly userService: UserService) {}
@Query({
input: z.object({ userId: z.string() }),
output: userSchema,
})
@UseMiddlewares(ProtectedMiddleware)
async getUserById(@Input('userId') userId: string): Promise<User> {
const user = await this.userService.getUser(userId);
if (user == null) {
throw new TRPCError({ message: 'Could not find user.', code: 'NOT_FOUND' });
}
return user;
}
}Client call site: trpc.users.getUserById.query({ userId }). The alias sets that first
segment — without it the class name is used.
npx nestjs-trpc generate # one-shot
npx nestjs-trpc watch # regenerate on change during developmentWrites server.ts (containing export type AppRouter = typeof appRouter) to
./src/@generated by default; --output <dir> moves it. This is a build step, not a
runtime import — the generated file is types only, and your procedures still execute
through the Nest-managed router at runtime.
Add it to your scripts so it can't drift:
{
"scripts": {
"dev": "nestjs-trpc watch & nest start --watch",
"build": "nestjs-trpc generate && nest build"
}
}Run nestjs-trpc generate --dry-run in CI to fail the build when the committed types are
stale.
Three procedure decorators, all taking { input?, output?, meta? }, all optional:
| Decorator | tRPC equivalent |
|---|---|
@Query() | publicProcedure.query() |
@Mutation() | publicProcedure.mutation() |
@Subscription() | publicProcedure.subscription() |
input validates and types the incoming payload. output is optional — omit it and the
return type is inferred from the method signature (since v2.11.0). Prefer an explicit
output on anything crossing a trust boundary, because it strips fields the client
shouldn't see; a leaked password column is the classic version of this bug. Note the
example schema above deliberately keeps password in userSchema only to mirror the
upstream docs — in real code, define a separate public-facing schema.
Any Standard Schema validator works (Zod, Valibot, ArkType, Yup, Superstruct), but the CLI's schema flattening is built around Zod — stay on Zod unless you have a reason not to.
Parameter decorators pull pieces out of the tRPC opts object:
| Decorator | Yields |
|---|---|
@Input(key?) | opts.input, or opts.input[key] |
@Ctx() | opts.ctx |
@Options() | the whole opts (typed as ProcedureOptions) |
@RawInput() | opts.rawInput (pre-validation) |
@Type() | 'query' | 'mutation' | 'subscription' |
@Path() | the procedure path string |
Throw TRPCError from @trpc/server for client-visible failures. Nest's HttpException
is not translated into a tRPC error shape, so it surfaces as an opaque 500.
Details, subscription patterns, and router merging: references/routers.md.
Middlewares are @Injectable() classes implementing TRPCMiddleware, applied with
@UseMiddlewares(...) on a class (all procedures) or a method (that one only), or globally
via globalMiddlewares. Execution order is global → router → procedure → handler.
@Injectable()
export class ProtectedMiddleware implements TRPCMiddleware {
constructor(@Inject(UserService) private readonly userService: UserService) {}
async use(opts: MiddlewareOptions<object>): Promise<MiddlewareResponse> {
const result = await opts.next({ ctx: { user: await this.userService.current() } });
return result;
}
}Two rules that cause most middleware bugs: always return the result of next() so the
chain isn't swallowed, and pass added context through next({ ctx }) rather than mutating
opts.ctx in place.
Context is a class implementing TRPCContext with a create(opts) method, registered in
providers and passed to forRoot({ context }). It runs once per request and is the right
home for the request object, session, and per-request loaders.
Full treatment including typing context across a middleware chain and procedure meta:
references/middlewares-and-context.md.
Mirrors NestJS conventions, which is the whole point of the adapter:
src
├── app.module.ts
├── app.context.ts
├── main.ts
├── @generated/ # CLI output — gitignore or commit, but be consistent
└── user/
├── user.router.ts # the "controller" — thin, no business logic
├── user.service.ts # business logic, unit-testable without tRPC
├── user.schema.ts # Zod schemas + inferred types, shared by both
└── protected.middleware.tsKeep routers thin. A router method that only validates, delegates to a service, and maps errors stays testable and keeps the CLI's job easy.
The official docs mix v1 and v2 content. These are the ones that will actually break your build:
@Ctx(), not @Context(). The routers and middlewares pages show @Context(); the
exported decorator is Ctx. (Context as an identifier does exist in the docs' prose as
a type name, which is where the confusion comes from.)MiddlewareOptions, not TRPCMiddlewareOptions. The latter is not exported.TRPCMiddleware<TMeta> — the single generic is the meta type, not the context type.
The docs' implements TRPCMiddleware<Context> is wrong. Context types are supplied via
MiddlewareOptions<TContext, TReturnContext, TMeta> on the use() signature.autoSchemaFile and schemaFileImports are v1 options. They are absent from the v2
TRPCModuleOptions type and will be TypeScript errors, even though the context, client,
and integrations pages still show autoSchemaFile. Control output with the CLI's
--output flag instead.nestjs-trpc/types is a v1 import path. v1's ts-morph generator wrote helper types
(Context, {Middleware}Context) into the package; v2's Rust CLI emits a single
server.ts instead. Don't import from nestjs-trpc/types on v2 — declare your context
types yourself.@Middlewares() is deprecated in favour of @UseMiddlewares(), to match @UseGuards.constructror) and a missing
async. Don't copy it verbatim.Read these when the task goes past the basics:
AbortSignal cleanup, alias merging, error handling,
testing routers.MiddlewareOptions generics, context propagation and typing, meta-driven authorization,
global middleware ordering.forRoot option,
SSE and JSONL keep-alive settings, onError handlers, custom loggers, transformers.--import-extension, schema-flattening failures, consuming AppRouter from React /
Next.js / vanilla clients, AppRouterHost for e2e tests and trpc-ui..d.ts. Check here before guessing a name.© trycompai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in .agents/skills/nestjs-trpc of trycompai/crm.
Open the folder on GitHubat commit 6d4793d
Nestjs Trpc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Nestjs Trpc this skilltrycompai/crm | 11k | — | ~2.8k | Automated safety check: Pass | MIT | |
| Backend Dev Guidelineslangfuse/langfuse | 35k | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| Backend Dev Guidelineslitefuse/litefuse | 100 | 1 repos | ~5.8k | Automated safety check: Pass | Custom licence | |
| Trpcpproenca/dot-skills | 214 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Dev Rulesrust-dd/tako | 162 | — | ~810 | Automated safety check: Pass | MIT | |
| SpikardGoldziher/spikard | 123 | — | ~799 | Automated safety check: Pass | MIT |
langfuse/langfuse
Build or review Langfuse backend code. An agent skill from langfuse/langfuse.
litefuse/litefuse
Comprehensive backend development guide for Litefuse's Next.js 14/tRPC/Express/TypeScript monorepo.
pproenca/dot-skills
Corrects the wrong defaults a model has for tRPC v11 (verified against 11.18.0).
rust-dd/tako
General coding-style rules to apply to every project. An agent skill from rust-dd/tako.
Goldziher/spikard
Scaffold Spikard projects and generate code from OpenAPI, AsyncAPI, OpenRPC, GraphQL, and Protobuf schemas using the Spikard CLI or its MCP server.
rust-dd/tako
Conventions for writing and maintaining tako documentation pages under website/content/docs/.
trycompai/crm
Install and configure the anti-slop Oxlint plugin in a local TypeScript or JavaScript repository.
trycompai/crm
nuqs (type-safe URL query state) best practices for Next.js and other React frameworks.
trycompai/crm
Accessibility engineering for product interfaces, from focus states and keyboard support to ARIA, forms, and screen readers.
trycompai/crm
OKLCH color space and color usage for web projects. An agent skill from trycompai/crm.
trycompai/crm
Web typography from choosing fonts to spacing, wrapping and accessibility.
trycompai/crm
Design engineering principles for making interfaces feel polished.
Categories
Build end-to-end type-safe tRPC APIs inside NestJS using the nestjs-trpc adapter — @Router/@Query/@Mutation/@Subscription decorators, TRPCModule.forRoot, injectable middlewares and context, Zod…. Nestjs Trpc is an agent skill from trycompai/crm.forRoot, injectable middlewares and context, Zod input/output schemas, and the Rust CLI that generates the AppRouter type for clients.
Nestjs Trpc fits situations like: the user mentions nestjs-trpc; TRPC in a NestJS app; @Query decorators; typed API between my Nest backend and frontend.
Run `npx skills add trycompai/crm --skill nestjs-trpc -a claude-code`. Or copy the skill folder (.agents/skills/nestjs-trpc in trycompai/crm) into .claude/skills/nestjs-trpc in your project. Claude Code loads it when a task matches its description.
Run `npx skills add trycompai/crm --skill nestjs-trpc -a codex`. Or copy the skill folder (.agents/skills/nestjs-trpc in trycompai/crm) into .agents/skills/nestjs-trpc in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trycompai/crm --skill nestjs-trpc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nestjs-trpc, .gemini/skills/nestjs-trpc, .github/skills/nestjs-trpc and .opencode/skills/nestjs-trpc in your project.
Going by SKILL.md and its folder, Nestjs Trpc needs the command-line tools its instructions call (npx and npm). Our summary lists: Node.js.
SKILL.md contains no URLs. Its commands use npx and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Nestjs Trpc is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Nestjs Trpc: Backend Dev Guidelines (langfuse/langfuse, 35k stars), Backend Dev Guidelines (litefuse/litefuse, 100 stars), Trpc (pproenca/dot-skills, 214 stars) and Dev Rules (rust-dd/tako, 162 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
trycompai (a GitHub organization) maintains it in trycompai/crm, which has 11,109 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 11, 2026.
Source: trycompai/crm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.