Skip to content
Back to skills

Design Api G Zenr Relay Api

ASecurity

Design API contracts before implementation — endpoints, models, status codes (Daniel Okoye's workflow)

  • 30 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 12, 2026
ai-agentspythonapifrontendsecurity

Works with

  • api

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill design-api-g-zenr-relay-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Api G Zenr Relay Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design Api G Zenr Relay Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-design-api-g-zenr-relay-api-claude-skill-registry-data/badge)](https://www.skillsdirectory.com/skills/majiayu000-design-api-g-zenr-relay-api-claude-skill-registry-data)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-api
description: Design API contracts before implementation — endpoints, models, status codes (Daniel Okoye's workflow)
disable-model-invocation: true
---

Design the API contract for: $ARGUMENTS

Design BEFORE implementing. This produces a specification that /add-endpoint or /add-feature will implement.

## Step 1 — Requirements
- What problem does this API solve?
- Who are the consumers? (frontend, mobile, external integrators, automation)
- What data flows in and out?
- What error conditions exist?

## Step 2 — Endpoint Design
For each endpoint, define:

```markdown
### `METHOD /api/<version>/<path>`
**Summary:** <one-line description>
**Auth:** Required / Public
**Request Body:**
```json
{
  "field": "type — description (constraints)"
}
```
**Response 200:**
```json
{
  "field": "type — description"
}
```
**Error Responses:**
| Status | Condition | Response |
|--------|-----------|----------|
| 401 | Missing/invalid API key | Uniform auth error message |
| 404 | Resource not found | Error response model |
| 422 | Validation error | Pydantic validation error |
| 503 | External resource unavailable | Error response model |
```

## Step 3 — Pydantic Models
Define request/response schemas:
```python
class FeatureRequest(BaseModel):
    field: type = Field(..., description="...", ge=0)

class FeatureResponse(BaseModel):
    field: type
```
- Explicit types on every field — no `Any`
- Constraints via `Field()` — `ge`, `le`, `min_length`, `pattern`
- Enum types for fixed value sets

## Step 4 — Route Organization
- Determine which router file (see Routers in project config, or new router?)
- Static routes MUST come before parameterized routes
- Version prefix per project conventions
- Consider path conflicts with existing routes

## Step 5 — Auth & Security
- Which endpoints modify state? → Require auth (auth-protected DI dependency)
- Which endpoints are read-only monitoring? → Consider public access (public DI dependency)
- What input validation is needed beyond Pydantic?
- Rate limiting implications?

## Step 6 — Backwards Compatibility
- Do any existing response shapes change? → Breaking change, needs versioning
- Do any existing endpoints move? → Redirect or deprecation needed
- Are new required fields added to existing requests? → Breaking change

## Output
Produce a complete API specification document that /add-endpoint or /add-feature can implement directly.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.