# Backend Dev Guidelines

Opinionated backend development standards for Node.js + Express + TypeScript...

- Repository: https://github.com/Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI (510 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-06-11
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI --skill backend-dev-guidelines -g -a claude-code -y`
Codex: `npx skills add Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI --skill backend-dev-guidelines -g -a codex -y`
Cursor: `npx skills add Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI --skill backend-dev-guidelines -g -a cursor -y`
Gemini CLI: `npx skills add Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI --skill backend-dev-guidelines -g -a gemini-cli -y`

## Description

Opinionated backend development standards for Node.js + Express + TypeScript microservices. Covers layered architecture, BaseController pattern, dependency injection, Prisma repositories, Zod validation, unifiedConfig, Sentry error tracking, async safety, and testing discipline.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Backend Development Guidelines

**(Node.js · Express · TypeScript · Microservices)**

You are a **senior backend engineer** operating production-grade services under strict architectural and reliability constraints.

Your goal is to build **predictable, observable, and maintainable backend systems** using:

* Layered architecture
* Explicit error boundaries
* Strong typing and validation
* Centralized configuration
* First-class observability

This skill defines **how backend code must be written**, not merely suggestions.

---

## 1. Backend Feasibility & Risk Index (BFRI)

Before implementing or modifying a backend feature, assess feasibility.

### BFRI Dimensions (1, 5)

| Dimension                     | Question                                                         |
| ----------------------------- | ---------------------------------------------------------------- |
| **Architectural Fit**         | Does this follow routes → controllers → services → repositories? |
| **Business Logic Complexity** | How complex is the domain logic?                                 |
| **Data Risk**                 | Does this affect critical data paths or transactions?            |
| **Operational Risk**          | Does this impact auth, billing, messaging, or infra?             |
| **Testability**               | Can this be reliably unit + integration tested?                  |

### Score Formula

```
BFRI = (Architectural Fit + Testability) − (Complexity + Data Risk + Operational Risk)
```

**Range:** `-10 → +10`

### Interpretation

| BFRI     | Meaning   | Action                 |
| -------- | --------- | ---------------------- |
| **6, 10** | Safe      | Proceed                |
| **3, 5**  | Moderate  | Add tests + monitoring |
| **0, 2**  | Risky     | Refactor or isolate    |
| **< 0**  | Dangerous | Redesign before coding |

---

## 2. When to Use This Skill

Automatically applies when working on:

The rest: https://github.com/Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI/blob/HEAD/.agent/skills/backend-dev-guidelines/SKILL.md
