agentleFS
neutree-aineutree-ai/openapi-to-skills/CLAUDE.md

openapi-to-skills

CLAUDE.md342 starsChanged 10 months 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:

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
  1. Very specific:

    Add spec to examples/input/{name}.yaml

    line 61
  2. Distinctive:

    Commit both input and generated output

    line 63
  3. Distinctive:

    Development: Use Bun for running, testing, and package management.

    line 67
  4. Very specific:

    Use node:fs and node:path instead of Bun.file()

    line 71
  5. Very specific:

    Use standard fetch instead of Bun-specific features

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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

ComponentFileResponsibility
Typessrc/types.tsAll TypeScript interfaces including IR (SkillDocument)
Parsersrc/parser.tsOpenAPI → IR. Handles filtering, grouping by tags
Renderersrc/renderer.tsIR → Markdown via eta templates
Writersrc/writer.tsFile system abstraction for testability
Convertersrc/converter.tsOrchestrates Parser → Renderer → Writer
CLIsrc/cli.tsCommand-line interface using citty
Templatestemplates/*.md.etaEta 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 snapshots

Testing 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

  1. Add spec to examples/input/{name}.yaml
  2. Run bun run snapshot:update
  3. 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:fs and node:path instead of Bun.file()
  • Use standard fetch instead of Bun-specific features
  • Bun.Glob is acceptable in test files only (*.test.ts, e2e/)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.