OpenAPI Spec Generation
wshobson/agents
Create, validate and maintain OpenAPI 3.1 specs for REST APIs, whether designed first or generated from existing code, and use them for docs and client SDKs.
Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.
$ npx skills add revfactory/harness-100 --skill api-error-design -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install revfactory/harness-100 api-error-design --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/en/18-api-designer/.claude/skills/api-error-design .claude/skills/api-error-design && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "api-error-design" agent skill from https://github.com/revfactory/harness-100/tree/main/en/18-api-designer/.claude/skills/api-error-design into .claude/skills/api-error-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-error-design", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/revfactory/harness-100/tree/main/en/18-api-designer/.claude/skills/api-error-designType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add revfactory/harness-100 --skill api-error-design -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install revfactory/harness-100 api-error-design --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .agents/skills && cp -r skills-src/en/18-api-designer/.claude/skills/api-error-design .agents/skills/api-error-design && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "api-error-design" agent skill from https://github.com/revfactory/harness-100/tree/main/en/18-api-designer/.claude/skills/api-error-design into .agents/skills/api-error-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-error-design", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add revfactory/harness-100 --skill api-error-design -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install revfactory/harness-100 api-error-design --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/en/18-api-designer/.claude/skills/api-error-design .cursor/skills/api-error-design && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "api-error-design" agent skill from https://github.com/revfactory/harness-100/tree/main/en/18-api-designer/.claude/skills/api-error-design into .cursor/skills/api-error-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-error-design", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/revfactory/harness-100.git --path en/18-api-designer/.claude/skills/api-error-design--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add revfactory/harness-100 --skill api-error-design -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install revfactory/harness-100 api-error-design --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/en/18-api-designer/.claude/skills/api-error-design .gemini/skills/api-error-design && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "api-error-design" agent skill from https://github.com/revfactory/harness-100/tree/main/en/18-api-designer/.claude/skills/api-error-design into .gemini/skills/api-error-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-error-design", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install revfactory/harness-100 api-error-designInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add revfactory/harness-100 --skill api-error-design -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .github/skills && cp -r skills-src/en/18-api-designer/.claude/skills/api-error-design .github/skills/api-error-design && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "api-error-design" agent skill from https://github.com/revfactory/harness-100/tree/main/en/18-api-designer/.claude/skills/api-error-design into .github/skills/api-error-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-error-design", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add revfactory/harness-100 --skill api-error-design -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install revfactory/harness-100 api-error-design --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/en/18-api-designer/.claude/skills/api-error-design .opencode/skills/api-error-design && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "api-error-design" agent skill from https://github.com/revfactory/harness-100/tree/main/en/18-api-designer/.claude/skills/api-error-design into .opencode/skills/api-error-design/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "api-error-design", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
api-error-designReference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.
This is a reference that the doc-writer and mock-tester agents of its harness consult when they document or test how an API fails. It proposes a hierarchical error code format built from a domain, a category and a detail, then supplies a catalog grouped by domain: authentication and authorization, validation, resource, rate limit and server errors.
Each catalog row pairs a code with an HTTP status and a client-facing message, and where it helps adds a suggested client action or field-level hint. Examples include sending an expired token to a refresh attempt, returning 422 for a missing field, or answering 429 with a retry-after wait. The skill covers design and documentation only; writing the actual error handling code is outside its scope.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 8e8d35c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are json).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
AUTH_INVALID_CREDENTIALSFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
API Error Design Patterns loads about 1.6k tokens when it runs. Until then it costs about 124 tokens; SKILL.md has 492 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 492 words, ~1,571 tokens.
.claude/skills/api-error-design/SKILL.md (or your agent's skills folder).A reference for error systems, message design, and recovery strategies used by the doc-writer and mock-tester agents when designing API error documentation and tests.
doc-writer — Applied when writing error reference documentationmock-tester — Applied when designing error scenario tests{DOMAIN}_{CATEGORY}_{DETAIL}
Examples:
AUTH_TOKEN_EXPIRED -- Authentication > Token > Expired
ORDER_PAYMENT_DECLINED -- Order > Payment > Declined
USER_VALIDATION_EMAIL -- User > Validation > Email| Code | HTTP | Message | Client Action |
|---|---|---|---|
| AUTH_REQUIRED | 401 | Authentication is required | Redirect to login page |
| AUTH_TOKEN_EXPIRED | 401 | Token has expired | Attempt token refresh |
| AUTH_TOKEN_INVALID | 401 | Invalid token | Re-authenticate |
| AUTH_FORBIDDEN | 403 | You do not have permission for this action | Guide user to request permissions |
| AUTH_ACCOUNT_LOCKED | 403 | Account is locked. Please retry after 15 minutes | Display wait timer |
| AUTH_INVALID_CREDENTIALS | 401 | Invalid email or password | Prompt re-entry |
| Code | HTTP | Message | Field-Level Detail |
|---|---|---|---|
| VALIDATION_REQUIRED | 422 | Required field is missing | The {field} field is required |
| VALIDATION_FORMAT | 422 | Invalid format | Please enter a valid {type} |
| VALIDATION_RANGE | 422 | Value is out of range | Please enter a value between {min} and {max} |
| VALIDATION_UNIQUE | 409 | Value is already in use | This {field} is already registered |
| VALIDATION_LENGTH | 422 | Length limit exceeded | Please enter no more than {max} characters |
| Code | HTTP | Message |
|---|---|---|
| RESOURCE_NOT_FOUND | 404 | The requested resource was not found |
| RESOURCE_ALREADY_EXISTS | 409 | Resource already exists |
| RESOURCE_DELETED | 410 | Resource has been deleted |
| RESOURCE_LOCKED | 423 | Resource is locked |
| Code | HTTP | Message |
|---|---|---|
| RATE_LIMIT_EXCEEDED | 429 | Request limit exceeded. Please retry after {retryAfter} seconds |
| Code | HTTP | Message |
|---|---|---|
| SERVER_INTERNAL | 500 | A server error occurred. Please retry shortly |
| SERVER_MAINTENANCE | 503 | Service is under maintenance |
| SERVER_UPSTREAM | 502 | Failed to connect to an external service |
{
"error": {
"code": "AUTH_TOKEN_EXPIRED",
"message": "Token has expired",
"detail": "The access token has expired. Please refresh using your refresh token.",
"timestamp": "2025-03-15T09:30:00Z",
"requestId": "req_abc123def456",
"path": "/api/v1/users/me"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Input values are invalid",
"errors": [
{
"field": "email",
"code": "VALIDATION_FORMAT",
"message": "Please enter a valid email address",
"value": "invalid-email"
},
{
"field": "password",
"code": "VALIDATION_LENGTH",
"message": "Password must be at least 8 characters",
"constraint": { "min": 8 }
}
]
}
}| Don't | Do |
|---|---|
| "Error occurred" | "Failed to create the order" |
| "Invalid input" | "Price must be a number greater than 0" |
| "Server error: NullPointerException at..." | "A server error occurred. Please retry shortly" |
| "Access denied" | "You do not have permission to modify this order. Please contact an administrator" |
| "Duplicate key constraint violation" | "This email is already registered" |
{
"error": {
"code": "VALIDATION_REQUIRED",
"message": "Required field is missing",
"messageKey": "error.validation.required",
"params": { "field": "email" }
}
}| HTTP Status | Retryable? | Strategy |
|---|---|---|
| 408 | Yes | Retry immediately |
| 429 | Yes | Wait per Retry-After header |
| 500 | Yes (conditional) | Exponential backoff |
| 502, 503, 504 | Yes | Exponential backoff |
| 400, 401, 403, 404 | No | Client-side fix required |
| 409, 422 | No | Input correction required |
wait_time = min(baseDelay * 2^attempt + jitter, maxDelay)
Example: baseDelay=1s, maxDelay=30s
Attempt 1: 1s + random(0~500ms)
Attempt 2: 2s + random(0~500ms)
Attempt 3: 4s + random(0~500ms)
Attempt 4: 8s + random(0~500ms)
Maximum 3-5 attempts| Category | Test Case | Expected Code |
|---|---|---|
| No authentication | Request without Authorization header | 401 |
| Expired token | Request with expired JWT | 401 |
| No permission | Access another user's resource | 403 |
| Non-existent ID | Query with random UUID | 404 |
| Missing required field | Remove required field from body | 422 |
| Invalid format | "abc" in email field | 422 |
| Duplicate creation | POST same data twice | 409 |
| Bulk requests | Exceed Rate Limit | 429 |
| Malformed JSON | Send {invalid json | 400 |
| Empty body | Content-Length: 0 | 400 |
© revfactory, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in en/18-api-designer/.claude/skills/api-error-design of revfactory/harness-100.
Open the folder on GitHubat commit 8e8d35c
API Error Design Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| API Error Design Patterns this skillrevfactory/harness-100 | 1.3k | — | ~1.6k | Automated safety check: Pass | Apache-2.0 | |
| OpenAPI Spec Generationwshobson/agents | 40k | 9 repos | ~511 | Automated safety check: Pass | MIT | |
| Docs Interfacesjh941213/my-cc-harness | 126 | — | ~863 | Automated safety check: Notes | None | |
| Error Handlingericrisco/rsc-harness | 156 | — | ~3.2k | Automated safety check: Pass | MIT | |
| API DesignerJeffallan/claude-skills | 12k | 2 repos | ~2k | Automated safety check: Pass | MIT | |
| API Route Patternsbybren-llc/safe-agentic-workflow | 421 | — | ~1.6k | Automated safety check: Pass | MIT |
wshobson/agents
Create, validate and maintain OpenAPI 3.1 specs for REST APIs, whether designed first or generated from existing code, and use them for docs and client SDKs.
jh941213/my-cc-harness
Generate interface/API docs — OpenAPI 3.1/AsyncAPI 3.0 specs, API topology diagrams, interface flow (sequence) diagrams, API changelog.
ericrisco/rsc-harness
A skill your agent uses when designing the reaction to a class of failures — typed error taxonomies, retry/backoff/timeout policy, circuit breakers, React/Next error boundaries, and the user-message…
Jeffallan/claude-skills
Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.
bybren-llc/safe-agentic-workflow
API route implementation patterns with RLS, validation, and error handling. Use when creating API routes, implementing CRUD endpoints, adding server-side…
JMBeresford/retrom
Comprehensive Rust coding guidelines with 265 rules across 26 categories.
revfactory/harness-100
A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.
revfactory/harness-100
Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.
revfactory/harness-100
Methodology for systematically designing and generating CLI tool argument parser structures.
revfactory/harness-100
Audience segmentation skill used by the analyst and curator agents.
revfactory/harness-100
Audio storytelling skill used by the podcast scriptwriter and show note editor.
revfactory/harness-100
A systematic checklist generation engine for compliance audits.
Categories
Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice. This is a reference that the doc-writer and mock-tester agents of its harness consult when they document or test how an API fails. It proposes a hierarchical error code format built from a domain, a category and a detail, then supplies a catalog grouped by domain: authentication and authorization, validation, resource, rate limit and server errors.
API Error Design Patterns fits situations like: designing an error code scheme for a new REST API; writing an error reference page for the people who consume an API; planning error scenario tests that cover auth, validation and rate limit cases; drafting client-friendly error messages and retry guidance.
Run `npx skills add revfactory/harness-100 --skill api-error-design -a claude-code`. Or copy the skill folder (en/18-api-designer/.claude/skills/api-error-design in revfactory/harness-100) into .claude/skills/api-error-design in your project. Claude Code loads it when a task matches its description.
Run `npx skills add revfactory/harness-100 --skill api-error-design -a codex`. Or copy the skill folder (en/18-api-designer/.claude/skills/api-error-design in revfactory/harness-100) into .agents/skills/api-error-design in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add revfactory/harness-100 --skill api-error-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-error-design, .gemini/skills/api-error-design, .github/skills/api-error-design and .opencode/skills/api-error-design in your project.
Going by SKILL.md and its folder, API Error Design Patterns needs credentials named AUTH_INVALID_CREDENTIALS.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
API Error Design Patterns is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with API Error Design Patterns: OpenAPI Spec Generation (wshobson/agents, 40k stars), Docs Interfaces (jh941213/my-cc-harness, 126 stars), Error Handling (ericrisco/rsc-harness, 156 stars) and API Designer (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,290 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.
Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.