技能详情(站内镜像,无评论)
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.0
统计:⭐ 0 · 14 · 0当前安装次数· 0历史安装次数
⭐ 0
安装量(当前) 0
🛡 VirusTotal :良性 · OpenClaw :良性
Package:codenova58/openapi-spec
安全扫描(ClawHub)
- VirusTotal :良性
- OpenClaw :良性
OpenClaw 评估
这是一种仅指令的OpenAPI指导技能,其要求和运行时指令与其规定的目的一致,并且不要求额外的凭据、安装或系统访问。
目的
名称和描述与SKILL.md内容相匹配:多阶段OpenAPI设计/linting/codegen工作流程。技能不会请求不相关的二进制文件、环境变量或配置路径。
说明范围
SKILL.md仅包含OpenAPI工作流的指导、检查清单和最佳实践。它不会指示代理读取文件、访问环境变量、调用外部端点或运行shell命令。
安装机制
不存在安装规范或代码文件。仅提供指令意味着在安装时不会将任何内容写入磁盘或下载。
证书
无需或引用环境变量、凭据或配置路径;这与文档/工作流程指导技能成比例。
持久
始终为false ,并且允许模型调用(默认)。该技能不会请求永久存在或尝试修改其他技能或系统设置。
综合结论
此技能是OpenAPI工作流程的仅限文档的指导包,内部看起来一致。在安装之前,请考虑: (1)来源未知-如果出处重要,请验证发布商; (2)您遵循的后续步骤(例如,运行codegen、CI链接或发布)可能需要第三方工具、API密钥或网络访问-这些将是此技能之外的单独操作; (3)与任何技能一样,请查看任何未来的代码或……
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Openapi规格」。简介:深度OpenAPI工作流程-设计优先与代码优先、可重用架构、安全方案、错误、示例、linting、兼容性和codegen。documen时使用...。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/codenova58/openapi-spec/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
name: openapi-spec
description: Deep OpenAPI workflow—design-first vs code-first, reusable schemas, security schemes, errors, examples, linting, compatibility, and codegen. Use when documenting REST APIs or driving clients and gateways from a spec.
---
# OpenAPI Specification (Deep Workflow)
OpenAPI is the **contract** between teams and tools. Quality comes from **consistent schemas**, **realistic examples**, and **lint rules** that catch breaking changes early.
## When to Offer This Workflow
**Trigger conditions:**
- New REST API; **public** or **partner** surface
- **Codegen** for clients/servers; **API gateway** validation from spec
- **Drift** between docs and implementation
**Initial offer:**
Use **six stages**: (1) workflow choice & ownership, (2) info & versioning, (3) resources & operations, (4) schemas & components, (5) security & errors, (6) lint, compatibility & publish). Confirm **OpenAPI** 3.x and **style guide**.
---
## Stage 1: Workflow & Ownership
**Goal:** **Design-first** (spec → implement) vs **code-first** (annotations → export)—pick one per service and **enforce**.
### Ownership
- **Who** approves breaking changes; **where** spec lives in repo
**Exit condition:** Single source of truth for the API contract.
---
## Stage 2: Info & Versioning
**Goal:** `info.title`, **version** scheme aligned with **URL** or **header** versioning strategy.
### Practices
- **Deprecation** policy in description or extension fields
---
## Stage 3: Resources & Operations
**Goal:** **RESTful** naming where appropriate; **operationId** stable for codegen.
### Practices
- **Pagination** (`cursor`/`page`), **filtering**, **sort** documented
- **Idempotency** (`Idempotency-Key`) for unsafe retries when relevant
---
## Stage 4: Schemas & Components
**Goal:** **`components/schemas`** reused; **nullable** vs **optional** correct in JSON Schema sense.
### Practices
- **OneOf** discriminated unions for polymorphic payloads when needed
- **Examples** per schema for human and machine readers
---
## Stage 5: Security & Errors
**Goal:** **`securitySchemes`** (Bearer, OAuth2) applied per operation or globally.
### Errors
- **Problem Details** (`application/problem+json`) pattern with **stable** `type` URIs
---
## Stage 6: Lint, Compatibility & Publish
**Goal:** **Spectral** or **vacuum** rules in CI; **openapi-diff** on PRs.
### Publish
- **Docs** portal (Swagger UI, Redoc); **postman** collections optional
---
## Final Review Checklist
- [ ] Single ownership and design-first or code-first discipline
- [ ] Versioning and deprecation story clear
- [ ] Operations complete with pagination/errors as needed
- [ ] Reusable components and examples
- [ ] Security and error model consistent
- [ ] CI lint and breaking-change detection
## Tips for Effective Guidance
- **Examples** should be **copy-paste valid**—catch enum drift.
- **Nullable** in OpenAPI 3.1 aligns with JSON Schema—**mind** **3.0** differences when mixing.
- **Internal** APIs still benefit from the same rigor—**future** you is a partner team.
## Handling Deviations
- **GraphQL** elsewhere: OpenAPI for **REST** **edge** only—don’t force one doc for both.