Programming · Review & audit
ditz-api
/ditz-api
Use when designing or reviewing REST/GraphQL endpoints.
For whom
- Author
- tongkoljaafar-gif ↗
- Repository
- ditzzzai ↗
- Licence
- MIT
- Last repository change
- 29.10.2026
Assessment and security
96/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
Deprecation
No signals detected. Repository changed on 29.10.2026, without references to retired models or APIs.
Licence
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when designing or reviewing REST/GraphQL endpoints.
Original author description
Use when designing or reviewing REST/GraphQL endpoints.
How it works
- When to Use
- Desain
- Perubahan yang ngerusak (breaking)
- GraphQL
- Verifikasi
Original SKILL.md headings · 41 lines, 324 words
SKILL.md preview
---
name: ditz-api
description: Use when designing or reviewing REST/GraphQL endpoints.
version: 1.0.0
license: MIT
metadata:
hermes:
tags: [api, rest, graphql, contract]
related_skills: [ditz-backend, ditz-secure]
---
# ditz-api - Kontrak API yang Nggak Nyakitin Client
## When to Use
- Bikin endpoint baru atau ngubah bentuk response.
- Desain API buat fitur/modul baru.
- Review PR yang nyentuh route.
## Desain
1. **Resource, bukan aksi.** `POST /orders`, `GET /orders/:id`, `PATCH /orders/:id`. Bukan `POST /createOrder`. Aksi non-CRUD yang jelas: `POST /orders/:id/cancel`.
2. **Noun plural, kebab-case.** `/users/:id/payment-methods`.
3. **Method = makna:** GET idempoten & tanpa efek, POST bikin, PUT ganti utuh, PATCH ubah sebagian, DELETE hapus. Jangan GET yang ngubah state.
4. **Status code jujur.** 400 bentuk/validasi, 401 auth, 403 forbidden, 404 nggak ada, 409 konflik, 422 semantik, 429 limit, 500 server. 2xx tanpa body → 204.
5. **Bentuk error seragam:**
```json
{ "error": { "code": "email_taken", "message": "Email sudah dipakai", "fields": {"email": "harus unik"} } }
```
`code` stabil buat dimachine, `message` buat manusia.
6. **Naming field:** satu style di seluruh API. Waktu ISO-8601 UTC. Uang integer sen + `currency`.
7. **Pagination seragam:** `?limit=&cursor=` + `{data, nextCursor}`. Jangan campur offset & cursor di API yang sama.
8. **Idempotency key** buat POST yang bisa dobel (payment, invite, webhook).
9. **Versioning:** `/v1` di path kalau publik. Perubahan yang ngerusak kontrak = versi baru, bukan silent change.
10. **Nggak bocorin internal:** PK database autoincrement buat publik → pakai UUID/slug kalau bisa ditebak. Stack trace/SQL nggak pernah ke client.
## Perubahan yang ngerusak (breaking)
- Rename/remove field, ubah tipe, ubah status code, nambah field required, ubah arti field, ubah auth.
Aman: nambah field opsional, nambah endpoint, deprecate sambil tetap jalan (header `Deprecation` + tanggal).
## GraphQL
- Batasi kedalaman & kompleksitas query (DoS), pakai DataLoader buat hindari N+1.
- Authorization per resolver, bukan cuma di root.
- Nggak ada field sensitif tanpa guard (email privat, token).
## Verifikasi
- `curl -i` happy path + satu error path per endpoint.
- Kalau ada OpenAPI: validasi spec (`npx @redocly/cli lint` atau swagger-cli) dan pastikan response nyata cocok sama schema.
- Cek breaking change kalau ngubah spec lama.
Versions
The database has no other skills named ditz-api.
Database snapshot: 13.11.2026 · package version ee5bcafceac8 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100designing-apis
Designs REST and GraphQL APIs including endpoints, error handling, versioning, and documentation. Use when creating new APIs, designing endpoints, reviewing API contracts, or when asked about REST, GraphQL, or API patterns. - 96ditz-review
Use when reviewing a diff or PR before merge or delivery. - 100create-api-design
Design a REST or GraphQL API from a feature specification when the user asks to design an API, create endpoints, define an API contract, or plan API resources - 86ditz-router
Use to pick which ditz-* engineering skill fits the task. - 100design-api
Design REST and GraphQL APIs: naming, versioning, error shapes, auth. Use when "design an API", "create endpoints", "REST vs GraphQL", or "API contract". - 100uw-analyze-api
Use when analyzing REST/GraphQL API endpoints, contracts, authentication, and client-facing interfaces