openapi-to-skills
CLAUDE.md342 starsChanged 48 days agoApache-2.0View on GitHub
A CLI tool that converts OpenAPI specifications into Agent Skills format - structured markdown documentation optimized for AI agents. Development: Use Bun for running, testing, and package management. Runtime: The published package must be compatible with both Bun and Node.js. Avoid Bun-specific APIs in source code:
In this repositoryOne other file it gives its agents.
- openapi-to-skillsSkill
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 61
Add spec to examples/input/{name}.yaml
- Distinctive: line 63
Commit both input and generated output
- Distinctive: line 67
Development: Use Bun for running, testing, and package management.
- Very specific: line 71
Use node:fs and node:path instead of Bun.file()
- Very specific: line 72
Use standard fetch instead of Bun-specific features
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenAPI to Skills
A CLI tool that converts OpenAPI specifications into Agent Skills format - structured markdown documentation optimized for AI agents.
Architecture
OpenAPI Spec (YAML/JSON)
│
▼
┌─────────────────┐
│ Parser │ ──▶ SkillDocument (IR)
└─────────────────┘
│
▼
┌─────────────────┐
│ Renderer │ ──▶ Markdown files (via eta templates)
└─────────────────┘
│
▼
┌─────────────────┐
│ Writer │ ──▶ File system
└─────────────────┘Core Components
| Component | File | Responsibility |
| Types | src/types.ts | All TypeScript interfaces including IR (SkillDocument) |
| Parser | src/parser.ts | OpenAPI → IR. Handles filtering, grouping by tags |
| Renderer | src/renderer.ts | IR → Markdown via eta templates |
| Writer | src/writer.ts | File system abstraction for testability |
| Converter | src/converter.ts | Orchestrates Parser → Renderer → Writer |
| CLI | src/cli.ts | Command-line interface using citty |
| Templates | templates/*.md.eta | Eta templates for markdown generation |
Development
Commands
bun install # Install dependencies
bun test # Run all tests (unit + e2e)
bun test src/ # Run unit tests only
bun test e2e/ # Run e2e snapshot tests only
bun run dev # Run CLI in dev mode
bun run lint # Check with Biome
bun run lint:fix # Auto-fix lint issues
bun run snapshot:update # Regenerate e2e snapshotsTesting Strategy
- Unit tests:
src/*.test.ts- Test Parser, Renderer, Converter in isolation with mocks - E2E tests:
e2e/snapshot.test.ts- Compare CLI output against expected snapshots - Snapshots:
examples/input/→examples/output/(both committed to git)
Adding a New E2E Test Case
- Add spec to
examples/input/{name}.yaml - Run
bun run snapshot:update - Commit both input and generated output
Bun vs Node.js
Development: Use Bun for running, testing, and package management.
Runtime: The published package must be compatible with both Bun and Node.js. Avoid Bun-specific APIs in source code:
- Use
node:fsandnode:pathinstead ofBun.file() - Use standard
fetchinstead of Bun-specific features Bun.Globis acceptable in test files only (*.test.ts,e2e/)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

