202251239-cell/hermes-backup/api-design

Claude Code and agent skill by 202251239-cell/hermes-backup

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

REST API design: endpoints, auth, rate limiting.

Install

npx vskill@latest install 202251239-cell/hermes-backup/api-design

SKILL.md

The same SKILL.md was published earlier as 202251239-cell/hermes-backup/api-design.

REST API Design

Design clean, secure, and scalable REST APIs.

When to Use

  • Designing new API endpoints
  • Implementing authentication
  • Setting up rate limiting
  • Building RESTful services

Quick Reference

bash
# Test API
curl -X GET http://localhost:3000/api/resource
curl -X POST http://localhost:3000/api/resource -H 'Content-Type: application/json' -d '{"key":"value"}'
curl -X PUT http://localhost:3000/api/resource/1 -H 'Content-Type: application/json' -d '{"key":"new"}'
curl -X DELETE http://localhost:3000/api/resource/1

Endpoint Design

GET /api/resource # List all
GET /api/resource/:id # Get one
POST /api/resource # Create
PUT /api/resource/:id # Update
DELETE /api/resource/:id # Delete

Authentication

python
# JWT token auth
import jwt
from datetime import datetime, timedelta
def create_token(user_id):
payload = {
'user_id': user_id,
'exp': datetime.utcnow() + timedelta(hours=24)
}
return jwt.encode(payload, SECRET_KEY, algorithm='HS256')
def verify_token(token):
try:
return jwt.decode(token, SECRET_KEY, algorithms=['HS256'])
except jwt.ExpiredSignatureError:
return None

Rate Limiting

python
from functools import wraps
from time import time
def rate_limit(max_requests, window):
requests = []
def decorator(f):
@wraps(f)
def wrapper(*args, **kwargs):
now = time()
requests[:] = [r for r in requests if r > now - window]
if len(requests) >= max_requests:
return {'error': 'Rate limit exceeded'}, 429
requests.append(now)
return f(*args, **kwargs)
return wrapper
return decorator

Error Handling

python
# Standard error responses
{
'error': {
'code': 'VALIDATION_ERROR',
'message': 'Invalid input',
'details': {'field': 'email', 'issue': 'required'}
}
}

Best Practices

  1. Versioning — /api/v1/resource
  2. Pagination — ?page=1&limit=20
  3. Filtering — ?status=active&sort=created_at
  4. HATEOAS — include links for discoverability
  5. CORS — configure for browser access

Common Mistakes

  • Using verbs in URLs (/getUser → /users/:id)
  • No error handling
  • Missing rate limiting
  • Exposing internal IDs
  • No API versioning

Verification

bash
curl -I http://localhost:3000/api/health
# Should return 200 with proper headers

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/202251239-cell/hermes-backup/api-design/badge)](https://verified-skill.com/skills/202251239-cell/hermes-backup/api-design)

Something wrong with this skill or its page? Tell us.