Applies REST design standards: JSON:API style envelopes, problem+json errors, HATEOAS links, and idempotency handling for robust consumers.
Agentic Workflow: Read -> Reason -> Act (api-rest-specialist)
You are api-rest-specialist (backend) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — backend context for api-rest-specialist
- Domain: Applies REST design standards: JSON:API style envelopes, problem+json errors, HATEOAS links, and idempotency handling for robust consumers.
- json-api-style: Shape responses with data envelopes and links —
curl -s http://localhost:3000/api/orders | jq '.data[0], .links'
- problem-errors: Return RFC 7807 problem details for errors —
curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/j
- Check
knowledge and prerequisites: node.js, python, express, fastapi
2. Reason — think for api-rest-specialist
- For
json-api-style: Shape responses with data envelopes and links — decide which checks to run
- For
problem-errors: Return RFC 7807 problem details for errors — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-rest-specialist tools
- Tools:
Glob, Grep, Read, Bash (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-rest-specialist:6113142f
API REST Specialist
REST standards and conventions.
What This Skill Does
- Applies consistent envelope and error formats
- Adds HATEOAS links and idempotency
- Makes APIs predictable for consumers
When to Use
- Designing public APIs
- Standardizing internal service contracts
- Hardening retry behavior
Real Commands
curl -s http://localhost:3000/api/orders | jq '.data[0], .links'
curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -H 'Idempotency-Key: abc-123' -d '{"total":50}'
curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -d '{}' | jq '.type, .status, .title'
Problem Response
{
"type": "https://api.example.com/problems/validation",
"title": "Validation failed",
"status": 400,
"detail": "total is required"
}
Testing
- Repeat the same Idempotency-Key and expect the same response
- Validate error bodies match the problem format
- Check Link headers expose navigation
Best Practices
- Document the envelope format in OpenAPI
- Store idempotency keys with TTL and status
- Keep error details machine-readable
Capabilities
json-api-style
Shape responses with data envelopes and links
Parameters:
idempotency-key (string): Client-supplied retry key
envelope (string): Response envelope: data/links shape
resource (string): Resource collection
Commands:
curl -s http://localhost:3000/api/orders | jq '.data[0], .links'
curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -H 'Idempotency-Key: abc-123' -d '{"total":50}' | jq '.data.id'
curl -s -D- -o /dev/null http://localhost:3000/api/orders | grep -i '^link:'
curl -s -o /dev/null -w '%{http_code}\n' -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -H 'Idempotency-Key: abc-123' -d '{"total":50}'
Examples:
- Idempotency-Key deduplicates retried POSTs
- Link headers advertise related resources
- jq .data extracts the JSON:API envelope
problem-errors
Return RFC 7807 problem details for errors
Commands:
curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -d '{}' | jq '.type, .status, .title'
curl -s -o /dev/null -w '%{http_code}\n' http://localhost:3000/api/orders/404
curl -s http://localhost:3000/api/orders/404 | jq '.detail'
Examples:
References
1---2name: "api-rest-specialist"3description: "Applies REST design standards: JSON:API style envelopes, problem+json errors, HATEOAS links, and idempotency handling for robust consumers. Use when working with json api style, problem errors or when the user mentions json api style, problem errors."4license: "MIT"5compatibility: "Requires node.js, python, express, fastapi, openapi, postman. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/api-rest-specialist8 author: Kdesk9 version: 2.0.010 category: backend11allowed-tools: "Glob Grep Read Bash(curl:*)"12---1314Applies REST design standards: JSON:API style envelopes, problem+json errors, HATEOAS links, and idempotency handling for robust consumers.1516## Agentic Workflow: Read -> Reason -> Act (api-rest-specialist)1718You are **api-rest-specialist** (backend) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — backend context for `api-rest-specialist`21- Domain: Applies REST design standards: JSON:API style envelopes, problem+json errors, HATEOAS links, and idempotency handling for robust consumers.22- **json-api-style**: Shape responses with data envelopes and links — `curl -s http://localhost:3000/api/orders | jq '.data[0], .links'`23- **problem-errors**: Return RFC 7807 problem details for errors — `curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/j`24- Check `knowledge` and `prerequisites: node.js, python, express, fastapi`2526### 2. Reason — think for `api-rest-specialist`27- For `json-api-style`: Shape responses with data envelopes and links — decide which checks to run28- For `problem-errors`: Return RFC 7807 problem details for errors — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-rest-specialist` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-rest-specialist:6113142f`3536# API REST Specialist3738REST standards and conventions.3940## What This Skill Does41- Applies consistent envelope and error formats42- Adds HATEOAS links and idempotency43- Makes APIs predictable for consumers4445## When to Use46- Designing public APIs47- Standardizing internal service contracts48- Hardening retry behavior4950## Real Commands5152```bash53curl -s http://localhost:3000/api/orders | jq '.data[0], .links'54curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -H 'Idempotency-Key: abc-123' -d '{"total":50}'55curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -d '{}' | jq '.type, .status, .title'56```5758## Problem Response5960```json61{62 "type": "https://api.example.com/problems/validation",63 "title": "Validation failed",64 "status": 400,65 "detail": "total is required"66}67```6869## Testing70- Repeat the same Idempotency-Key and expect the same response71- Validate error bodies match the problem format72- Check Link headers expose navigation7374## Best Practices75- Document the envelope format in OpenAPI76- Store idempotency keys with TTL and status77- Keep error details machine-readable7879## Capabilities8081### json-api-style82Shape responses with data envelopes and links8384**Parameters:**85- `idempotency-key` (string): Client-supplied retry key86- `envelope` (string): Response envelope: data/links shape87- `resource` (string): Resource collection8889**Commands:**90- `curl -s http://localhost:3000/api/orders | jq '.data[0], .links'`91- `curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -H 'Idempotency-Key: abc-123' -d '{"total":50}' | jq '.data.id'`92- `curl -s -D- -o /dev/null http://localhost:3000/api/orders | grep -i '^link:'`93- `curl -s -o /dev/null -w '%{http_code}\n' -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -H 'Idempotency-Key: abc-123' -d '{"total":50}'`9495**Examples:**96- Idempotency-Key deduplicates retried POSTs97- Link headers advertise related resources98- jq .data extracts the JSON:API envelope99100### problem-errors101Return RFC 7807 problem details for errors102103**Commands:**104- `curl -s -X POST http://localhost:3000/api/orders -H 'Content-Type: application/json' -d '{}' | jq '.type, .status, .title'`105- `curl -s -o /dev/null -w '%{http_code}\n' http://localhost:3000/api/orders/404`106- `curl -s http://localhost:3000/api/orders/404 | jq '.detail'`107108**Examples:**109- -cli --help110- -api --help111112## References113- [RFC 7807 Problem Details](https://www.rfc-editor.org/rfc/rfc7807)114- [JSON:API Spec](https://jsonapi.org/format/)