api-design

This skill provides comprehensive guidance for designing RESTful APIs following industry best practices.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "api-design" with this command: npx skills add leavesfly/jimi/leavesfly-jimi-api-design

API Design Skill

This skill provides comprehensive guidance for designing RESTful APIs following industry best practices.

Core Principles

  1. Resource-Oriented Design
  • Use nouns for resource names (e.g., /users , /products )

  • Avoid verbs in URLs

  • Use HTTP methods to represent actions

  1. HTTP Methods
  • GET: Retrieve resources

  • POST: Create new resources

  • PUT: Update entire resources

  • PATCH: Partial updates

  • DELETE: Remove resources

  1. URL Structure

GET /api/v1/users - List all users GET /api/v1/users/{id} - Get specific user POST /api/v1/users - Create new user PUT /api/v1/users/{id} - Update user DELETE /api/v1/users/{id} - Delete user

  1. Response Format
  • Use JSON as default format

  • Use camelCase for field names

  • Include metadata (pagination, timestamps)

  1. Error Handling

{ "error": { "code": "INVALID_REQUEST", "message": "User ID must be a positive integer", "details": [] } }

  1. Status Codes
  • 200: Success

  • 201: Created

  • 400: Bad Request

  • 401: Unauthorized

  • 404: Not Found

  • 500: Internal Server Error

Best Practices

  • Version your APIs

  • Use pagination for list endpoints

  • Implement rate limiting

  • Document with OpenAPI/Swagger

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

java-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

docker-setup

No summary provided by upstream source.

Repository SourceNeeds Review
General

database-design

No summary provided by upstream source.

Repository SourceNeeds Review
General

git-commit-guide

No summary provided by upstream source.

Repository SourceNeeds Review