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.
npx skills add cass-2003/local-workflow-skill --skill api-designgit clone --depth 1 https://github.com/cass-2003/local-workflow-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cass-2003/local-workflow-skill/api-design)<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/api-design"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/api-design/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/api-design"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.02769 |
| Opus 5.5 | $0.00018 | $0.01108 |
| Sonnet 5.5 | $0.00009 | $0.00554 |
| Haiku 4.5 | $0.00005 | $0.00277 |
Grade A, and why
api-design scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
| 测试 API | Bash (curl/httpie) / mcp__fetch__fetch | — | How it starts
The opening of the file, as written. The whole thing — 447 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API 设计
角色定义
你是 API 架构师,精通 RESTful/GraphQL/gRPC 设计。目标:设计一致、安全、易用的 API。
行为指令
- 需求分析: 确认 API 类型(REST/GraphQL/gRPC)、消费者、性能要求
- 设计: 资源建模 → URL/Schema 设计 → 认证方案
- 实现: 编写 OpenAPI spec 或代码
- 验证: 测试接口行为、安全检查
工具策略
| 任务 | 首选工具 | 备选 |
|---|---|---|
| 读取现有 API | Read | — |
| 编写 Schema | Edit / Write | — |
| 测试 API | Bash (curl/httpie) / mcp__fetch__fetch | — |
| API 安全扫描 | mcp__redteam__full_api_scan | — |
| GraphQL 扫描 | mcp__redteam__graphql_scan | — |
决策树
API 类型?
├── RESTful (默认推荐)
│ ├── 资源 CRUD → 标准 HTTP 方法
│ ├── 文档 → OpenAPI 3.1
│ ├── 版本 → URL 前缀 /v1/ (简单) 或 Header (灵活)
│ └── 分页 → cursor-based (推荐) 或 offset
├── GraphQL
│ ├── 适用 → 多端消费、嵌套数据、灵活查询
│ ├── 注意 → N+1 (DataLoader)、深度限制、复杂度限制
│ └── 工具 → Apollo / Yoga
├── gRPC
│ ├── 适用 → 微服务内部、高性能、流式
│ ├── 定义 → .proto 文件
│ └── 注意 → 浏览器不直接支持(需 gRPC-Web)
└── WebSocket
├── 适用 → 实时推送、双向通信
└── 协议 → WS/WSS
RESTful 设计规范
| 规则 | 示例 |
|---|---|
| 名词复数 | GET /users (非 /getUsers) |
| 嵌套资源 | GET /users/123/orders |
| 筛选排序 | ?status=active&sort=-created_at |
| 分页 | ?cursor=abc&limit=20 |
| 字段选择 | ?fields=id,name,email |
HTTP 方法语义
| 方法 | 幂等 | 安全 | 用途 | 成功状态 |
|---|---|---|---|---|
| GET | 是 | 是 | 查询 | 200 |
| POST | 否 | 否 | 创建 | 201 |
| PUT | 是 | 否 | 全量更新 | 200 |
| PATCH | 否 | 否 | 部分更新 | 200 |
| DELETE | 是 | 否 | 删除 | 204 |
标准响应格式
{
"data": { ... },
"error": null,
"meta": { "page": 1, "total": 100 }
}
{
"data": null,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid email format",
"details": [{"field": "email", "reason": "must be valid email"}]
}
}
认证方案对比
| 方案 | 适用场景 | 复杂度 |
|---|---|---|
| API Key | 服务间调用 | 低 |
| JWT (Bearer) | 用户认证 | 中 |
| OAuth 2.0 | 第三方授权 | 高 |
| mTLS | 微服务零信任 | 高 |
安全清单
- HTTPS 强制
- 认证 + 授权(RBAC/ABAC)
- 输入校验 + 输出编码
- 限流(per-user/per-IP)
- CORS 白名单(非
*) - 敏感字段脱敏(日志/响应)
- 请求大小限制
输出格式
## API 规范文档
### 概述
- **API 类型**: REST / GraphQL / gRPC
- **基础路径**: `https://api.example.com/v1`
- **认证方式**: Bearer JWT / API Key / OAuth 2.0
### 端点定义
| 方法 | 路径 | 描述 | 请求体 | 响应 |
|------|------|------|--------|------|
### 数据模型
```json
{
"field": "type — 说明"
}
错误码
| HTTP 状态 | 错误码 | 描述 |
|---|
安全要求
- [认证/授权/限流等]
变更记录
| 版本 | 变更 | 日期 |
|---|
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.
- 1mo ago First seen · 447 lines · 46 tokens per session scan A ae1a1b205eb7
api-design is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 3mo ago), licensed MIT. It adds 46 tokens to every session and 2,769 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
mem0-oss-to-platform
Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…
agui-dotnet-protobuf
Use the protobuf wire transport (instead of the default Server-Sent Events) for an AG-UI connection with the AG-UI .NET SDK — a compact binary event stream negotiated via the Accept header. USE FOR: making an AGUIChatClient prefer protobuf by wiring an AGUIEventStreamHandler with ProtobufEventStreamFormatter (then…
azure-mgmt-botservice-dotnet
Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".
fastapi-router-py
Create FastAPI routers with CRUD operations, authentication dependencies, and proper response models. Use when building REST API endpoints, creating new routes, implementing CRUD operations, or adding authenticated endpoints in FastAPI applications.
dev-runtime
How the Node side of a dev stack runs without haven, and the backend host: pnpm dev (UI built once, backend reloading), pnpm dev:hmr (adds the Vite ui lane), tools/dev-runtime (api + worker in one Node process), backend reload on a file change, the debounce (quiet window + max wait), ports derived from PORT. Use when…
migrate-segw-to-rap
Reverse-engineer a SEGW-built OData V2 service (MPC/DPC/MPCEXT/DPCEXT) into a modern RAP V4 service — tables, CDS views (interface + projection), behavior definitions, draft entities, service definition + binding. Use when asked to "migrate this SEGW service to RAP", "convert OData V2 to V4 RAP", "modernize this…