Claude Skill
neutree-ai/openapi-to-skills
Convert OpenAPI specs into context-efficient Claude Skills for AI agents. Reduce token usage and optimize API interactions with this TypeScript tool.
Overview
Repository
Install this 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
Summary
A TypeScript tool that converts OpenAPI specifications into context-efficient Agent Skills (Claude Skill), enabling AI agents to interact with APIs using minimal tokens and optimized context windows.
面向上下文高效AI代理的OpenAPI到Agent Skill(Claude Skill)转换
Key features
- Converts OpenAPI 3.x specs to Claude Skill format
- Optimizes context usage for token-efficient AI agents
- Supports custom endpoint filtering and transformation
- Generates structured skill definitions with minimal overhead
- Designed for seamless integration with Claude-based workflows
Use cases
- Building token-efficient AI agents that call REST APIs
- Converting existing API documentation into agent-ready skills
- Reducing context window consumption in multi-API agent systems
- Automating skill generation for Claude-powered applications
- Streamlining API integration in AI-driven automation pipelines
README excerpt
# 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
Topics
No topics yet.