Habilidades backend-dev-guidelines
⚙️

backend-dev-guidelines

Seguro ⚙️ Comandos externos🔑 Variáveis de ambiente📁 Acesso ao sistema de arquivos

应用后端开发最佳实践

Também disponível em: Dimon94,BrianDai22,sickn33,DojoCodingLabs

使用经过验证的 Node.js/Express/TypeScript 模式创建一致、可维护的后端服务。本技能提供架构指导、代码模板和面向微服务开发的安全模式。

Suporta: Claude Codex Code(CC)
📊 70 Adequado
1

Baixar o ZIP da skill

2

Upload no Claude

Vá em Configurações → Capacidades → Skills → Upload skill

3

Ative e comece a usar

Testar

A utilizar "backend-dev-guidelines". Create a POST /posts endpoint with authentication

Resultado esperado:

  • Complete route definition with SSO middleware
  • BaseController with breadcrumb tracking
  • PostService with dependency injection
  • PostRepository with Prisma queries
  • Zod validation schema for post data
  • Error handling with Sentry capture

A utilizar "backend-dev-guidelines". Convert legacy callback code to async/await

Resultado esperado:

  • Updated service methods with try/catch
  • AsyncErrorWrapper utility usage
  • Sentry error capture integration
  • Promise.all() for parallel operations
  • Proper error propagation to controller

A utilizar "backend-dev-guidelines". Add input validation to existing endpoint

Resultado esperado:

  • Zod schema definition with type inference
  • Validation in controller before service call
  • 400 status code on validation failure
  • Error details in response
  • Test cases for invalid input

Auditoria de Segurança

Seguro
v4 • 1/17/2026

All 555 static findings are FALSE POSITIVES. This is a documentation/guide skill containing educational code examples. The detected patterns (shell commands, environment variables, path traversal, crypto algorithms) are in markdown code blocks demonstrating best practices and anti-patterns. The skill actively promotes secure coding - it teaches AGAINST vulnerabilities like path traversal and weak cryptography, not exploits them.

13
Arquivos analisados
5,537
Linhas analisadas
3
achados
4
Total de auditorias
Auditado por: claude Ver Histórico de Auditoria →

Pontuação de qualidade

38
Arquitetura
100
Manutenibilidade
87
Conteúdo
23
Comunidade
100
Segurança
91
Conformidade com especificações

O Que Você Pode Construir

新功能实现

为新的 API 端点按照架构模式生成控制器、服务和仓储代码。

代码库标准化

通过 BaseController 和 unifiedConfig 使用,在多个微服务中建立一致的模式。

Express API 开发

使用适当的中间件、验证和错误跟踪集成构建 Express 路由。

Tente Estes Prompts

创建新端点
Create a new /users/:id endpoint with UserController that extends BaseController, includes Zod validation, and proper error handling with Sentry.
服务模式
Generate a UserService with dependency injection pattern, including repository calls and async error handling wrapper.
仓储模式
Create a UserRepository pattern with PrismaService usage, transaction support, and query optimization examples.
完整功能
Generate complete feature with routes, BaseController, service with DI, repository layer, Zod validation schemas, and Jest tests.

Melhores Práticas

  • 使用分层架构:路由委托给控制器,控制器调用服务,服务使用仓储。
  • 始终扩展 BaseController 以获得一致的错误处理、面包屑跟踪和 Sentry 集成。
  • 在业务逻辑之前使用 Zod 模式验证所有输入 - 尽早拒绝无效数据。

Evitar

  • 永远不要在路由处理程序中放置业务逻辑 - 委托给控制器。
  • 永远不要直接使用 process.env - 使用 unifiedConfig 以获得类型安全和可测试性。
  • 永远不要跳过错误处理 - 所有异步操作都需要带有 Sentry 捕获的 try/catch。

Perguntas Frequentes

本技能使用什么架构模式?
使用路由 → 控制器 → 服务 → 仓储分离关注点的分层架构。
本技能可以生成测试吗?
是的,包含带有模拟策略的 Jest 单元测试和集成测试模式。
本技能适用于其他框架吗?
专注于 Express/Node.js/TypeScript - 模式可适配到类似的框架。
本技能如何处理错误?
BaseController 提供 handleError、handleSuccess、withTransaction 和 Sentry 集成。
我可以将本技能用于现有代码库吗?
是的,提供从传统模式到现代架构的重构指南。
使用什么验证库?
使用 Zod 进行运行时的 TypeScript 验证,通过模式进行类型推断。