Claude Skill
neutree-ai/openapi-to-skills
将 OpenAPI 规范转换为上下文高效的 Claude Skill,供 AI 代理使用。使用此 TypeScript 工具减少令牌使用并优化 API 交互。
概览
仓库信息
安装这个 Skill
npx openapi-to-skills ./openapi.yaml -o ./outputRegistry 信息
npx openapi-to-skills ./openapi.yaml -o ./outputnpx openapi-to-skills https://example.com/openapi.yaml -o ./outputnpx openapi-to-skills ./openapi.yaml -o ./output --case-strategy lowercasenpx swagger-cli bundle ./api.yaml -o ./bundled.yamlnpx openapi-to-skills ./bundled.yaml -o ./output
项目简介
一个 TypeScript 工具,将 OpenAPI 规范转换为上下文高效的 Agent Skill(Claude Skill),使 AI 代理能够以最少的令牌和优化的上下文窗口与 API 交互。
OpenAPI to Agent Skill for context-efficient AI agents
要点
- 将 OpenAPI 3.x 规范转换为 Claude Skill 格式
- 优化上下文使用,实现令牌高效的 AI 代理
- 支持自定义端点过滤和转换
- 生成结构化技能定义,开销最小
- 专为与基于 Claude 的工作流无缝集成而设计
使用场景
- 构建调用 REST API 的令牌高效 AI 代理
- 将现有 API 文档转换为代理就绪的技能
- 减少多 API 代理系统中的上下文窗口消耗
- 为基于 Claude 的应用程序自动化技能生成
- 在 AI 驱动的自动化管道中简化 API 集成
README 摘要
# openapi-to-skills [](https://codecov.io/gh/neutree-ai/openapi-to-skills) [](https://www.npmjs.com/package/openapi-to-skills) Convert OpenAPI specifications into [Agent Skills](https://agentskills.io/) format - structured markdown documentation that minimizes context size for AI agents. AI agents often need domain-specific knowledge to complete tasks. Rather than writing custom prompts or building MCP tools from scratch, leveraging existing API documentation is a practical approach - and OpenAPI is the de facto standard with battle-tested specifications maintained over years. However, feeding raw OpenAPI specs to agents has limitations. Complex specifications can exceed LLM context limits, and even when they fit, loading the entire document for every request wastes valuable context. Agent Skills solves this by structuring documentation for on-demand reading. Agents load only what they need - starting with an overview, then drilling into specific operations or schemas. Since file reading is a universal capability across agent frameworks, this approach works everywhere without special integrations. ## Features - **Semantic structure** - Output organized by resources, operations, and schemas, enabling agents to load only relevant sections - **Smart grouping** - Operations grouped by tags or path prefix (auto-detected), schemas grouped by naming prefix - **Filtering** - Include/exclude by tags, paths, or deprecated status - **Customizable templates** - Override default Eta templates for custom output format ## Usage ```bash npx openapi-to-skills ./openapi.yaml -o ./output # or bunx openapi-to-skills ./open
话题
暂无话题