Back to Skills

backend-dev-guidelines

You are a senior backend engineer operating production-grade services under strict architectural and reliability constraints. Use when routes, controllers, services, repositories, express middleware, or prisma database access.

44,845stars6,567forksUpdated 8/13/2026

Security Assessment

Safe(93/100)
Security Score93/100

About backend-dev-guidelines

Backend Dev Guidelines is an opinionated engineering-standards skill for building production Node.js, Express, TypeScript, and microservice backends. It frames Claude as a senior backend engineer working under strict architectural and reliability constraints, and its goal is predictable, observable, maintainable services. Rather than offering loose suggestions, it defines how backend code must be written: layered architecture, explicit error boundaries, strong typing and validation, centralized configuration, and first-class observability.

The skill leads with a Backend Feasibility & Risk Index (BFRI) — a scoring rubric across architectural fit, business-logic complexity, data risk, operational risk, and testability — used to decide whether to proceed, add tests and monitoring, refactor, or redesign before coding. Its core doctrine mandates a Routes to Controllers to Services to Repositories to Database flow with no layer skipping, routes that contain zero business logic, controllers that extend a shared BaseController for response and error handling, all errors routed to Sentry, a single unifiedConfig source instead of raw process.env access, and Zod validation of all external input. A set of resource files expands on routing and controllers, services and repositories, async and error handling, middleware, database patterns with Prisma, validation, configuration, testing, monitoring, architecture overview, and complete worked examples.

It is aimed at backend engineers and teams standardizing service code, and at Claude when working on routes, controllers, services, repositories, Express middleware, Prisma access, Zod validation, Sentry integration, or backend refactors and migrations. The frontmatter carries a 'risk: critical' tag from its source repo, but the content itself is conventional, defensive architectural guidance with example TypeScript code and no risky operations.

FAQ

What stack does this target?

Node.js, Express, and TypeScript microservices, with Prisma for database access, Zod for validation, unifiedConfig for centralized configuration, and Sentry for error tracking.

What is the BFRI?

The Backend Feasibility & Risk Index, a 1-5 scoring rubric across architectural fit, complexity, data risk, operational risk, and testability that yields a score from -10 to +10 to decide whether to proceed, add tests, refactor, or redesign before coding.

What are the non-negotiable architecture rules?

A strict Routes to Controllers to Services to Repositories to Database layering with no layer skipping, routes with zero business logic, controllers extending BaseController, all errors sent to Sentry, unifiedConfig as the only config source, and Zod validation of all external input.

Does the 'risk: critical' frontmatter mean it does something dangerous?

No. That label comes from the source repository's own metadata; the actual content is architectural best-practice guidance and example code with no destructive or unsafe operations.

Are there worked examples?

Yes. Resource files include complete controller, service-with-dependency-injection, route, and repository examples, plus a bad-to-good refactoring example and an end-to-end feature example.

All Files

12 files
resources/complete-examples.md16.0 KB
View
resources/testing-guide.md5.3 KB
View
resources/routing-and-controllers.md19.4 KB
View
resources/async-and-errors.md6.7 KB
View
resources/services-and-repositories.md21.7 KB
View
resources/middleware-guide.md5.0 KB
View
resources/architecture-overview.md11.2 KB
View
resources/sentry-and-monitoring.md7.5 KB
View
resources/configuration.md5.6 KB
View
resources/validation-patterns.md17.6 KB
View
resources/database-patterns.md4.8 KB
View
SKILL.md7.7 KB
View

Install backend-dev-guidelines

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill