Skip to main content
skill CX Codex

backend-api-design — Claude Code skill: layered RPC APIs

Tells the agent how to shape RPC-style APIs: a thin controller, a manager holding business logic, a repository for data access. Useful when adding endpoints or auditing existing ones.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add c0x12c/ai-toolkit --skill backend-api-design -a claude-code
Open on GitHub

What backend-api-design does

The skill lays out URL rules that leave little room for interpretation. Path parameters are out — query values only. A single resource stays singular (/employee), a collection goes plural (/employees), and actions live in sub-paths such as /delete, /restore or /sync. Every mutation is a @Post; @Put, @Delete and @Patch are off the table.

Each layer gets its own job. The controller parses query params with defaults, hands off to the manager, then unwraps the result with .throwOrValue(). The manager returns Either<ClientException, T>, wraps database work in transaction(db.primary) { } and enforces business rules. The repository reads from db.replica, writes to db.primary and filters out soft-deleted rows with deletedAt.isNull().

A gotchas section covers the traps. Multi-word @QueryValue params need an explicit snake_case name — write @QueryValue("project_id") projectId: UUID, because Micronaut matches the literal name while the frontend sends project_id. A second .where {} call silently replaces the first condition, so chain with .andWhere {} instead. And skip @ExecuteOn(TaskExecutors.IO) at your peril: without it suspend functions may hang or land on the wrong thread pool, so every controller needs the annotation.

What it helps with

  • design a new endpoint contract without path parameters
  • split business logic across controller, manager and repository
  • move transactions and error returns out of the controller
  • spot a repository injected straight into a controller
  • build a paginated response with items, total, page, limit and hasMore

Example prompts for the agent

  • Design the employee endpoints following the skill rules: list, create, delete, restore
  • Review this controller and tell me where it breaks the layered architecture
  • Add offset pagination to the employee list and return it as EmployeeListResponse

How to install backend-api-design

1Skills CLI (Vercel)

npx skills add c0x12c/ai-toolkit --skill backend-api-design -a claude-code

2Manually: put the files in place

~/.claude/skills/backend-api-design/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/backend-api-design/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about backend-api-design

How do I install backend-api-design in Claude Code?

Run npx skills add c0x12c/ai-toolkit --skill backend-api-design -a claude-code. The skill file lands at ~/.claude/skills/backend-api-design/SKILL.md.

What does backend-api-design do?

It documents an RPC-style API built on Controller → Manager → Repository layers: URL conventions, what belongs in each layer, and mistakes like a duplicated .where {} call.

Which tools can the skill use?

It is allowed Read, Write, Edit, Glob and Grep, so it reads and edits project files without running shell commands. The code samples use Micronaut and Kotlin.

Similar skills

All skills for Backend and APIs →

From the same set11

startup-pipeline Moves a startup idea through four stages: brainstorm, validation, market research and pitch materials. Gates between stages stop weak ideas early. CX Codex +1 ★ 109repo stars python-testing-strategies A skill that tells your coding agent how to test FastAPI apps: pytest-asyncio, httpx AsyncClient, data factories and the checks every endpoint needs. CX Codex +1 ★ 109repo stars ops-oncall-log Pulls alerts from your monitoring platform and writes a structured on-call log to the team wiki. Useful at the end of a shift or during a review. CX Codex +1 ★ 109repo stars kotlin-best-practices A skill that pins down Kotlin conventions: null safety, Either instead of thrown exceptions, coroutines, and Exposed ORM patterns. Useful while writing or reviewing Kotlin. CX Codex +1 ★ 109repo stars investor-materials A skill for producing investor-facing documents: a pitch deck, one-pager, memo and financial model. Useful when the numbers and the story have to line up across every file. CX Codex +1 ★ 109repo stars design-intelligence Bootstraps a design system from scratch: palette, type scale, spacing, radii and a component inventory in three formats. CX Codex +1 ★ 109repo stars database-patterns Hands your agent a fixed set of database rules: column types, UUID keys, soft deletes and migration templates. Useful when it writes tables or repositories. CX Codex +1 ★ 109repo stars ci-cd-patterns A skill with GitHub Actions templates, PR checks and deployment steps. Handy when CI breaks or you are wiring it up from scratch. CX Codex +1 ★ 109repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor