Install any skill in seconds. Free to start, no credit card required.
Get Started Free →API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.
.claude/skills/sickn33-api-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-21 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 18% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 71% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 18% | 0% |
| case-07 | ✓→✓ | = Same ✓ | 45% | 0% |
> API design decisions tied to the consumers and deployment constraints. > Learn to THINK, not copy fixed patterns.
Read ONLY files relevant to the request! Check the content map, find what you need.
| File | Description | When to Read | |------|-------------|--------------| | api-style.md | REST vs GraphQL vs tRPC decision tree | Choosing API type | | rest.md | Resource naming, HTTP methods, status codes | Designing REST API | | response.md | Envelope pattern, error format, pagination | Response structure | | graphql.md | Schema design, when to use, security | Considering GraphQL | | trpc.md | TypeScript monorepo, type safety | TS fullstack projects | | versioning.md | URI/Header/Query versioning | API evolution planning | | auth.md | JWT, OAuth, Passkey, API Keys | Auth pattern selection | | rate-limiting.md | Token bucket, sliding window | API protection | | documentation.md | OpenAPI/Swagger best practices | Documentation | | security-testing.md | OWASP API Top 10, auth/authz testing | Security audits |
| Need | Skill | |------|-------| | API implementation | @[skills/backend-architect] | | Data structure | @[skills/database-design] | | Security details | @[skills/api-security-best-practices] |
Before designing an API:
DON'T:
DO:
| Script | Purpose | Command | |--------|---------|---------| | scripts/api_validator.py | Local heuristic source scan (not schema validation) | python3 skills/api-patterns/scripts/api_validator.py <project_path> |
Use when defining a new endpoint contract, selecting REST/GraphQL/tRPC for known consumers, or changing pagination, errors, authentication or compatibility behavior. For a bug inside an existing contract, preserve that contract unless the task authorizes a change.
Record consumers and deployed versions, expected payload size, access rules, compatibility obligations and one concrete operation. Read the relevant files in the map, compare the realistic choices, then specify request/response examples and rejection cases. Types shared at build time do not ensure that independently deployed clients remain compatible.
Input: a public order list changes while clients page through it. Choose a bounded page size and cursor over a stable (created_at, id) order. Define the next-cursor format, authorization filter and behavior for a removed record or invalid cursor. Test two equal timestamps and an insertion between pages. Expected: no duplicate IDs within the promised snapshot semantics; document whether newly inserted rows can appear.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 40,688 | 53,625 | +32% | 1 | 1 | 0% | 7,619 | 4,913 | -36% | 0 | 0 | — |
case-02 | fail→fail | 46,636 | 28,316 | -39% | 1 | 1 | 0% | 7,212 | 6,260 | -13% | 0 | 0 | — |
case-03 | fail→fail | 63,980 | 6,553 | -90% | 1 | 1 | 0% | 200 | 1,099 | +450% | 0 | 0 | — |
case-04 | pass→pass | 12,008 | 10,995 | -8% | 1 | 1 | 0% | 2,313 | 2,735 | +18% | 0 | 0 | — |
case-05 | pass→pass | 10,576 | 13,521 | +28% | 1 | 1 | 0% | 2,126 | 3,631 | +71% | 0 | 0 | — |
case-06 | pass→pass | 14,283 | 13,294 | -7% | 1 | 1 | 0% | 2,914 | 3,453 | +18% | 0 | 0 | — |
case-07 | pass→pass | 10,239 | 38,555 | +277% | 1 | 1 | 0% | 1,517 | 2,194 | +45% | 0 | 0 | — |
case-08 | pass→pass | 12,896 | 7,865 | -39% | 1 | 1 | 0% | 2,011 | 2,057 | +2% | 0 | 0 | — |
case-09 | pass→pass | 18,147 | 17,025 | -6% | 1 | 1 | 0% | 2,546 | 3,127 | +23% | 0 | 0 | — |
case-10 | pass→pass | 10,309 | 42,429 | +312% | 1 | 1 | 0% | 1,848 | 2,195 | +19% | 0 | 0 | — |
case-11 | pass→pass | 14,813 | 11,533 | -22% | 1 | 1 | 0% | 2,495 | 2,483 | -0% | 0 | 0 | — |
case-12 | pass→pass | 11,979 | 13,772 | +15% | 1 | 1 | 0% | 2,005 | 2,768 | +38% | 0 | 0 | — |
case-13 | pass→pass | 13,827 | 16,375 | +18% | 1 | 1 | 0% | 2,200 | 3,208 | +46% | 0 | 0 | — |
case-14 | pass→pass | 14,296 | 11,252 | -21% | 1 | 1 | 0% | 2,045 | 2,528 | +24% | 0 | 0 | — |
case-15 | pass→pass | 17,375 | 15,614 | -10% | 1 | 1 | 0% | 2,680 | 3,193 | +19% | 0 | 0 | — |
case-16 | pass→pass | 14,092 | 14,864 | +5% | 1 | 1 | 0% | 2,178 | 2,873 | +32% | 0 | 0 | — |
case-17 | pass→pass | 13,061 | 10,759 | -18% | 1 | 1 | 0% | 2,040 | 2,411 | +18% | 0 | 0 | — |
case-18 | pass→pass | 13,173 | 12,109 | -8% | 1 | 1 | 0% | 1,765 | 2,380 | +35% | 0 | 0 | — |
case-19 | pass→pass | 12,816 | 12,073 | -6% | 1 | 1 | 0% | 2,019 | 2,880 | +43% | 0 | 0 | — |
case-20 | pass→pass | 14,250 | 14,266 | +0% | 1 | 1 | 0% | 1,838 | 2,852 | +55% | 0 | 0 | — |
case-21 | fail→pass | 10,318 | 2,657 | -74% | 1 | 1 | 0% | 1,442 | 1,071 | -26% | 0 | 0 | — |
case-22 | pass→pass | 10,073 | 8,478 | -16% | 1 | 1 | 0% | 1,562 | 1,899 | +22% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +5 percentage points is the difference between those two pass rates over the 21 comparable cases.
The publisher has shipped newer versions since this run, so these numbers describe v1, not the version currently listed.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.