Agent skill

Node Backend Development Guidelines

by diet103 in diet103/claude-code-infrastructure-showcase

Sets layered architecture and coding rules for Node.js, Express and TypeScript microservices, covering routes, controllers, services, repositories, Prisma, Sentry and Zod.

MITAuto-check passedBackend & APIs

Install Node Backend Development Guidelines

skills CLI
$ npx skills add diet103/claude-code-infrastructure-showcase --skill backend-dev-guidelines -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install diet103/claude-code-infrastructure-showcase backend-dev-guidelines --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/diet103/claude-code-infrastructure-showcase.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/backend-dev-guidelines .claude/skills/backend-dev-guidelines && rm -rf skills-src

Use ~/.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/

Facts

Skill name
backend-dev-guidelines
GitHub stars
10k
Used in
2 other repos
Token cost
~2k tokens
SKILL.md length
425 words
Files
12
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Sets layered architecture and coding rules for Node.js, Express and TypeScript microservices, covering routes, controllers, services, repositories, Prisma, Sentry and Zod.

  • Works in 7 steps: Routes Only Route, Controllers Control → All Controllers Extend BaseController → All Errors to Sentry → …
  • Creating a new route, controller and service in an Express API
  • SKILL.md covers Purpose, When to Use This Skill, Quick Start and Architecture Overview, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Backend services follow a layered design in which routes only route, controllers extend a BaseController, services hold business logic with dependency injection, and repositories handle database access when queries are complex. Each layer has one responsibility, and the guide includes a directory structure and naming conventions for controllers, services, routes and repositories.

Checklists cover a new backend feature, meaning route, controller, service, repository, Zod validation, Sentry error tracking, tests and unifiedConfig, and a new microservice, meaning directory layout, a Sentry instrument file, config, BaseController, middleware stack, error boundary and test framework. Seven core principles are listed, with example code contrasting what to avoid.

The stack is Node.js, Express and TypeScript with Prisma and Sentry, and other stacks are told to adapt the principles. Twelve resource notes go deeper on architecture, async and errors, configuration, database patterns, middleware, routing, Sentry monitoring, services and repositories, testing, validation and complete examples.

When your agent uses it

  • Creating a new route, controller and service in an Express API
  • Adding Zod validation and Sentry error tracking to an endpoint
  • Setting up the structure of a new microservice
  • Refactoring a legacy route that holds business logic

Example prompts

  • “Add a POST endpoint for invoices with a controller, service and Zod schema.”
  • “Refactor this route handler so the business logic moves into a service and repository.”
  • “Scaffold a new notifications microservice using our layered structure.”

Requirements

  • A Node.js, Express and TypeScript service, ideally with Prisma and Sentry

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Routes Only Route, Controllers Control
  2. All Controllers Extend BaseController
  3. All Errors to Sentry
  4. Use unifiedConfig, NEVER process.env
  5. Validate All Input with Zod
  6. Use Repository Pattern for Data Access
  7. Comprehensive Testing Required

What it can do on your machine

Read from SKILL.md and the folder at commit 07f75ce. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Node Backend Development Guidelines loads about 2k tokens when it runs. Until then it costs about 133 tokens; SKILL.md has 425 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~133
When it runs · the whole SKILL.md, loaded when a task matches
~2k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from diet103/claude-code-infrastructure-showcase at commit 07f75ce, republished under its MIT licence (© diet103). 425 words, ~2,037 tokens.

Download SKILL.mdSave it as .claude/skills/backend-dev-guidelines/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
backend-dev-guidelines
description
Comprehensive backend development guide for Node.js/Express/TypeScript microservices. Use when creating routes, controllers, services, repositories, middleware, or working with Express APIs, Prisma database access, Sentry error tracking, Zod validation, unifiedConfig, dependency injection, or async patterns. Covers layered architecture (routes → controllers → services → repositories), BaseController pattern, error handling, performance monitoring, testing strategies, and migration from legacy patterns.

Backend Development Guidelines

Purpose

Establish consistency and best practices across backend services using modern Node.js/Express/TypeScript patterns.

Written for Node.js/Express/TypeScript with Prisma and Sentry. Different stack? Adapt the architectural principles - see CLAUDE_INTEGRATION_GUIDE.md in the repo root.

