Comprehensive backend development guide for Langfuse's Next.js 14/tRPC/Express/TypeScript monorepo.
SkillScore96Maintained
Automatic
◆Coding pack
Last verified 8/20/2026
What it changes
Passed 24 of 25 test cases with the skill, and 7 of 25 without it.
Without skill28%
With skill96%
Checks it passed that the model alone missed
Imports zod from zod/v4 module path.
Wraps the route using withMiddlewares.
Imports env object from @/src/env.mjs.
and 21 more in the full report
17 fixed7 passed either way1 still failing0 broke
Pass-rate lift
+68 pp
Tokens
+183%
Agent turns
0%
Response time
-50%
Model gemini-3.6-flashMeasured 8/20/2026v124 of 25 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 17 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 17
Prompt
We need to invoke createAndAddApiKeysToDb in a backend project initialization route. Which specific import subpath from @langfuse/shared should be used?
What was checked, without and with the skill
Checked
Without skill
With skill
Imports from @langfuse/shared/src/server/auth/apiKeys.
Missed
Passed
case-13 · gemini-3.6-flash · 8/20/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md558 linessingle file
Backend Development Guidelines
Purpose
Establish consistency and best practices across Langfuse's backend packages (web, worker, packages/shared) using Next.js 14, tRPC, BullMQ, and TypeScript patterns.
When to Use This Skill
Automatically activates when working on:
Creating or modifying tRPC routers and procedures
Creating or modifying public API endpoints (REST)
Creating or modifying BullMQ queue consumers and producers
Building services with business logic
Authenticating API requests
Accessing resources based on entitlements
Implementing middleware (tRPC, NextAuth, public API)
Database operations with Prisma (PostgreSQL) or ClickHouse
Observability with OpenTelemetry, DataDog, logger, and traceException
Input validation with Zod v4
Environment configuration from env variables
Backend testing and refactoring
Quick Start
UI: New tRPC Feature Checklist (Web)
Router: Define in features/[feature]/server/*Router.ts
Procedures: Use appropriate procedure type (protected, public)
Authentication: Use JWT authorization via middlewares.
Entitlement check: Access resources based on resource and role
Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.