Agent skill

API Error Design

by revfactory in revfactory/harness-100

API 에러 설계 패턴. An agent skill from revfactory/harness-100.

Apache-2.0Auto-check passedBackend & APIs

Install API Error Design

skills CLI
$ npx skills add revfactory/harness-100 --skill api-error-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install revfactory/harness-100 api-error-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ko/18-api-designer/.claude/skills/api-error-design .claude/skills/api-error-design && rm -rf skills-src

Use ~/.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/

Facts

Skill name
api-error-design
GitHub stars
1.3k
Token cost
~1.1k tokens
SKILL.md length
426 words
Files
1
Skills in repo
464
Repo updated
First seen
Licence
Apache-2.0

At a glance

API 에러 설계 패턴. An agent skill from revfactory/harness-100.

  • Works in 3 steps: 무엇이 잘못됐는가 — 문제 설명 → 왜 잘못됐는가 — 원인/제약 조건 → 어떻게 해결하는가 — 구체적 액션
  • Backend & APIs work in your project
  • SKILL.md covers 대상 에이전트, 에러 코드 체계 설계, 에러 응답 구조 표준 and 에러 메시지 작성 원칙, plus 2 more sections
  • Needs AUTH_INVALID_CREDENTIALS

What it does

API Error Design is an agent skill from revfactory/harness-100. API 에러 설계 패턴. 에러 코드 체계, 에러 응답 구조, 클라이언트 친화적 에러 메시지, 에러 카탈로그 구축, retry/fallback 전략을 제공하는 doc-writer/mock-tester 확장 스킬. 'API 에러 설계', '에러 코드', '에러 응답', '에러 카탈로그', '에러 메시지', 'retry 전략' 등 API 에러 처리 체계 설계 시 사용한다. 단, 실제 에러 핸들링 코드 구현은 이 스킬의 범위가 아니다.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs. The licence is Apache-2.0.

When your agent uses it

  • Backend & APIs work in your project

Example prompts

  • “API 에러 설계”
  • “retry 전략”
  • “/api-error-design”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 무엇이 잘못됐는가 — 문제 설명
  2. 왜 잘못됐는가 — 원인/제약 조건
  3. 어떻게 해결하는가 — 구체적 액션

What it can do on your machine

Read from SKILL.md and the folder at commit 8e8d35c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    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.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AUTH_INVALID_CREDENTIALS

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Error Design loads about 1.1k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 426 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 426 words, ~1,129 tokens.