When to Use This Skill

Automatically activates when working on:

  • Creating or modifying routes, endpoints, APIs
  • Building controllers, services, repositories
  • Implementing middleware (auth, validation, error handling)
  • Database operations with Prisma
  • Error tracking with Sentry
  • Input validation with Zod
  • Configuration management
  • Backend testing and refactoring

Quick Start

New Backend Feature Checklist
  • Route: Clean definition, delegate to controller
  • Controller: Extend BaseController
  • Service: Business logic with DI
  • Repository: Database access (if complex)
  • Validation: Zod schema
  • Sentry: Error tracking
  • Tests: Unit + integration tests
  • Config: Use unifiedConfig
New Microservice Checklist
  • Directory structure (see architecture-overview.md)
  • instrument.ts for Sentry
  • unifiedConfig setup
  • BaseController class
  • Middleware stack
  • Error boundary
  • Testing framework

Architecture Overview

Layered Architecture
HTTP Request
    ↓
Routes (routing only)
    ↓
Controllers (request handling)
    ↓
Services (business logic)
    ↓
Repositories (data access)
    ↓
Database (Prisma)

Key Principle: Each layer has ONE responsibility.

See architecture-overview.md for complete details.


Directory Structure

service/src/
├── config/              # UnifiedConfig
├── controllers/         # Request handlers
├── services/            # Business logic
├── repositories/        # Data access
├── routes/              # Route definitions
├── middleware/          # Express middleware
├── types/               # TypeScript types
├── validators/          # Zod schemas
├── utils/               # Utilities
├── tests/               # Tests
├── instrument.ts        # Sentry (FIRST IMPORT)
├── app.ts               # Express setup
└── server.ts            # HTTP server

Naming Conventions:

  • Controllers: PascalCase - UserController.ts
  • Services: camelCase - userService.ts
  • Routes: camelCase + Routes - userRoutes.ts
  • Repositories: PascalCase + Repository - UserRepository.ts

Core Principles (7 Key Rules)

1. Routes Only Route, Controllers Control
typescript
// ❌ NEVER: Business logic in routes
router.post('/submit', async (req, res) => {
    // 200 lines of logic
});

// ✅ ALWAYS: Delegate to controller
router.post('/submit', (req, res) => controller.submit(req, res));
2. All Controllers Extend BaseController
typescript
export class UserController extends BaseController {
    async getUser(req: Request, res: Response): Promise<void> {
        try {
            const user = await this.userService.findById(req.params.id);
            this.handleSuccess(res, user);
        } catch (error) {
            this.handleError(error, res, 'getUser');
        }
    }
}
3. All Errors to Sentry
typescript
try {
    await operation();
} catch (error) {
    Sentry.captureException(error);
    throw error;
}
4. Use unifiedConfig, NEVER process.env
typescript
// ❌ NEVER
const timeout = process.env.TIMEOUT_MS;

// ✅ ALWAYS
import { config } from './config/unifiedConfig';
const timeout = config.timeouts.default;
5. Validate All Input with Zod
typescript
const schema = z.object({ email: z.string().email() });
const validated = schema.parse(req.body);
6. Use Repository Pattern for Data Access
typescript
// Service → Repository → Database
const users = await userRepository.findActive();
7. Comprehensive Testing Required
typescript
describe('UserService', () => {
    it('should create user', async () => {
        expect(user).toBeDefined();
    });
});

Common Imports

typescript
// Express
import express, { Request, Response, NextFunction, Router } from 'express';

// Validation
import { z } from 'zod';

// Database
import { PrismaClient } from '@prisma/client';
import type { Prisma } from '@prisma/client';

// Sentry
import * as Sentry from '@sentry/node';

// Config
import { config } from './config/unifiedConfig';

// Middleware
import { SSOMiddlewareClient } from './middleware/SSOMiddleware';
import { asyncErrorWrapper } from './middleware/errorBoundary';

Quick Reference

HTTP Status Codes
CodeUse Case
200Success
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
500Server Error
Service Templates

Blog API (✅ Mature) - Use as template for REST APIs Auth Service (✅ Mature) - Use as template for authentication patterns


Show full SKILL.md (164 more words)Show less

