Agent skill · Security

backend-api-patterns

Backend API implementation patterns for scalability, security, and maintainability. Use when building APIs, services, and backend systems.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill backend-api-patterns --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/api/backend-api-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Backend API Patterns Implementation patterns for scalable, secure, and maintainable backend systems. ## When to Use - Building new API endpoints - Implementing service layer logic - Database operations and queries - Authentication and authorization ## Service Layer Patterns ### Repository Pattern ```typescript // Separate data access from business logic interface UserRepository { findById(id: string): Promise<User | null> findByEmail(email: string): Promise<User | null> create(data: CreateUserDto): Promise<User> update(id: string, data: UpdateUserDto): Promise<User> delete(id: string): Promise<void> } class UserService { constructor(private readonly userRepo: UserRepository) {} async createUser(dto: CreateUserDto): Promise<User> { // Business logic here const existing = await this.userRepo.findByEmail(dto.email) if (existing) throw new ConflictError('Email already exists') return this.userRepo.create(dto) } } ``` ### Unit of Work Pattern ```typescript // Manage transactions across repositories interface UnitOfWork { users: UserRepository orders: OrderRepository commit(): Promise<void> rollback(): Promise<void> } async function createOrderWithUser(uow: UnitOfWork, data: OrderData)

What's inside
Steps it walks through
  1. When to Use
  2. Service Layer Patterns
  3. Repository Pattern
  4. Unit of Work Pattern
  5. Error Handling
  6. Custom Error Classes
  7. Global Error Handler
  8. Database Patterns
  9. Query Optimization
  10. Connection Pooling
  11. Security Patterns
  12. Input Validation
  13. Authorization
  14. Performance Patterns
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the backend-api-patterns skill do?

Backend API implementation patterns for scalability, security, and maintainability. Use when building APIs, services, and backend systems.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill backend-api-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going