Backend Dev Guidelines
Backend Dev Guidelines is an code AI skill with a core value of Opinionated backend development standards for Node. It
helps developers solve real-world problems in the code domain, boosting
efficiency, automating repetitive tasks, and optimizing workflows.
Opinionated backend development standards for Node.js + Express + TypeScript microservices. Covers layered architecture, BaseController pattern, dependency injection, Prisma repositories, Zod valid...
Quick Facts
mkdir -p ./skills/backend-dev-guidelines && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/backend-dev-guidelines/SKILL.md -o ./skills/backend-dev-guidelines/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# 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:
* Routes, controllers, services, repositories
* Express middleware
* Prisma database access
* Zod validation
* Sentry error tracking
* Configuration management
* Backend refactors or migrations
---
3. Core Architecture Doctrine (Non-Negotiable)
1. Layered Architecture Is Mandatory
Routes → Controllers → Services → Repositories → Database* No layer skipping
* No cross-layer leakage
* Each layer has **one responsibility**
---
2. Routes Only Route
// ❌ NEVER
router.post('/create', async (req, res) => {
await prisma.user.create(...);
});
// ✅ ALWAYS
router.post('/create', (req, res) =>
userController.create(req, res)
);Routes must contain **zero business logic**.
---
3. Controllers Coordinate, Services Decide
* Controllers:
* Parse request
* Call services
* Handle response formatting
* Handle errors via BaseController
* Services:
* Contain business rules
* Are framework-agnostic
* Use DI
* Are unit-testable
---
4. All Controllers Extend `BaseController`
export class UserController extends BaseController {
async getUser(req: Request, res: Response): Promise<void> {
try {
const user = await this.userService.getById(req.params.id);
this.handleSuccess(res, user);
} catch (error) {
this.handleError(error, res, 'getUser');
}
}
}No raw `res.json` calls outside BaseController helpers.
---
5. All Errors Go to Sentry
catch (error) {
Sentry.captureException(error);
throw error;
}❌ `console.log`
❌ silent failures
❌ swallowed errors
---
6. unifiedConfig Is the Only Config Source
// ❌ NEVER
process.env.JWT_SECRET;
// ✅ ALWAYS
import { config } from '@/config/unifiedConfig';
config.auth.jwtSecret;---
7. Validate All External Input with Zod
* Request bodies
* Query params
* Route params
* Webhook payloads
const schema = z.object({
email: z.string().email(),
});
const input = schema.parse(req.body);No validation = bug.
---
4. Directory Structure (Canonical)
src/
🎯 Best For
- UI designers
- Product designers
- Claude users
- Software engineers
- Development teams
💡 Use Cases
- Generating component mockups
- Creating design system tokens
- TypeScript type safety checking
- Module refactoring
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply Backend Dev Guidelines to Your Work
Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.
- 4
Review and Refine
Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.
❓ Frequently Asked Questions
Does this work with Figma?
Some design skills integrate with Figma plugins. Check the Works With section for supported tools.
Is Backend Dev Guidelines compatible with Cursor and VS Code?
Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.
Do I need specific dependencies for Backend Dev Guidelines?
Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.
How do I install Backend Dev Guidelines?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/backend-dev-guidelines/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Skipping usability testing
AI-generated designs should be validated with real users before development.
Skipping validation
Always test AI-generated code changes, even for simple refactors.
Missing dependency updates
Check if the skill requires updated dependencies or new packages.