Anti-Patterns to Avoid

❌ Business logic in routes ❌ Direct process.env usage ❌ Missing error handling ❌ No input validation ❌ Direct Prisma everywhere ❌ console.log instead of Sentry


Navigation Guide

Need to...Read this
Understand architecturearchitecture-overview.md
Create routes/controllersrouting-and-controllers.md
Organize business logicservices-and-repositories.md
Validate inputvalidation-patterns.md
Add error trackingsentry-and-monitoring.md
Create middlewaremiddleware-guide.md
Database accessdatabase-patterns.md
Manage configconfiguration.md
Handle async/errorsasync-and-errors.md
Write teststesting-guide.md
See examplescomplete-examples.md

Resource Files

architecture-overview.md

Layered architecture, request lifecycle, separation of concerns

routing-and-controllers.md

Route definitions, BaseController, error handling, examples

services-and-repositories.md

Service patterns, DI, repository pattern, caching

validation-patterns.md

Zod schemas, validation, DTO pattern

sentry-and-monitoring.md

Sentry init, error capture, performance monitoring

middleware-guide.md

Auth, audit, error boundaries, AsyncLocalStorage

database-patterns.md

PrismaService, repositories, transactions, optimization

configuration.md

UnifiedConfig, environment configs, secrets

async-and-errors.md

Async patterns, custom errors, asyncErrorWrapper

testing-guide.md

Unit/integration tests, mocking, coverage

complete-examples.md

Full examples, refactoring guide


  • database-verification - Verify column names and schema consistency
  • error-tracking - Sentry integration patterns
  • skill-developer - Meta-skill for creating and managing skills

Skill Status: COMPLETE ✅ Line Count: < 500 ✅ Progressive Disclosure: 11 resource files ✅

© diet103, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files in .agents/skills/backend-dev-guidelines of diet103/claude-code-infrastructure-showcase.

  • SKILL.md
  • resources/architecture-overview.md
  • resources/async-and-errors.md
  • resources/complete-examples.md
  • resources/configuration.md
  • resources/database-patterns.md
  • resources/middleware-guide.md
  • resources/routing-and-controllers.md
  • resources/sentry-and-monitoring.md
  • resources/services-and-repositories.md
  • resources/testing-guide.md
  • resources/validation-patterns.md

Open the folder on GitHubat commit 07f75ce

Used in 2 other repositories

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in diet103/claude-code-infrastructure-showcase, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Node Backend Development Guidelines 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.

Node Backend Development Guidelines compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Node Backend Development Guidelines this skilldiet103/claude-code-infrastructure-showcase10k2 repos~2kAutomated safety check: PassMIT
Nodejsblencorp/claude-code-kit106—~2.6kAutomated safety check: PassMIT
Database Migrationsaffaan-m/ECC275k4 repos~3kAutomated safety check: PassMIT
.NET Core ExpertJeffallan/claude-skills12k—~1.3kAutomated safety check: PassMIT
Sentry Node SDKgetsentry/sentry-for-ai268—~8.4kAutomated safety check: PassApache-2.0
Senior Backendborghei/Claude-Skills881—~1.6kAutomated safety check: PassMIT

Similar skills

  • Nodejs

    blencorp/claude-code-kit

    Core Node.js backend patterns for TypeScript applications including async/await error handling, middleware concepts, configuration management, testing strategies, and layered architecture principles.

    106 GitHub stars~2.6k tokensUpdated 10 mo ago
    Backend & APIsAuto-check passed
  • Safe, reversible database migration patterns: forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows for PostgreSQL…

    275k GitHub starsUsed in 4 repos~3k tokens
    DatabasesAuto-check passed
  • .NET Core Expert

    Jeffallan/claude-skills

    Guides building .NET 8 services with minimal APIs, clean architecture, Entity Framework Core, MediatR CQRS and JWT authentication, with build and test checks.

    12k GitHub stars~1.3k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Sentry Node SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Node.js, Bun, and Deno. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~8.4k tokensUpdated today
    Backend & APIsAuto-check passed
  • Senior Backend

    borghei/Claude-Skills

    Backend development with Node.js/Express/Fastify and PostgreSQL.

    881 GitHub stars~1.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Prisma Orm

    cohen-liel/hivemind

    Prisma ORM patterns for Node.js/TypeScript backends. An agent skill from cohen-liel/hivemind.

    110 GitHub stars~1.2k tokensUpdated 5 mo ago
    DatabasesAuto-check passed

