In an aidd repository, use when code touches REST endpoints, OpenAPI, GraphQL, gRPC, webhooks, event schemas, AsyncAPI, rate limits, API tokens, SDKs, or breaking API changes.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Apis And Services?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/thaithienvanid-apis-and-services)
---
name: apis-and-services
description: "In an aidd repository, use when code touches REST endpoints, OpenAPI, GraphQL, gRPC, webhooks, event schemas, AsyncAPI, rate limits, API tokens, SDKs, or breaking API changes."
---
<!-- generated by `aidd gen-docs` from schemas/packs.json; edit the registry, not this file -->
# APIs and services
## Scope
Applies when the change touches HTTP, gRPC, events, webhooks. Not when the interface stays inside one process, such as an internal function signature. Neighbours: `aidd-team:naming`, `aidd-team:data-model-design`, `aidd-team:product-defaults`, `aidd-team:performance`.
## Standards
| # | Standard | Edition | Checked | Source |
| --- | --- | --- | --- | --- |
| S1 | OpenAPI Specification | 3.2.1 | 2026-10-16 | <https://spec.openapis.org/oas/v3.2.1.html> |
| S2 | RFC 9110 HTTP semantics: methods, status codes, and conditional requests | RFC 9110 (STD 97) | 2026-10-16 | <https://www.rfc-editor.org/rfc/rfc9110.html> |
| S3 | RFC 9457 problem details | 2023 | 2026-10-16 | <https://www.rfc-editor.org/rfc/rfc9457> |
| S4 | OWASP API Security Top 10 | 2023 | 2026-11-10 | <https://api-security.owasp.org/editions/2023/en/0x11-t10/> |
| S5 | Semantic Versioning | 2.0.0 | 2026-10-16 | <https://semver.org/> |
| S6 | HTTP Deprecation and Sunset header fields | RFC 9745; RFC 8594 | 2026-10-16 | <https://www.rfc-editor.org/rfc/rfc9745.html> |
| S7 | GraphQL specification | September 2025 | 2026-10-16 | <https://spec.graphql.org/September2025/> |
| S8 | Standard Webhooks: signed, identified, and timestamped webhook delivery (emerging) | — | 2026-10-22 | <https://github.com/standard-webhooks/standard-webhooks/blob/main/spec/standard-webhooks.md> |
| S9 | RFC 6455 The WebSocket Protocol | RFC 6455 | 2026-10-17 | <https://www.rfc-editor.org/rfc/rfc6455.html> |
| S10 | Server-sent events (EventSource) | WHATWG HTML Living Standard | 2026-10-17 | <https://html.spec.whatwg.org/multipage/server-sent-events.html> |
## Checklist by loop step
| Step | Item | Standard |
| --- | --- | --- |
| Before the first edit (`aidd risk --paths`) | A changed request, response, status code, event, GraphQL type, or Protobuf message is a contract change: never minor. | S1, S7 |
| Before the first edit (`aidd risk --paths`) | Product defaults (`api_conventions`, `data_conventions`, `operability`, `api_latency`, `outbound_calls`, `slo`, `backup_restore`, `request_limits`): build each one `project.defaults.disabled` does not name, as `aidd-team:product-defaults` says. | — |
| Specify | The OpenAPI or AsyncAPI change, the GraphQL schema, or the `.proto` file is written before Spec approval and listed as a `design-files` doc, so Spec approval freezes it. The Acceptance references its operations and schemas. | S1, S7 |
| Specify | Methods and status codes follow RFC 9110, and errors are RFC 9457 problem details with stable codes, named now with `aidd-team:naming` (its `references/errors-and-names.md`). A POST or PATCH a client may retry takes an idempotency key, as `aidd-team:product-defaults` says. Every list paginates and states its page size. Rate limits, quotas, and spending limits on paid providers are stated (OWASP API4). | S2, S3, S4 |
| Specify | Versioning: an additive change needs no bump. A removal or a changed meaning goes through expand and contract, announced by `Deprecation` and `Sunset` headers and the Spec's `deprecations`; a breaking change is a new major version. Clients state timeouts and backoff, and events their delivery semantics. GraphQL, Protobuf, webhooks, and concurrent updates: [references/graphql-grpc-webhooks.md](references/graphql-grpc-webhooks.md). | S5, S6 |
| Implement | Validate input against the contract at the boundary, and treat a third party's response as input too (OWASP API10). Authorize per object and per property (OWASP API1, API3). Generate clients and types from the contract with one pinned generator, never by hand. A GraphQL server caps depth and cost and takes only persisted operations from first-party clients. | S4, S7 |
| Implement | Webhooks are signed and carry an id and a timestamp; a receiver verifies them and drops a replay (Standard Webhooks). A sender resolves each target URL and refuses private, loopback, link-local, and metadata addresses, after each redirect too (OWASP API7). | S8, S4 |
| Implement | Real time: server-sent events for server-to-client updates, WebSocket only for two-way traffic. Each connection authenticates when it opens, sends heartbeats, bounds its send buffer, and resumes after a drop (SSE's `Last-Event-ID`, or a sequence number); fan-out across instances goes through a pub/sub channel. | S9, S10 |
| Implement | Tokens follow RFC 9700, which `aidd-team:secure-coding` holds, against broken authentication (OWASP API2): no implicit or password grant, PKCE, exact redirect URIs, and short-lived or sender-constrained tokens. API keys are stored hashed, shown once, scoped, expiring, and prefixed so a secret scanner finds a leak. | S4 |
| Review | Only additive changes without a version bump, and a removal follows the expand and contract the Spec's `deprecations` records, so a passed sunset warns. Every new operation has authorization, pagination, error mapping, and docs. | S5 |
| Roll out | Consumer contract tests pass for every known consumer before rollout. 4xx and 5xx rates and p95 latency are the observe signals; calls to deprecated operations are counted per consumer. | S1 |
## Test commands
| Command | Proves | How | Standard |
| --- | --- | --- | --- |
| Spectral | the OpenAPI or AsyncAPI document lints clean | `npx @stoplight/spectral-cli@6.17.0 lint openapi.yaml` in the test commands, with a `.spectral.yaml` of `extends: ["spectral:oas", "@stoplight/spectral-owasp-ruleset"]` (ruleset 2.0.1) unless an org preset names a shared one | S1 |
| Contract tests | every known consumer still passes against the head | consumer-driven, with Pact: each consumer's tests write its pact, and the provider verifies every consumer's pact against the head. The verification runs as a `tests.commands` entry (such as `npm run test:pact:verify`, or the stack's Pact verifier) with `when_changed` on the API code and its contract. At release: `pact-broker can-i-deploy --pacticipant <provider> --version <sha> --to-environment production` (pact_broker-client v1.78.0) | S1 |
| Schema conformance | the running API matches its contract | `uvx schemathesis==4.28.0 run <openapi-url>` against the running service | S1 |
| Breaking-change diff | no breaking API, event, GraphQL, or Protobuf change without a major version | `oasdiff breaking --fail-on ERR base.yaml openapi.yaml` (oasdiff v1.32.1), and for events `npx @asyncapi/cli@6.2.1 diff base.yaml asyncapi.yaml -t breaking`, where a small script writes `base.yaml` from the base commit (`git show <base>:<file>`) first, as a `tests.commands` entry with `when_changed` on the contract; a breaking change passes only with a major version, and a schema registry checks each new event schema against every earlier version (backward transitive). For GraphQL, `npx -p @graphql-inspector/cli@7.0.0 graphql-inspector diff base.graphql schema.graphql`, with `base.graphql` written from the base commit, as a `tests.commands` entry with `when_changed` on the schema. For Protobuf, `buf lint` and `buf breaking --against '.git#branch=<base>'` (buf v1.73.0), with `when_changed` on the `.proto` files | S5, S7 |
| Object-level authorization tests | no caller reaches another caller's object or field | one test per resource and per property that tries to read or change another caller's object | S4 |
| Webhook signature and replay tests | a bad signature, a stale timestamp, or a repeated id moves nothing | one test each, on the raw body | S8 |
| OWASP ZAP API scan | no high finding on the changed operations | `zap-api-scan.py` from the ZAP 2.17.0 image against a test deployment | S4 |
| Load test | the SLO holds under load | the load-test runner's `tests` entry, such as `k6 run`, with the SLO as thresholds that fail the run | — |
- From `aidd-team:product-defaults`: API conventions, Operability smoke, Server numbers.
## References
- [references/graphql-grpc-webhooks.md](references/graphql-grpc-webhooks.md): GraphQL, Protobuf, webhooks, idempotency keys, generated code, deprecations, and concurrent updates, with their tests.
- [references/open-choices.md](references/open-choices.md): its open choices, with aidd's defaults.
## Keep it current
Each entry is due after its `review_every_days` (else emerging 90 days, established 365) or by its `review_due`. An emerging one applies only when the change needs it, said in the Spec. One `aidd eval standards` lists as due is looked up in Specify, and a missing one is proposed to aidd's `schemas/industry-standards.json`.