/openlogos:api-designerfrom openlogos
Designs OpenAPI 3.0+ YAML specifications from scenario sequence diagrams, ensuring every endpoint is traceable to a scenario step. Useful when scenario diagrams exist but API specs are missing.
Ships in openlogos. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Design OpenAPI 3.0+ YAML specifications based on sequence diagrams, letting APIs emerge naturally from scenarios rather than being defined in isolation. Every endpoint is traceable to a Step number in the sequence diagrams, ensuring "no scenario, no API design."
logos/resources/prd/3-technical-plan/2-scenario-implementation/ contains scenario sequence diagramslogos/resources/prd/3-technical-plan/1-architecture/ contains the architecture overview (confirming frontend-backend separation approach, authentication scheme, etc.)tech_stack in logos-project.yaml is filled inIf the sequence diagram directory is empty, prompt the user to complete Phase 3 Step 1 (scenario-architect) first.
Read the following files to establish complete context:
logos/resources/prd/3-technical-plan/2-scenario-implementation/): Extract all cross-system-boundary arrowslogos/resources/prd/3-technical-plan/1-architecture/): Confirm authentication scheme, frontend-backend separation approach, API gateway, etc.logos-project.yaml: Read tech_stack to confirm backend framework and deployment approachTraverse all scenario sequence diagrams and collect every cross-system-boundary call arrow:
POST /api/auth/login may appear in both S02 and S03)Identified N API endpoints from sequence diagrams:
| # | Method | Path | Source Scenario | Domain |
|---|--------|------|-----------------|--------|
| 1 | POST | /api/auth/register | S01 Step 2 | auth |
| 2 | POST | /api/auth/login | S02 Step 1 | auth |
| 3 | GET | /api/projects | S04 Step 1 | projects |
Group endpoints by business domain, with each group corresponding to a YAML file:
auth.yaml — Authentication-related (registration, login, logout, password reset)projects.yaml — CRUD for core business entitiesbilling.yaml — Payment and subscriptionsGrouping principles:
Before generating specific endpoints, establish global conventions:
Authentication scheme (read from architecture overview):
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
Unified error response:
components:
schemas:
ErrorResponse:
type: object
required: [code, message]
properties:
code:
type: string
description: Machine-readable error code (e.g., EMAIL_EXISTS)
message:
type: string
description: Human-readable error description
details:
type: object
description: Additional error information (e.g., field-level validation errors)
Pagination parameters (applicable to list endpoints):
parameters:
- name: page
in: query
schema: { type: integer, minimum: 1, default: 1 }
- name: per_page
in: query
schema: { type: integer, minimum: 1, maximum: 100, default: 20 }
Design a complete OpenAPI specification for each endpoint, output by domain, pausing after each domain for user review:
Each endpoint must include:
operationId: Unique identifier for code generationsummary: One-sentence descriptiondescription: Annotate the source sequence diagram step (e.g., Source: S01 Step 2 → Step 3)requestBody: Schema including all fields (with required, types, validation rules such as minLength/format)responses: Cover the normal response + all known exceptions (extracted from EX use cases in sequence diagrams)Example:
paths:
/api/auth/register:
post:
operationId: register
summary: User registration
description: "Source: S01 Step 2 → Step 3"
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [email, password]
properties:
email: { type: string, format: email }
password: { type: string, minLength: 8 }
responses:
'201':
description: Registration successful, verification email sent
content:
application/json:
schema:
type: object
properties:
userId: { type: string, format: uuid }
message: { type: string }
'409':
description: "Email already registered (EX-2.1)"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Request parameter validation failed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
After output is complete, perform a traceability check:
description annotates the source StepIf gaps are found, supplement them before outputting the final version.
logos/resources/api/auth.yaml, projects.yaml, billing.yamlopenapi, info, paths, and components sections$ref: '#/components/schemas/ErrorResponse'description must annotate the source sequence diagram stepYAML is whitespace- and character-sensitive. AI-generated YAML frequently breaks due to unquoted special characters. Strictly follow these rules:
description and summary values — any string containing :, →, #, &, *, !, >, |, %, @, `, {, }, [, or ] MUST be wrapped in "...".
# ❌ WRONG — colon + arrow breaks YAML parsing
description: Source: S05 Step 1 → Step 4.
# ✅ CORRECT
description: "Source: S05 Step 1 → Step 4."
'201' not 201 to prevent YAML interpreting them as integers.description fields that reference scenario steps (they always contain :)./api/{resource}/api/auth/register); add /api/v2/ when versioning becomes necessaryThe following prompts can be copied directly for use with the AI:
Help me design APIsGenerate OpenAPI YAML based on the sequence diagramsHelp me design the API specifications related to S01Help me extract all cross-system calls from the sequence diagrams into APIsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
api-design, openapi, sequence-diagrams, endpoint-inventory, yaml-spec
npx claudepluginhub miniidealab/openlogos --plugin openlogos16 skills in this plugin
/architecture-designerDesign technical architecture and select technology stack. Use when product design exists in logos/resources/prd/2-product-design/ but logos/resources/prd/3-technical-plan/1-architecture/ is empty./change-writerWrite change proposals with impact analysis following OpenLogos delta workflow. Use when the project lifecycle is active and source code or methodology documents need modification./code-implementorGenerate business code and test code based on the full specification chain (sequence diagrams, API YAML, DB DDL, test case specs). Use when test cases exist in logos/resources/test/ but logos/resources/implementation/ is empty.Other plugins' skills for the same job