apilisted
Install: claude install-skill arbazkhan971/godmode
# API — Design & Specification
## Activate When
- User invokes `/godmode:api`
- User says "design an API", "create API spec", "write API docs"
- User says "validate my API", "is this API well-designed?"
- When building a new service or microservice that exposes endpoints
- When `/godmode:plan` identifies API-related tasks
- When `/godmode:review` flags API design issues
- User says "add an endpoint", "api endpoint", "add api endpoint"
## Workflow
### Step 1: Discovery & Context
Understand what the API needs to do before designing anything:
```
API DISCOVERY:
Project: <name and purpose>
Type: REST | GraphQL | gRPC | Hybrid
Consumers: <who will call this API — frontend, mobile, third-party, internal services>
Scale: <expected request volume — RPS, concurrent users>
Auth model: <API key, OAuth2, JWT, mTLS, none>
Existing APIs: <list any existing endpoints for consistency>
Constraints: <backward compatibility, regulatory, latency SLAs>
```
If the user hasn't specified, ask: "What kind of API are we designing? Who will consume it?"
### Step 2: Resource Modeling
Identify the core resources and their relationships:
```
RESOURCE MODEL:
Resource: <Name>
Description: <what it represents>
Attributes:
- id: string (UUID v4)
- <field>: <type> (<constraints>)
- <field>: <type> (<constraints>)
- created_at: datetime (ISO 8601)
- updated_at: datetime (ISO 8601)
Relationships:
- belongs_to: <Resource> (via <foreign_key>)
- has_many: <Resource>
...
```
Rules:
- Us