Back to Langfuse

Backend Development Guidelines

.agents/skills/backend-dev-guidelines/SKILL.md

3.172.12.1 KB
Original Source

Backend Development Guidelines

Use this skill for backend and API work across web/, worker/, and packages/shared/.

When to Apply

  • Creating or modifying tRPC routers and procedures
  • Creating or modifying public API endpoints
  • Creating or modifying queue processors, producers, or queue-backed workflows
  • Building or refactoring backend services and repositories
  • Working on backend auth, middleware, validation, or observability
  • Updating Prisma or ClickHouse access patterns
  • Adding or fixing backend tests

How to Read This Skill

  • Start with AGENTS.md when the task spans multiple backend areas or you need the end-to-end checklists.
  • Read only the specific reference file that matches the work when the scope is narrower.

Reference Map

TopicRead this whenFile
Architecture and package boundariesYou need the web/worker/shared split, request flow, or queue lifecyclereferences/architecture-overview.md
Routing and controllersYou are writing tRPC procedures, public API routes, or queue entrypointsreferences/routing-and-controllers.md
Middleware and authYou are changing request auth, permissions, or middleware compositionreferences/middleware-guide.md
Services and repositoriesYou are placing business logic, repository code, or DI patternsreferences/services-and-repositories.md
Database accessYou are touching Prisma, ClickHouse, tenant filters, or query patternsreferences/database-patterns.md
ConfigurationYou are adding env vars, startup config, or runtime togglesreferences/configuration.md
TestingYou are adding or updating backend testsreferences/testing-guide.md

Full Compiled Guide

Read AGENTS.md for the complete backend guide with checklists, directory conventions, imports, architecture, and cross-cutting practices.