agentsclimarketplace

Rest patterns

Skill bg-szy/TOP-SKILLS/skills/marketplace/rest-patterns

Quick reference for RESTful API design patterns, HTTP semantics, caching, and rate limiting. Triggers on: rest api, http methods, status codes, api design, endpoint design, api versioning, rate limiting, caching headers.From its SKILL.md

Install
npx -y skills add bg-szy/TOP-SKILLS --skill rest-patterns

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.9 KB, 694 tokens by cl100k_base, as published. Nobody here has run it

REST Patterns

Quick reference for RESTful API design patterns and HTTP semantics.

HTTP Methods

MethodPurposeIdempotentCacheable
GETRetrieve resource(s)YesYes
POSTCreate new resourceNoNo
PUTReplace entire resourceYesNo
PATCHPartial updateMaybeNo
DELETERemove resourceYesNo

Essential Status Codes

CodeNameUse
200OKSuccess with body
201CreatedPOST success (add Location header)
204No ContentSuccess, no body
400Bad RequestInvalid syntax
401UnauthorizedNot authenticated
403ForbiddenNot authorized
404Not FoundResource doesn't exist
422UnprocessableValidation error
429Too Many RequestsRate limited
500Server ErrorInternal failure

Resource Design

GET    /users              # List
POST   /users              # Create
GET    /users/{id}         # Get one
PUT    /users/{id}         # Replace
PATCH  /users/{id}         # Update
DELETE /users/{id}         # Delete

# Query parameters
GET /users?page=2&limit=20          # Pagination
GET /users?sort=created_at:desc     # Sorting
GET /users?role=admin               # Filtering

Security Checklist

  • HTTPS/TLS only
  • OAuth 2.0 or JWT for auth
  • Validate all inputs
  • Rate limit per client
  • CORS headers configured
  • No sensitive data in URLs
  • Use no-store for sensitive responses

Common Mistakes

MistakeFix
Verbs in URLs/getUsers/users
Deep nestingFlatten or use query params
200 for errorsUse proper 4xx/5xx
No paginationAlways paginate collections
Missing rate limitsProtect against abuse

Quick Reference

TaskPattern
Paginate?page=2&limit=20
Sort?sort=field:asc
Filter?status=active
Sparse fields?fields=id,name
Include related?include=orders

When to Use

  • Designing new API endpoints
  • Choosing HTTP methods and status codes
  • Implementing caching headers
  • Setting up rate limiting
  • Structuring error responses

Additional Resources

For detailed patterns, load:

  • ./references/status-codes.md - Complete status code reference with examples
  • ./references/caching-patterns.md - Cache-Control, ETag, CDN patterns
  • ./references/rate-limiting.md - Rate limiting strategies and headers
  • ./references/response-formats.md - Errors, versioning, bulk ops, HATEOAS

What ships with it: 1 file

34.5 KB alongside SKILL.md

Keep looking

Skills are one crate of 326,851. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.