Download SKILL.mdSave it as .claude/skills/api-error-design/SKILL.md (or your agent's skills folder).
name
api-error-design
description
API 에러 설계 패턴. 에러 코드 체계, 에러 응답 구조, 클라이언트 친화적 에러 메시지, 에러 카탈로그 구축, retry/fallback 전략을 제공하는 doc-writer/mock-tester 확장 스킬. 'API 에러 설계', '에러 코드', '에러 응답', '에러 카탈로그', '에러 메시지', 'retry 전략' 등 API 에러 처리 체계 설계 시 사용한다. 단, 실제 에러 핸들링 코드 구현은 이 스킬의 범위가 아니다.

API Error Design — API 에러 설계 패턴

doc-writer와 mock-tester 에이전트가 API 에러 문서화 및 테스트 설계 시 활용하는 에러 체계, 메시지 설계, 복구 전략 레퍼런스.

대상 에이전트

  • doc-writer — 에러 레퍼런스 문서 작성에 적용
  • mock-tester — 에러 시나리오 테스트 설계에 적용

에러 코드 체계 설계

계층적 에러 코드 구조
{도메인}_{카테고리}_{상세}

예시:
AUTH_TOKEN_EXPIRED        -- 인증 > 토큰 > 만료
ORDER_PAYMENT_DECLINED    -- 주문 > 결제 > 거절
USER_VALIDATION_EMAIL     -- 사용자 > 유효성 > 이메일
도메인별 에러 코드 카탈로그
인증/인가 (AUTH)
코드HTTP메시지클라이언트 액션
AUTH_REQUIRED401인증이 필요합니다로그인 페이지로 이동
AUTH_TOKEN_EXPIRED401토큰이 만료되었습니다토큰 갱신 시도
AUTH_TOKEN_INVALID401유효하지 않은 토큰입니다재로그인
AUTH_FORBIDDEN403이 작업에 대한 권한이 없습니다권한 요청 안내
AUTH_ACCOUNT_LOCKED403계정이 잠겼습니다. 15분 후 재시도하세요대기 타이머 표시
AUTH_INVALID_CREDENTIALS401이메일 또는 비밀번호가 올바르지 않습니다재입력 유도
유효성 검증 (VALIDATION)
코드HTTP메시지필드별 상세
VALIDATION_REQUIRED422필수 필드가 누락되었습니다{field} 필드는 필수입니다
VALIDATION_FORMAT422형식이 올바르지 않습니다유효한 {type}을 입력하세요
VALIDATION_RANGE422범위를 벗어났습니다{min}~{max} 사이 값을 입력하세요
VALIDATION_UNIQUE409이미 사용 중인 값입니다이 {field}는 이미 등록되어 있습니다
VALIDATION_LENGTH422길이 제한을 초과했습니다{max}자 이내로 입력하세요
리소스 (RESOURCE)
코드HTTP메시지
RESOURCE_NOT_FOUND404요청한 리소스를 찾을 수 없습니다
RESOURCE_ALREADY_EXISTS409이미 존재하는 리소스입니다
RESOURCE_DELETED410삭제된 리소스입니다
RESOURCE_LOCKED423리소스가 잠겨 있습니다
Rate Limit
코드HTTP메시지
RATE_LIMIT_EXCEEDED429요청 한도를 초과했습니다. {retryAfter}초 후 재시도하세요
서버 (SERVER)
코드HTTP메시지
SERVER_INTERNAL500서버 오류가 발생했습니다. 잠시 후 재시도하세요
SERVER_MAINTENANCE503서비스 점검 중입니다
SERVER_UPSTREAM502외부 서비스 연결에 실패했습니다

에러 응답 구조 표준

기본 구조
json
{
  "error": {
    "code": "AUTH_TOKEN_EXPIRED",
    "message": "토큰이 만료되었습니다",
    "detail": "access token의 유효기간이 지났습니다. refresh token으로 갱신하세요.",
    "timestamp": "2025-03-15T09:30:00Z",
    "requestId": "req_abc123def456",
    "path": "/api/v1/users/me"
  }
}
유효성 검증 에러 (필드별)
json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "입력값이 올바르지 않습니다",
    "errors": [
      {
        "field": "email",
        "code": "VALIDATION_FORMAT",
        "message": "유효한 이메일 주소를 입력하세요",
        "value": "invalid-email"
      },
      {
        "field": "password",
        "code": "VALIDATION_LENGTH",
        "message": "비밀번호는 8자 이상이어야 합니다",
        "constraint": { "min": 8 }
      }
    ]
  }
}

에러 메시지 작성 원칙

좋은 에러 메시지의 3요소
  1. 무엇이 잘못됐는가 — 문제 설명
  2. 왜 잘못됐는가 — 원인/제약 조건
  3. 어떻게 해결하는가 — 구체적 액션
Show full SKILL.md (172 more words)Show less
Do / Don't
Don'tDo
"Error occurred""주문 생성에 실패했습니다"
"Invalid input""가격은 0보다 큰 숫자여야 합니다"
"Server error: NullPointerException at...""서버 오류가 발생했습니다. 잠시 후 재시도하세요"
"Access denied""이 주문을 수정할 권한이 없습니다. 관리자에게 문의하세요"
"Duplicate key constraint violation""이 이메일은 이미 등록되어 있습니다"
다국어 에러 메시지 구조
json
{
  "error": {
    "code": "VALIDATION_REQUIRED",
    "message": "필수 필드가 누락되었습니다",
    "messageKey": "error.validation.required",
    "params": { "field": "email" }
  }
}

Retry/Fallback 전략

Retry 가능 여부 판단
HTTP 상태Retry 가능?전략
408O즉시 재시도
429ORetry-After 헤더 대기 후
500O (조건부)지수 백오프
502, 503, 504O지수 백오프
400, 401, 403, 404X클라이언트 수정 필요
409, 422X입력값 수정 필요
지수 백오프 (Exponential Backoff)
대기시간 = min(baseDelay * 2^attempt + jitter, maxDelay)

