api-designer

A guide for turning user scenarios into an OpenAPI 3 specification, a standard document describing how a web API works.

In plain words
What is it for?
It helps list and combine API calls, define paths, inputs, outputs, errors, authentication, pagination, sorting, and filtering.
Why use it?
It prevents API endpoints from being invented without a clear use case and keeps each endpoint connected to a scenario step.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/miniidealab/openlogos/api-designer
Any agent
npx skills add miniidealab/openlogos --skill api-designer
Clone the repo
git clone --depth 1 https://github.com/miniidealab/openlogos

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,380 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02380
Opus 5 $0.00000 $0.01190
Sonnet 5 $0.00000 $0.00476
Haiku 4.5 $0.00000 $0.00238

Measured 2d ago against content hash e29b80cf362b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-designer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/flowtask/logos/skills/api-designer/SKILL.md · 226 lines

How it starts

The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: API Designer

基于时序图设计 OpenAPI 3.0+ YAML 规格,让 API 从场景中自然浮现而非凭空定义。每个端点可追溯到时序图的 Step 编号,确保"无场景不设计 API"。

触发条件

  • 用户要求设计 API 或编写 API 文档
  • 用户提到 "Phase 3 Step 2"、"API 设计"
  • 已有场景时序图,需要细化 API 规格
  • 用户提供了一个 API 端点需要详细设计

前置依赖

  • logos/resources/prd/3-technical-plan/2-scenario-implementation/ 中包含场景时序图
  • logos/resources/prd/3-technical-plan/1-architecture/ 中包含架构概要(确认前后端分离方式、认证方案等)
  • logos-project.yamltech_stack 已填写

如果时序图目录为空,提示用户先完成 Phase 3 Step 1(scenario-architect)。

核心能力

  1. 从时序图中提取所有跨系统边界的 API 调用
  2. 去重、合并、按领域分组,形成端点清单
  3. 设计 OpenAPI 3.0+ YAML 规格(路径、参数、请求体、响应结构)
  4. 定义统一的错误响应格式和错误码体系
  5. 设计认证方案(Bearer Token / API Key / Cookie)
  6. 设计分页、排序、过滤的标准化参数

执行步骤

Step 1: 读取场景上下文

读取以下文件建立完整上下文:

  • 场景时序图logos/resources/prd/3-technical-plan/2-scenario-implementation/):提取所有跨系统边界的箭头
  • 架构概要logos/resources/prd/3-technical-plan/1-architecture/):确认认证方案、前后端分离方式、API 网关等
  • logos-project.yaml:读取 tech_stack 确认后端框架和部署方式

Step 2: 提取端点清单

遍历所有场景时序图,收集每个跨系统边界的调用箭头:

  1. 识别"跨系统边界"的箭头——客户端到服务端、服务端到外部服务、服务间调用
  2. 为每个箭头提取:HTTP 方法、路径、所属场景编号和 Step 编号
  3. 去重合并——同一个端点可能在多个场景中出现(如 POST /api/auth/login 可能在 S02 和 S03 都有)
  4. 输出端点清单摘要供用户确认:
从时序图中识别到 N 个 API 端点:

| # | 方法 | 路径 | 来源场景 | 领域 |
|---|------|------|---------|------|
| 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 |

Step 3: 按领域分组

将端点按业务领域分组,每组对应一个 YAML 文件:

  • auth.yaml — 认证相关(注册、登录、登出、重置密码)
  • projects.yaml — 核心业务对象的 CRUD
  • billing.yaml — 支付和订阅

分组原则:

  • 同一数据实体的操作放在一起
  • 认证/授权独立分组
  • 第三方服务回调(如支付回调)放在对应业务领域

Step 4: 设计统一约定

在生成具体端点前,先确定全局约定:

认证方案(从架构概要中读取):

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

统一错误响应

components:
  schemas:
    ErrorResponse:
      type: object
      required: [code, message]
      properties:
        code:
          type: string
          description: 机器可读的错误码(如 EMAIL_EXISTS)
        message:
          type: string
          description: 人类可读的错误描述
        details:
          type: object
          description: 附加错误信息(如字段级校验错误)

Read the full file on GitHub · 226 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 226 lines · 0 tokens per session scan A e29b80cf362b

Subscribe to this mod's changes

api-designer is a skill published in the GitHub repository miniidealab/openlogos (71 stars, last pushed 5d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,380 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens