[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EVRF46T16935GX3787D9NX":3,"skill-same:01M7EVRF46T16935GX3787D9NX":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EVRF46T16935GX3787D9NX","rest-api-pro",null,"REST API design guidance — resource modeling, versioning, pagination, auth, error formats, and documentation.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-rest-api-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: rest-api-pro\ndescription: REST API design guidance — resource modeling, versioning, pagination, auth, error formats, and documentation.\ncategory: development\n---\n\n## Overview\n\nREST remains the default style for public and internal HTTP APIs because its constraints — resources, uniform interface, statelessness — produce APIs that are predictable, cacheable, and easy to debug. Good REST design is mostly discipline: nouns not verbs, consistent shapes, and honest status codes. This skill covers designing REST APIs that age well, from resource modeling to versioning strategy to the operational details (idempotency, rate limiting) that separate toy APIs from production ones.\n\n## When to use\n\n- Designing a new REST API's resources and endpoints.\n- Reviewing an existing API for consistency and usability.\n- Choosing versioning, pagination, and error-format strategies.\n- Adding auth, rate limiting, and idempotency to an API.\n- Writing API documentation (OpenAPI) developers actually enjoy.\n- Deciding between REST, GraphQL, gRPC, and tRPC.\n- Evolving an API without breaking clients.\n\n## Core concepts\n\n- **Resources, not actions.** URLs name nouns (`\u002Forders\u002F123`), HTTP methods name the operation (`GET\u002FPOST\u002FPUT\u002FPATCH\u002FDELETE`). RPC-style verbs in URLs (`\u002FgetOrder`) signal a design that will sprawl; model the occasional true action as a sub-resource (`POST \u002Forders\u002F123\u002Fcancel`).\n- **Status codes mean something.** `200\u002F201\u002F204` for success, `400` for client errors, `401` vs `403` (unauthenticated vs unauthorized), `404` for missing resources, `409` for conflicts, `422` for semantic validation failures, `429` for rate limits, `5xx` only when the server is at fault. Clients program against these — be consistent.\n- **Consistent envelopes.** Pick one response shape and use it everywhere: data fields, error objects with machine-readable `code`s, and pagination metadata. Inconsistency across endpoints is the top API usability complaint.\n- **Pagination for every list.** Cursor-based for large\u002Fchanging datasets, offset acceptable for small stable ones. Always include total counts or page info, default limits, and max page sizes — unbounded lists are a DoS vector.\n- **Versioning strategy.** URL versioning (`\u002Fv1\u002F`) is the most explicit and debuggable; header versioning is purer but harder to use. Whatever you choose, never break a shipped version — deprecate with `Sunset` headers and advance notice.\n- **Idempotency.** `POST` retries (network failures, client timeouts) must not double-create. Accept `Idempotency-Key` headers on mutating endpoints; store key→result and replay it.\n- **Filtering, sorting, sparse fieldsets.** Standardize query params (`?status=paid&sort=-created_at&fields=id,total`) so clients can be efficient without a dozen custom endpoints.\n- **HATEOAS, pragmatically.** Full hypermedia is overkill for most APIs, but including `links` (self, related actions) in responses guides clients and eases evolution.\n- **OpenAPI as contract.** Write or generate an OpenAPI spec and treat it as the source of truth: generate clients, validate requests\u002Fresponses in tests, and publish interactive docs from it.\n- **Rate limiting and quotas.** Token bucket per API key\u002Fprincipal; return `429` with `Retry-After`; communicate limits in headers (`X-RateLimit-*`) and docs. Design for fair use before abuse forces it.\n- **Caching semantics.** `ETag`\u002F`Last-Modified` with conditional requests, `Cache-Control` headers, and cacheable `GET`s — HTTP caching is free performance most APIs ignore.\n- **Content negotiation.** `Accept`\u002F`Content-Type` headers for multiple representations (JSON default, CSV export via `Accept: text\u002Fcsv`) — one endpoint, several formats, no URL sprawl.\n- **Webhooks.** For event delivery, design webhook contracts like APIs: signed payloads, retries with backoff, idempotency on receipt, and a delivery log for debugging.\n\n## Practical workflow\n\n1. **Model resources.** List the domain nouns, their relationships, and lifecycle actions; sketch the URL tree before writing code. Keep nesting shallow (max 2-3 levels).\n   ```\n   GET    \u002Fv1\u002Forders?status=paid&sort=-created_at\n   POST   \u002Fv1\u002Forders            (Idempotency-Key header)\n   GET    \u002Fv1\u002Forders\u002F{id}\n   PATCH  \u002Fv1\u002Forders\u002F{id}\n   POST   \u002Fv1\u002Forders\u002F{id}\u002Fcancel\n   ```\n2. **Define the contract.** Write the OpenAPI spec (or generate from code annotations); standardize the error shape across all endpoints:\n   ```json\n   { \"error\": { \"code\": \"order_already_paid\", \"message\": \"Order 123 is already paid.\", \"details\": {} } }\n   ```\n3. **Implement consistently.** Shared middleware for auth, request IDs, logging, error mapping; validate input at the boundary (schemas\u002FDTOs); never leak stack traces or DB errors.\n4. **Add idempotency.** `Idempotency-Key` on POST\u002Funsafe endpoints; persist key + request fingerprint + response; return the stored response on replay with the same key.\n   ```python\n   # idempotency middleware sketch\n   key = request.headers.get(\"Idempotency-Key\")\n   if key and (cached := store.get(key)):\n       return replay(cached)  # same status + body as the first call\n   response = await handler(request)\n   if key:\n       store.set(key, response, ttl=24 * 3600)\n   ```\n5. **Paginate and filter.** Cursor pagination for feeds, offset for admin lists; standardize filter\u002Fsort\u002Ffield-selection params; cap page sizes.\n6. **Secure it.** Auth (API keys, OAuth2, JWT) on every non-public route; authorization checks per resource (ownership, roles); rate limiting per principal; CORS locked to known origins.\n7. **Document for humans.** Interactive docs from the OpenAPI spec, runnable examples, auth guide, error-code catalog, and a changelog per version. Docs are a feature — stale docs are a bug.\n8. **Evolve safely.** Additive changes freely; deprecate with headers and timelines; monitor usage of deprecated fields\u002Fendpoints before removal; never repurpose a field's meaning.\n\n## Common pitfalls\n\n- **Verbs in URLs** (`\u002Fapi\u002FgetUsers`) — RPC creep that destroys predictability; model resources and use HTTP methods.\n- **Wrong status codes** — `200` with an error body, or `500` for validation failures; clients can't program against lies.\n- **Unpaginated list endpoints** — fine at 100 rows, an outage at 10 million; paginate from day one.\n- **No idempotency on POST** — retried requests double-charging customers; require idempotency keys on money-moving endpoints.\n- **Breaking changes in minor versions** — renaming fields or changing semantics without a version bump; additive-only within a version.\n- **Inconsistent error shapes** — every endpoint inventing its own error format; standardize one envelope.\n- **Leaking internals** — stack traces, SQL, and internal IDs in responses; map to safe, documented errors.\n- **`401` vs `403` confusion** — unauthenticated (log in) vs unauthorized (no permission); clients handle them differently.\n- **Ignoring caching headers** — every GET hitting origin; `ETag` + conditional requests are nearly free.\n- **No rate limiting until abuse** — designing limits after an incident; ship with sane defaults and per-key quotas.\n- **PUT vs PATCH confusion** — using PUT for partial updates and wiping unset fields; PUT replaces, PATCH merges — document and enforce the difference.\n- **No request IDs** — undebuggable failures across services; generate and propagate `X-Request-Id` on every request.\n- **Webhooks without signatures** — receivers can't verify authenticity; sign every payload and document verification.\n- **Actions as query params** (`POST \u002Forders?cancel=true`) — hidden RPC; model actions as sub-resources instead.\n","## Overview\n\nREST remains the default style for public and internal HTTP APIs because its constraints — resources, uniform interface, statelessness — produce APIs that are predictable, cacheable, and easy to debug. Good REST design is mostly discipline: nouns not verbs, consistent shapes, and honest status codes. This skill covers designing REST APIs that age well, from resource modeling to versioning strategy to the operational details (idempotency, rate limiting) that separate toy APIs from production ones.\n\n## When to use\n\n- Designing a new REST API's resources and endpoints.\n- Reviewing an existing API for consistency and usability.\n- Choosing versioning, pagination, and error-format strategies.\n- Adding auth, rate limiting, and idempotency to an API.\n- Writing API documentation (OpenAPI) developers actually enjoy.\n- Deciding between REST, GraphQL, gRPC, and tRPC.\n- Evolving an API without breaking clients.\n\n## Core concepts\n\n- **Resources, not actions.** URLs name nouns (`\u002Forders\u002F123`), HTTP methods name the operation (`GET\u002FPOST\u002FPUT\u002FPATCH\u002FDELETE`). RPC-style verbs in URLs (`\u002FgetOrder`) signal a design that will sprawl; model the occasional true action as a sub-resource (`POST \u002Forders\u002F123\u002Fcancel`).\n- **Status codes mean something.** `200\u002F201\u002F204` for success, `400` for client errors, `401` vs `403` (unauthenticated vs unauthorized), `404` for missing resources, `409` for conflicts, `422` for semantic validation failures, `429` for rate limits, `5xx` only when the server is at fault. Clients program against these — be consistent.\n- **Consistent envelopes.** Pick one response shape and use it everywhere: data fields, error objects with machine-readable `code`s, and pagination metadata. Inconsistency across endpoints is the top API usability complaint.\n- **Pagination for every list.** Cursor-based for large\u002Fchanging datasets, offset acceptable for small stable ones. Always include total counts or page info, default limits, and max page sizes — unbounded lists are a DoS vector.\n- **Versioning strategy.** URL versioning (`\u002Fv1\u002F`) is the most explicit and debuggable; header versioning is purer but harder to use. Whatever you choose, never break a shipped version — deprecate with `Sunset` headers and advance notice.\n- **Idempotency.** `POST` retries (network failures, client timeouts) must not double-create. Accept `Idempotency-Key` headers on mutating endpoints; store key→result and replay it.\n- **Filtering, sorting, sparse fieldsets.** Standardize query params (`?status=paid&sort=-created_at&fields=id,total`) so clients can be efficient without a dozen custom endpoints.\n- **HATEOAS, pragmatically.** Full hypermedia is overkill for most APIs, but including `links` (self, related actions) in responses guides clients and eases evolution.\n- **OpenAPI as contract.** Write or generate an OpenAPI spec and treat it as the source of truth: generate clients, validate requests\u002Fresponses in tests, and publish interactive docs from it.\n- **Rate limiting and quotas.** Token bucket per API key\u002Fprincipal; return `429` with `Retry-After`; communicate limits in headers (`X-RateLimit-*`) and docs. Design for fair use before abuse forces it.\n- **Caching semantics.** `ETag`\u002F`Last-Modified` with conditional requests, `Cache-Control` headers, and cacheable `GET`s — HTTP caching is free performance most APIs ignore.\n- **Content negotiation.** `Accept`\u002F`Content-Type` headers for multiple representations (JSON default, CSV export via `Accept: text\u002Fcsv`) — one endpoint, several formats, no URL sprawl.\n- **Webhooks.** For event delivery, design webhook contracts like APIs: signed payloads, retries with backoff, idempotency on receipt, and a delivery log for debugging.\n\n## Practical workflow\n\n1. **Model resources.** List the domain nouns, their relationships, and lifecycle actions; sketch the URL tree before writing code. Keep nesting shallow (max 2-3 levels).\n   ```\n   GET    \u002Fv1\u002Forders?status=paid&sort=-created_at\n   POST   \u002Fv1\u002Forders            (Idempotency-Key header)\n   GET    \u002Fv1\u002Forders\u002F{id}\n   PATCH  \u002Fv1\u002Forders\u002F{id}\n   POST   \u002Fv1\u002Forders\u002F{id}\u002Fcancel\n   ```\n2. **Define the contract.** Write the OpenAPI spec (or generate from code annotations); standardize the error shape across all endpoints:\n   ```json\n   { \"error\": { \"code\": \"order_already_paid\", \"message\": \"Order 123 is already paid.\", \"details\": {} } }\n   ```\n3. **Implement consistently.** Shared middleware for auth, request IDs, logging, error mapping; validate input at the boundary (schemas\u002FDTOs); never leak stack traces or DB errors.\n4. **Add idempotency.** `Idempotency-Key` on POST\u002Funsafe endpoints; persist key + request fingerprint + response; return the stored response on replay with the same key.\n   ```python\n   # idempotency middleware sketch\n   key = request.headers.get(\"Idempotency-Key\")\n   if key and (cached := store.get(key)):\n       return replay(cached)  # same status + body as the first call\n   response = await handler(request)\n   if key:\n       store.set(key, response, ttl=24 * 3600)\n   ```\n5. **Paginate and filter.** Cursor pagination for feeds, offset for admin lists; standardize filter\u002Fsort\u002Ffield-selection params; cap page sizes.\n6. **Secure it.** Auth (API keys, OAuth2, JWT) on every non-public route; authorization checks per resource (ownership, roles); rate limiting per principal; CORS locked to known origins.\n7. **Document for humans.** Interactive docs from the OpenAPI spec, runnable examples, auth guide, error-code catalog, and a changelog per version. Docs are a feature — stale docs are a bug.\n8. **Evolve safely.** Additive changes freely; deprecate with headers and timelines; monitor usage of deprecated fields\u002Fendpoints before removal; never repurpose a field's meaning.\n\n## Common pitfalls\n\n- **Verbs in URLs** (`\u002Fapi\u002FgetUsers`) — RPC creep that destroys predictability; model resources and use HTTP methods.\n- **Wrong status codes** — `200` with an error body, or `500` for validation failures; clients can't program against lies.\n- **Unpaginated list endpoints** — fine at 100 rows, an outage at 10 million; paginate from day one.\n- **No idempotency on POST** — retried requests double-charging customers; require idempotency keys on money-moving endpoints.\n- **Breaking changes in minor versions** — renaming fields or changing semantics without a version bump; additive-only within a version.\n- **Inconsistent error shapes** — every endpoint inventing its own error format; standardize one envelope.\n- **Leaking internals** — stack traces, SQL, and internal IDs in responses; map to safe, documented errors.\n- **`401` vs `403` confusion** — unauthenticated (log in) vs unauthorized (no permission); clients handle them differently.\n- **Ignoring caching headers** — every GET hitting origin; `ETag` + conditional requests are nearly free.\n- **No rate limiting until abuse** — designing limits after an incident; ship with sane defaults and per-key quotas.\n- **PUT vs PATCH confusion** — using PUT for partial updates and wiping unset fields; PUT replaces, PATCH merges — document and enforce the difference.\n- **No request IDs** — undebuggable failures across services; generate and propagate `X-Request-Id` on every request.\n- **Webhooks without signatures** — receivers can't verify authenticity; sign every payload and document verification.\n- **Actions as query params** (`POST \u002Forders?cancel=true`) — hidden RPC; model actions as sub-resources instead.\n",{"name":5,"category":24,"description":7},"development","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-rest-api-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill rest-api-pro",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill rest-api-pro",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill rest-api-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-rest-api-pro\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]