home / skills / tlabs-xyz / tbtc-v2-performance / backend-api
/.claude/skills/backend-api
This skill helps you design and implement consistent RESTful APIs across frameworks, enforcing naming, versioning, authentication, and documentation.
npx playbooks add skill tlabs-xyz/tbtc-v2-performance --skill backend-apiReview the files below or copy the command above to add this skill to your agents.
---
name: Backend API
description: Design and implement backend APIs following RESTful principles, consistent naming conventions, and API best practices. Use this skill when working on any backend API code including endpoints, routes, controllers, request handlers, response formatters, authentication mechanisms, API middleware, versioning strategies, or API documentation. Use when creating new API features, refactoring existing API code, implementing REST resources, designing API architecture, setting up API configuration, or working with any files in API-related directories (routes/, controllers/, api/, handlers/, middleware/). Use when working with Express.js, NestJS, FastAPI, Django REST Framework, Rails API, Spring Boot REST, or any other backend API framework.
---
## When to use this skill
- When creating or modifying API endpoints, routes, or controllers
- When implementing REST resource handlers
- When working with API middleware, guards, or interceptors
- When designing API architecture or structure
- When implementing API versioning strategies
- When working with request/response handling logic
- When creating or updating API authentication or authorization
- When implementing rate limiting or throttling
- When working with API configuration files
- When creating or updating API documentation
- When refactoring API code for consistency
- When working in API-related directories (routes/, controllers/, api/, handlers/, middleware/)
- When working with Express.js, NestJS, FastAPI, Django REST Framework, Rails API, Spring Boot REST, or similar frameworks
# Backend API
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle backend API.
## Instructions
For details, refer to the information provided in this file:
[backend API](../../../agent-os/standards/backend/api.md)
This skill helps design and implement backend APIs following RESTful principles, consistent naming, and API best practices. It guides creation and refactoring of endpoints, routes, controllers, middleware, authentication, and versioning. Use it to ensure predictable request/response behavior, clear error handling, and maintainable API structure.
The skill inspects API code and suggests concrete changes: consistent route naming, resourceful controllers, standardized response shapes, status codes, and error payloads. It reviews middleware, authentication flows, rate limiting, and versioning strategies and proposes improvements aligned with common frameworks (Express, NestJS, FastAPI, Django REST Framework, Rails, Spring Boot). It also provides snippets and configuration patterns tailored to TypeScript projects and common server frameworks.
What response format should I use?
Use a consistent JSON envelope containing data, metadata (optional), and an errors object. Return appropriate HTTP status codes and include machine-readable error codes for clients.
How should I handle validation?
Validate inputs at the boundary (request layer or middleware). Return 4xx errors with details about invalid fields and keep validation logic reusable.
When to version an API?
Version when making breaking changes to request/response shapes or authentication. Prefer starting with a clear versioning strategy (URI or header) before public release.