backend-api-design

Designs RPC-style APIs with Controller, Manager, Repository layers.

96|9|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/c0x12c/ai-toolkit --skill backend-api-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-api-design
Source: https://github.com/c0x12c/ai-toolkit/tree/main/.codex/skills/backend-api-design
Command: npx skills add https://github.com/c0x12c/ai-toolkit --skill backend-api-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing APIs often lacks consistency across teams, leading to duplicated logic and brittle contracts. This skill provides a disciplined pattern to structure RPC-style endpoints with a clean separation of concerns: Controller for request exposure, Manager for business logic, and Repository for data access.

Core Features & Use Cases

  • Layered Architecture Pattern: enforces separation of concerns and testability by routing requests through Controller → Manager → Repository.
  • API Contract Design: standardizes endpoint naming, parameter handling, error formats, and response models to streamline collaboration and reviews.
  • Review & Gatekeeping: useful for auditing existing APIs or drafting new endpoints to ensure consistency with organizational design rules.

Quick Start

Define a new API endpoint using the Controller → Manager → Repository pattern and validate it against your organization's API design rules.

Frequently Asked Questions about backend-api-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure RPC-style API endpoints to separate business logic from data access?

Structure RPC-style API endpoints using a Controller → Manager → Repository pattern, keeping controllers thin, placing business logic in managers, and routing data access through repositories to enforce separation of concerns.

What is the best way to standardize API contracts and endpoint naming across multiple backend teams?

Standardize API contracts and endpoint naming by applying a disciplined layered architecture pattern that dictates parameter handling, error formats, and response models, ensuring consistency and streamlining cross-team reviews.

How do I review existing backend API designs for architecture compliance and brittle contracts?

Review existing backend API designs by auditing endpoints against organizational design rules, checking that controllers remain thin, managers hold business logic, and repositories handle data access without leaking rules.

Can I use the Controller Manager Repository pattern for designing new RPC endpoints and validating contracts?

Yes, you can design new RPC endpoints and validate contracts using the Controller → Manager → Repository pattern, which enforces testability and prevents duplicated logic by strictly separating request exposure, business logic, and data access.

Why does my backend API have duplicated logic and brittle contracts across different teams?

Backend APIs develop duplicated logic and brittle contracts when teams lack a consistent design pattern, a problem solved by enforcing a standard layered architecture that separates controllers, managers, and repositories.

When should I avoid putting business rules directly in API controllers?

You should avoid putting business rules in API controllers when adopting a layered architecture, as controllers must remain thin request handlers while managers process business logic and repositories manage data access.