예시: baseDelay=1초, maxDelay=30초
시도 1: 1초 + 랜덤(0~500ms)
시도 2: 2초 + 랜덤(0~500ms)
시도 3: 4초 + 랜덤(0~500ms)
시도 4: 8초 + 랜덤(0~500ms)
최대 3~5회 시도

에러 테스트 시나리오 매트릭스

카테고리테스트 케이스기대 코드
인증 없음Authorization 헤더 없이 요청401
만료 토큰만료된 JWT로 요청401
권한 없음다른 사용자 리소스 접근403
존재하지 않는 ID랜덤 UUID로 조회404
필수 필드 누락body에서 필수 필드 제거422
잘못된 형식이메일 필드에 "abc"422
중복 생성같은 데이터로 POST 2회409
대량 요청Rate Limit 초과429
잘못된 JSON{invalid json 전송400
빈 바디Content-Length: 0400

© 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

Files

Just SKILL.md in ko/18-api-designer/.claude/skills/api-error-design of revfactory/harness-100.

Open the folder on GitHubat commit 8e8d35c

Compare with similar skills

API Error Design 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.

API Error Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Error Design this skillrevfactory/harness-1001.3k—~1.1kAutomated safety check: PassApache-2.0
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Nestjs Best Practicesrolling-scopes/rsschool-app10k6 repos~1.2kAutomated safety check: PassMIT
Sub2API AdminWei-Shaw/sub2api43k1 repos~717Automated safety check: PassLGPL-3.0
Firecrawl Build Onboardingfirecrawl/firecrawl189k1 repos~1.4kAutomated safety check: NotesISC
Obsidian BasesAtmosphere/atmosphere3.8k22 repos~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Nestjs Best Practices

    rolling-scopes/rsschool-app

    NestJS best practices and architecture patterns for building production-ready applications.

    10k GitHub starsUsed in 6 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Sub2API Admin

    Wei-Shaw/sub2api

    Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

    43k GitHub starsUsed in 1 repo~717 tokens
    Backend & APIsAuto-check passed
  • Firecrawl Build Onboarding

    firecrawl/firecrawl

    Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.

    189k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check: notes
  • Obsidian Bases

    Atmosphere/atmosphere

    Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries.

    3.8k GitHub starsUsed in 22 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed

More from revfactory/harness-100

All 464 skills in this repo
  • Anti Bot Analyzer

    revfactory/harness-100

    A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.

    1.3k GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • API Error Design Patterns

    revfactory/harness-100

    Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed
  • API Security Checklist

    revfactory/harness-100

    Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check passed
  • Arg Parser Generator

    revfactory/harness-100

    Methodology for systematically designing and generating CLI tool argument parser structures.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Audience Segmentation

    revfactory/harness-100

    Audience segmentation skill used by the analyst and curator agents.

    1.3k GitHub stars~1.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Audio Storytelling

    revfactory/harness-100

    Audio storytelling skill used by the podcast scriptwriter and show note editor.

    1.3k GitHub stars~1.6k tokensUpdated 6 mo ago
    Auto-check passed

Categories

Questions about API Error Design

What does API Error Design do?

API 에러 설계 패턴. An agent skill from revfactory/harness-100. API Error Design is an agent skill from revfactory/harness-100. API 에러 설계 패턴.

When should I use API Error Design?

API Error Design fits situations like: backend & APIs work in your project.

How do I install API Error Design in Claude Code?

Run `npx skills add revfactory/harness-100 --skill api-error-design -a claude-code`. Or copy the skill folder (ko/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.

How do I install API Error Design in Codex?

Run `npx skills add revfactory/harness-100 --skill api-error-design -a codex`. Or copy the skill folder (ko/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.

Can I use API Error Design in Cursor, Gemini CLI or GitHub Copilot?

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.

What does API Error Design need to run?

Going by SKILL.md and its folder, API Error Design needs credentials named AUTH_INVALID_CREDENTIALS.

Does API Error Design access the network?

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.

Is API Error Design safe to install?

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.

What licence does API Error Design use?

API Error Design 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.

How many tokens does API Error Design use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Error Design?

Skills that share tags, products or a category with API Error Design: Configuring Horizon (coollabsio/coolify, 63k stars), Nestjs Best Practices (rolling-scopes/rsschool-app, 10k stars), Sub2API Admin (Wei-Shaw/sub2api, 43k stars) and Firecrawl Build Onboarding (firecrawl/firecrawl, 189k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Error Design?

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.