design-api
Generate REST/GraphQL/gRPC/AsyncAPI specifications as the project's single, verifiable API contract — named schemas, every status code declared, RFC 9457…
Skill by Ryuking1228
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ryuking1228-design-api
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, design, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/design-api
What's inside
- Skill name
design-api- Description
- Generate REST/GraphQL/gRPC/AsyncAPI specifications as the project's single, verifiable API contract — named schemas, every status code declared, RFC 9457 error responses, and per-operation authorization, idempotency and timeout obligations. /architect:design-api to invoke. Requires design-microservices output as a prerequisite.
- License
- MIT
- Instructions
- 212 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: missing
Files (1)
- SKILL.md
SKILL.md (first lines)
# API Design
## Desired Outcome
Design the API surface for inter-service and client-facing communication, as specification files that
downstream skills can generate code from and verify code against:
- API style decision — REST, GraphQL, hybrid, gRPC or AsyncAPI per consumer/service surface
- REST API — OpenAPI 3.1 (or 3.0 where a toolchain requires it) specification per service
- GraphQL inventory and handoff to `/architect:design-graphql` when selected
- gRPC protobuf definitions (inter-service communication)
- AsyncAPI (event-driven communication)
- A problem type registry — the enumerable set of error kinds the API can return
- API Gateway design (routing, authentication, rate limiting)
The specification is the **contract**, not an illustration of one. @rules/api-contract-fidelity.md §1
governs the relationship between it and every downstream artifact: code may not exceed it, may not
contradict it, and changing behaviour means changing the specification first.
## Decision Criteria
### Protocol and surface
- Apply @rules/api-style-selection.md. Select protocol from consumer variability, operation shape,
caching, governance, security and operations — never from service label or database product alone.
- Decide per surface and allow a justified hybrid: flexible reads may use GraphQL while strict
commands, files and webhooks use REST/gRPC/events.
- Record `access_surface`, `application_framework`, `data_access` and `transaction` separately.
- Write per-surface decisions to canonical machine-readable JSON and generate its Markdown view
with the plugin validator. For every
ScalarDB-backed surface include `graphql_provider`, `native_exposure`, `approval`,
`pinned_product`, `pinned_release`, `contracted_edition`, `control_evidence`, and `rationale` as
defined by @rules/api-style-selection.md. For exposed native GraphQL, create the separate human
approval registry at `reports/03_design/api-style-approvals.json`, use project-relative control
evidence references, and resolve release and edition against the version decision, pinned OKF
line, and edition-selection report. Missing or fabricated native-interface evidence blocks
completion, including when progress is recomputed without rerunning this skill.
- The canonical JSON directly controls whether `design-graphql` runs. Do not copy the selection into
`options.api_style_graphql`; a legacy value may exist, but orchestration ignores it once the
canonical artifact exists.
- API versioning strategy, and what counts as a breaking change (@rules/api-contract-fidelity.md §8)
- One project-wide convention for pagination, sorting and filtering — decided here, once
### Transaction-shaped operations
The transaction design is an **input**, not a downstream concern. Each operation is placed against it:
- Which operations sit inside one ACID transaction, which participate in a saga, which are local
- For 2PC surfaces, the participant operations (prepare / validate / commit / abort) are contract
operations like any other and get the same treatment
- Every non-idempotent operation that a client may retry — anything that creates or moves money,
stock, or state — declares an `Idempotency-Key` obligation (@rules/api-error-standard.md §5)
- A per-operation timeout and retry budget, consistent with the SLOs in `reports/04_quality/sla.md`
when the product pipeline supplied them
### Authorization
- Authentication scheme per operation (OAuth2/OIDC), and the **authorization rule per operation**:
the role/scope required, plus the object-level ownership predicate where one applies
- An operation whose authorization is undeclared is read downstream as public. Decide it here — this
is the input to the BOLA/BFLA review, and the most common source of API vulnerabilities
### Errors
- Error responses are RFC 9457 Problem Details, per @rules/api-error-standard.md. No second error
envelope anywhere in the project
- The problem type registry is allocated here and every error response references a registered `type`
## Knowledge Grounding
For a ScalarDB project, the transaction mechanism an operation depends on (shared cluster, Global
Transaction API, application-driven 2PC, Saga) is resolved against the project's pinned release per
@rules/okf-knowledge-bundle.md before it is written into the contract — the available mechanisms
differ by version and edition, and an operation designed around one the project cannot run is a
contract that cannot be implemented.
## Contract Verifiability (mandatory)
Every REST operation this skill emits satisfies @rules/api-contract-fidelity.md §3. GraphQL surfaces
must satisfy @rules/graphql-contract-fidelity.md through `/architect:design-graphql`. Restated as the
checklist to apply before writing each specification file:
- [ ] `operationId` on every operation — `camelCase` verb-noun, unique project-wide, naming the
business action (§2)
- [ ] Every request and response schema is a **named** `components/schemas` entry, never inline
- [ ] Every response status code declared, success **and** error, each with a schema
- [ ] Error responses use `application/problem+json` and a registered `type`
- [ ] Required vs optional decided for every property; `nullable` used deliberately
- [ ] Constraints in the schema (`minLength`, `maximum`, `pattern`, `enum`, `format`) — not in prose
- [ ] At least one success example and one error example per operation
- [ ] `security` declared per operation, with the role/scope and ownership predicate recorded
- [ ] `Idempotency-Key` parameter declared where §5 of the error standard requires it
- [ ] **Every operation with a client-supplied idempotency/replay key** (an `Idempotency-Key`
header OR a client-generated resource ID whose re-send replays, e.g. a TCC reservation ID)
declares (a) the **replay-branch authorization**: the ownership predicate evaluated on the
replay path itself, and the response for a foreign key (404, existence concealment), and
(b) the **storage table** for the idempotency record, cross-referenced to the schema design
— a record scoped to the principal, committed in the same transaction as the business
write. A replay branch with no declared authorization is the §5 BOLA bypass and blocks
completion (shipped once as ASEC-101/ASEC-102)
- [ ] **`transaction-status-unknown` declared on every service that writes through ScalarDB** —
each such service's OpenAPI carries the 503 (idempotency-protected) and/or 500
(unprotected, with the named reconciliation operation) response per
@rules/api-error-standard.md §3.1. A correct implementation must not exceed its contract
These are not style preferences: each one is what makes a specific downstream check possible.
`generate-api-code` generates DTO names from schema names and Bean Validation from schema
constraints; `generate-contract-tests` uses the examples as fixtures; `verify-implementation` cannot
report a status-code break the contract never declared.
## Open Questions
Where an operation's authorization rule, idempotency obligation, timeout budget, or consistency
placement cannot be resolved from the inputs, ask the user per @rules/open-questions.md rather than
writing a permissive default. A silently-public operation and a silently-unbounded timeout are both
defects that surface much later and much more expensively.
## Prerequisites
| File | Required/Recommended | Source |
|------|---------------------|--------|
| reports/03_design/target-architecture.md | Required | /architect:design-microservices |
| reports/03_design/scalardb-transaction.md | Required when scalardb_enabled | /architect:design-scalardb — which operations sit in one transaction, which are saga steps, which are 2PC participants |
| reports/03_design/data-layer-design.md | Required when scalardb_disabled | /architect:design-data-layer |From Ryuking1228/ai-dev-codex-version, MIT.
More from Ryuking1228/ai-dev-codex-version
- 0.560score
analyze-ui
Ryuking1228
Analyze the user interface of an existing system: every screen with what it asks for (inputs, validation), what it shows (outputs, messages), what it lets a…
SkillAFreshness: AClaude Code +9 - 0.560score
capture-followup
Ryuking1228
Capture follow-up work discovered during backlog delivery — deferred tasks, out-of-scope findings, doc drift, split-off scope, waived acceptance criteria —…
SkillAFreshness: AClaude Code +9 - 0.560score
deliver-backlog
Ryuking1228
Orchestrate the implementation skill group over a backlog: drive each Issue under an Epic through implement → review → (human approval) → merge, in order…
SkillAFreshness: AClaude Code +9 - 0.559score
ai-dev-loop-backlog-delivery
Ryuking1228
Implement and review an approved AI Dev Loop backlog through pull request creation and explicit merge gates.
SkillAFreshness: AClaude Code +9 - 0.559score
ai-dev-loop-new-app
Ryuking1228
Build a new React, FastAPI, and PostgreSQL application end to end.
SkillAFreshness: AClaude Code +9 - 0.557score
app-start
Ryuking1228
Build a new full-stack app with Codex, React, FastAPI and PostgreSQL; implement features, run locally, verify with automated tests, prepare deployment and…
SkillAFreshness: AClaude Code +9 - 0.556score
ai-dev-loop-architecture
Ryuking1228
Investigate and design an existing or greenfield system.
SkillAFreshness: AClaude Code +9 - 0.556score
ai-dev-loop-product-design
Ryuking1228
Turn a product idea into validated product direction and requirements.
SkillAFreshness: AClaude Code +9 - 0.520score
define-requirements
Ryuking1228
Define system requirements through document intake and interactive elicitation.
SkillBFreshness: BClaude Code +9 - 0.517score
design-data-layer
Ryuking1228
Generic database design for non-ScalarDB projects.
SkillBFreshness: BClaude Code +9 - 0.517score
analyze
Ryuking1228
Extract ubiquitous language, actor-role-permission matrix, and domain-code mapping.
SkillBFreshness: BClaude Code +9 - 0.517score
create-domain-story
Ryuking1228
Create domain stories using Domain Storytelling technique to visualize business processes.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 29, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Ryuking1228
- 0.560score
deliver-backlog
Ryuking1228
Orchestrate the implementation skill group over a backlog: drive each Issue under an Epic through implement → review → (human approval) → merge, in order…
SkillAFreshness: AClaude Code +9 - 0.560score
capture-followup
Ryuking1228
Capture follow-up work discovered during backlog delivery — deferred tasks, out-of-scope findings, doc drift, split-off scope, waived acceptance criteria —…
SkillAFreshness: AClaude Code +9 - 0.560score
analyze-ui
Ryuking1228
Analyze the user interface of an existing system: every screen with what it asks for (inputs, validation), what it shows (outputs, messages), what it lets a…
SkillAFreshness: AClaude Code +9 - 0.559score
ai-dev-loop-new-app
Ryuking1228
Build a new React, FastAPI, and PostgreSQL application end to end.
SkillAFreshness: AClaude Code +9 - 0.559score
ai-dev-loop-backlog-delivery
Ryuking1228
Implement and review an approved AI Dev Loop backlog through pull request creation and explicit merge gates.
SkillAFreshness: AClaude Code +9 - 0.557score
app-start
Ryuking1228
Build a new full-stack app with Codex, React, FastAPI and PostgreSQL; implement features, run locally, verify with automated tests, prepare deployment and…
SkillAFreshness: AClaude Code +9
Cite this page
design-api skill. Agent Mart. https://agentmart.dev/skills/ryuking1228-design-api (last updated 2026-10-24)