More from diet103/claude-code-infrastructure-showcase

  • Claude Code Skill Developer Guide

    diet103/claude-code-infrastructure-showcase

    A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.

    10k GitHub starsUsed in 11 repos~3.5k tokens
    Auto-check passed
  • Sentry v8 Error Tracking

    diet103/claude-code-infrastructure-showcase

    Enforces that every error in a service is captured to Sentry v8, with patterns for controllers, routes, cron jobs and database performance spans instead of console logging alone.

    10k GitHub starsUsed in 2 repos~2.3k tokens
    Auto-check: notes
  • React Frontend Development Guidelines

    diet103/claude-code-infrastructure-showcase

    Guidelines for React 18 and TypeScript apps covering Suspense data fetching, lazy loading, feature folders, MUI v7 styling, TanStack Router and performance.

    10k GitHub starsUsed in 2 repos~2.9k tokens
    Auto-check passed
  • Verify Setup Health Check

    diet103/claude-code-infrastructure-showcase

    Run the infrastructure health check and fix anything that fails

    10k GitHub stars~363 tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about Node Backend Development Guidelines

What does Node Backend Development Guidelines do?

Sets layered architecture and coding rules for Node.js, Express and TypeScript microservices, covering routes, controllers, services, repositories, Prisma, Sentry and Zod. Backend services follow a layered design in which routes only route, controllers extend a BaseController, services hold business logic with dependency injection, and repositories handle database access when queries are complex. Each layer has one responsibility, and the guide includes a directory structure and naming conventions for controllers, services, routes and repositories.

When should I use Node Backend Development Guidelines?

Node Backend Development Guidelines fits situations like: creating a new route, controller and service in an Express API; adding Zod validation and Sentry error tracking to an endpoint; setting up the structure of a new microservice; refactoring a legacy route that holds business logic.

How do I install Node Backend Development Guidelines in Claude Code?

Run `npx skills add diet103/claude-code-infrastructure-showcase --skill backend-dev-guidelines -a claude-code`. Or copy the skill folder (.agents/skills/backend-dev-guidelines in diet103/claude-code-infrastructure-showcase) into .claude/skills/backend-dev-guidelines in your project. Claude Code loads it when a task matches its description.

How do I install Node Backend Development Guidelines in Codex?

Run `npx skills add diet103/claude-code-infrastructure-showcase --skill backend-dev-guidelines -a codex`. Or copy the skill folder (.agents/skills/backend-dev-guidelines in diet103/claude-code-infrastructure-showcase) into .agents/skills/backend-dev-guidelines in your project. Codex loads it when a task matches its description.

Can I use Node Backend Development Guidelines in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add diet103/claude-code-infrastructure-showcase --skill backend-dev-guidelines -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/backend-dev-guidelines, .gemini/skills/backend-dev-guidelines, .github/skills/backend-dev-guidelines and .opencode/skills/backend-dev-guidelines in your project.

What does Node Backend Development Guidelines need to run?

SKILL.md names no scripts, command-line tools or credentials: Node Backend Development Guidelines is instructions for the agent only. Our summary lists: A Node.js, Express and TypeScript service, ideally with Prisma and Sentry.

Does Node Backend Development Guidelines access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Node Backend Development Guidelines safe to install?

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.

What licence does Node Backend Development Guidelines use?

Node Backend Development Guidelines is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Node Backend Development Guidelines use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Node Backend Development Guidelines?

Skills that share tags, products or a category with Node Backend Development Guidelines: Nodejs (blencorp/claude-code-kit, 106 stars), Database Migrations (affaan-m/ECC, 275k stars), .NET Core Expert (Jeffallan/claude-skills, 12k stars) and Sentry Node SDK (getsentry/sentry-for-ai, 268 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Node Backend Development Guidelines?

diet103 (a GitHub user) maintains it in diet103/claude-code-infrastructure-showcase, which has 10,031 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on July 13, 2026.

Source: diet103/claude-code-infrastructure-showcase on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.