Claude Code api-designer for REST resource and cursor pagination
Define REST resource naming, pagination, status codes, consistent errors, and corresponding OpenAPI reference content.
中文Install in Claude Code
Open existing API specifications in Claude Code or provide the resources to model. Establish the response fields and data access requirements.
- Review `.claude/skills/api-designer/SKILL.md` and its requirements at the pinned GitHub commit.
- Create `.claude/skills/api-designer/` in your project and save the reviewed file as `.claude/skills/api-designer/SKILL.md`.
- Start Claude Code from that project's root, then select `/api-designer` in the slash menu.
Example task
The list-27 events feed is sorted by most recent update and changes frequently. Return 12 items on the first screen and allow the client to fetch another page.What to check
One design is “GET /api/events?limit=12”. The result has {status: 200, returned: 12, has_more: true} and a next_cursor for the following page.
Original SKILL.md on GitHub · Updated
Frequently asked question
When should I choose offset pagination?
Offset pagination is reasonable for small, stable datasets that need page numbers. A frequently changing list can use a cursor.