backend-api-patterns
Backend API implementation patterns for scalability, security, and maintainability. Use when building APIs, services, and backend systems.
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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)
- When to Use
- Service Layer Patterns
- Repository Pattern
- Unit of Work Pattern
- Error Handling
- Custom Error Classes
- Global Error Handler
- Database Patterns
- Query Optimization
- Connection Pooling
- Security Patterns
- Input Validation
- Authorization
- Performance Patterns
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.
