api-documentation

API Documentation Skill

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-documentation" with this command: npx skills add hack23/homepage/hack23-homepage-api-documentation

API Documentation Skill

Purpose

Provides comprehensive API documentation that enables developers to quickly understand and integrate with APIs through clear examples, authentication guidance, and error handling.

Rules

OpenAPI/Swagger Specification

MUST USE OpenAPI 3.0+:

openapi: 3.0.0 info: title: Hack23 API version: 1.0.0 description: Cybersecurity services API contact: email: api@hack23.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html

servers:

paths: /users: get: summary: List users operationId: listUsers tags: [Users] security: - bearerAuth: [] parameters: - name: limit in: query schema: type: integer default: 20 responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/User' '401': $ref: '#/components/responses/Unauthorized'

components: schemas: User: type: object required: [id, email] properties: id: type: string format: uuid email: type: string format: email

securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT

API Reference Structure

MUST INCLUDE:

  1. Overview & Getting Started

    • What the API does
    • Base URL
    • Authentication
    • Rate limits
    • Quick start example
  2. Authentication

    • How to obtain credentials
    • How to authenticate requests
    • Token refresh process
    • Security best practices
  3. Endpoints

    • HTTP method and path
    • Description
    • Request parameters
    • Request body schema
    • Response schema
    • Error responses
    • Code examples
  4. Error Handling

    • Error code list
    • Error response format
    • Common errors
    • Troubleshooting
  5. SDKs & Libraries

    • Official SDK links
    • Community libraries
    • Code samples
  6. Changelog

    • Version history
    • Breaking changes
    • Migration guides

Code Examples

MUST PROVIDE examples in:

  • cURL

  • JavaScript/Node.js

  • Python

  • (Other popular languages as needed)

Example:

Create User

POST /users

Creates a new user account.

Request Body

{
  "email": "user@example.com",
  "name": "John Doe"
}

Example Request (cURL)

curl -X POST https://api.hack23.com/v1/users \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","name":"John Doe"}'

Example Request (JavaScript)

const response = await fetch('https://api.hack23.com/v1/users', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    email: 'user@example.com',
    name: 'John Doe'
  })
});
const user = await response.json();

Response (201 Created)

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "email": "user@example.com",
  "name": "John Doe",
  "createdAt": "2026-02-06T10:00:00Z"
}

### Error Documentation

**Standard Error Format:**
```json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid email format",
    "details": [
      {
        "field": "email",
        "message": "Must be a valid email address"
      }
    ],
    "requestId": "req_123456",
    "timestamp": "2026-02-06T10:00:00Z"
  }
}

Related Policies

- Secure Development SKILL

- Documentation Portfolio SKILL

Related Documentation

- simon-moon Agent

Tools

- Swagger UI

- ReDoc

- Postman

- Insomnia

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

product-documentation

No summary provided by upstream source.

Repository SourceNeeds Review
General

html-css-best-practices

No summary provided by upstream source.

Repository SourceNeeds Review
General

c4-modeling

No summary provided by upstream source.

Repository SourceNeeds Review
General

open-source

No summary provided by upstream source.

Repository SourceNeeds Review