Claude Skill

neutree-ai/openapi-to-skills

将 OpenAPI 规范转换为上下文高效的 Claude Skill,供 AI 代理使用。使用此 TypeScript 工具减少令牌使用并优化 API 交互。

概览

Stars324
Forks18
语言TypeScript
最后更新2026-06-23
最近同步2026-07-04
前往 GitHub

仓库信息

拥有者neutree-ai
仓库openapi-to-skills
完整名称neutree-ai/openapi-to-skills
Repo ID1,141,070,842

安装这个 Skill

npx openapi-to-skills ./openapi.yaml -o ./output

Registry 信息

类型mcp_server
质量分80/100
验证状态readme_parsed
最近验证2026-06-15
平台
ClaudeMCP
能力
pdfmemoryterminal
识别文件
README.mdexamplespackage.json
配置键
URLPACKAGE_JSON
安装方式
  • npx openapi-to-skills ./openapi.yaml -o ./output
  • npx openapi-to-skills https://example.com/openapi.yaml -o ./output
  • npx openapi-to-skills ./openapi.yaml -o ./output --case-strategy lowercase
  • npx swagger-cli bundle ./api.yaml -o ./bundled.yaml
  • npx 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 [![codecov](https://codecov.io/gh/neutree-ai/openapi-to-skills/graph/badge.svg?branch=main)](https://codecov.io/gh/neutree-ai/openapi-to-skills) [![npm version](https://img.shields.io/npm/v/openapi-to-skills?logo=npm)](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

话题

暂无话题

探索更多

数据来自 GitHub,同步时间:2026-07-04