Agent skill

OpenAPI CLI Caller

by EvilFreelancer in EvilFreelancer/openapi-to-cli

Turns an OpenAPI, Swagger or OpenRPC spec into CLI commands the agent can search and call, with no MCP server or code generation.

MITAuto-check passedBackend & APIs

Install OpenAPI CLI Caller

skills CLI
$ npx skills add EvilFreelancer/openapi-to-cli --skill ocli-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install EvilFreelancer/openapi-to-cli ocli-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/EvilFreelancer/openapi-to-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ocli-api .claude/skills/ocli-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ocli-api
GitHub stars
265
Token cost
~879 tokens
SKILL.md length
332 words
Files
2
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Turns an OpenAPI, Swagger or OpenRPC spec into CLI commands the agent can search and call, with no MCP server or code generation.

  • Works in 4 steps: Search for the right command → Check parameters of the chosen command → Execute the command → …
  • Calling a REST API when you have its OpenAPI or Swagger spec
  • SKILL.md covers When to use, Setup (one-time), Workflow and Search options, plus 3 more sections
  • Calls npm

What it does

ocli-api lets the agent call an HTTP or JSON-RPC API straight from its OpenAPI, Swagger or OpenRPC description by turning each endpoint or method into a CLI command, so no MCP server, generated code or JSON schemas in context are needed. The skill pitches this as low overhead: one tool, at about 158 tokens per turn.

After a one-time setup with npm install -g openapi-to-cli and ocli profiles add, the loop is: search for the right command with ocli commands --query, a BM25 natural-language search with a result limit and a regex option, check its parameters with --help, run it, and parse the JSON response. Several APIs can be kept as profiles and switched with ocli use. For OpenRPC, ocli wraps documented parameters in a JSON-RPC 2.0 request itself, and endpoints can be filtered with rpc: selectors. Guardrails: search before guessing a command name, check --help first, never invent parameter names, leave jsonrpc, method and id out of OpenRPC calls, and read an error response before retrying.

When your agent uses it

  • Calling a REST API when you have its OpenAPI or Swagger spec
  • Calling a JSON-RPC API described by an OpenRPC document
  • Keeping tool overhead low instead of running an MCP server
  • Switching between several APIs saved as profiles

Example prompts

  • “Register the GitHub OpenAPI spec as an ocli profile and find the command that lists my repositories.”
  • “Search the spec for a command that uploads a file, check its parameters, then call it.”
  • “Add this OpenRPC document as a profile and call the documented getWidget method.”

Requirements

  • openapi-to-cli installed globally with npm, which provides ocli
  • An OpenAPI, Swagger or OpenRPC spec as a URL or local file

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Search for the right command
  2. Check parameters of the chosen command
  3. Execute the command
  4. Parse the JSON response and act on the result.

What it can do on your machine

Read from SKILL.md and the folder at commit 8b0c2ea. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

OpenAPI CLI Caller loads about 879 tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 332 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~879

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from EvilFreelancer/openapi-to-cli at commit 8b0c2ea, republished under its MIT licence (© EvilFreelancer). 332 words, ~879 tokens.

Download SKILL.mdSave it as .claude/skills/ocli-api/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ocli-api
description
Turn any OpenAPI, Swagger, or OpenRPC API into CLI commands and call them. Search endpoints with BM25, check parameters, execute — no MCP server needed.
version
1.0.0
user-invocable
true
disable-model-invocation
false
homepage
https://github.com/EvilFreelancer/openapi-to-cli

ocli — API specification to CLI

Call any HTTP API described by an OpenAPI, Swagger, or OpenRPC spec as CLI commands. No MCP server, no code generation, no JSON schemas in context.

When to use

  • You need to call a REST API (internal, cloud, SaaS)
  • You have an OpenAPI or Swagger spec (URL or local file)
  • You have an OpenRPC JSON or YAML document for a JSON-RPC API
  • You want minimal token overhead (1 tool, ~158 tokens/turn)

Setup (one-time)

bash
npm install -g openapi-to-cli

ocli profiles add <name> \
  --api-base-url <BASE_URL> \
  --openapi-spec <SPEC_URL_OR_PATH> \
  --api-bearer-token "$TOKEN"

ocli use <name>

For OpenRPC, use the same profile command. ocli builds one command per RPC method and wraps documented parameters in a JSON-RPC 2.0 request automatically:

bash
ocli profiles add rpc-api \
  --api-base-url https://api.example.com/rpc \
  --openapi-spec ./openrpc.json

ocli getWidget --widgetId widget-7

ocli serializes integer, number, and boolean values according to the method schema. Pass arrays and objects as JSON. It follows paramStructure: "by-position" by sending the documented flags as a JSON-RPC parameter array in order. Named and either methods receive a JSON object.

For OpenRPC profiles, use rpc:<method> selectors with --include-endpoints or --exclude-endpoints, for example rpc:getWidget. OpenRPC method names must be unique.

Workflow

  1. Search for the right command:
    bash
    ocli commands --query "your task description" --limit 5
  2. Check parameters of the chosen command:
    bash
    ocli <command> --help
  3. Execute the command:
    bash
    ocli <command> --param1 value1 --param2 value2
  4. Parse the JSON response and act on the result.
Show full SKILL.md (141 more words)Show less

Search options

bash
# BM25 natural language search
ocli commands --query "upload file to storage" --limit 5

# Regex pattern search
ocli commands --regex "users.*post" --limit 10

# List all commands
ocli commands

Multiple APIs

bash
# Switch active profile
ocli use github

# Or specify per-call
ocli repos_get --profile github --owner octocat --repo Hello-World

Guardrails

  • Always search before guessing a command name.
  • Always check --help before calling a command you haven't used before.
  • Never fabricate parameter names — use the ones from --help output.
  • For OpenRPC, pass only documented RPC parameters. Do not add jsonrpc, method, or id; ocli supplies them and follows the documented parameter structure.
  • If a command returns an error, read the response body before retrying.

Failure handling

  • Command not found: re-search with different keywords or use --regex.
  • Missing required parameter: run --help and add the missing flag.
  • Unknown option: the flag is not defined by the command; copy the exact name from --help, including a leading $ when the spec uses one (--$expand).
  • 401/403: check that the profile has a valid token (ocli profiles show <name>).
  • Spec not loaded: run ocli profiles add again with --openapi-spec to refresh cache.

© EvilFreelancer, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/ocli-api of EvilFreelancer/openapi-to-cli.

  • SKILL.md
  • ISSUE.md

Open the folder on GitHubat commit 8b0c2ea

Compare with similar skills

OpenAPI CLI Caller next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

OpenAPI CLI Caller compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
OpenAPI CLI Caller this skillEvilFreelancer/openapi-to-cli265—~879Automated safety check: PassMIT
ToolJet Marketplace Plugin BuilderToolJet/ToolJet41k—~2.1kAutomated safety check: PassAGPL-3.0
API Endpoint Contracttrycompai/comp2k—~2.7kAutomated safety check: PassAGPL-3.0
Soundcloud API Integrationsoundcloud/api257—~787Automated safety check: PassNone
Mock REST APIsmendixlabs/mxcli1281 repos~2.5kAutomated safety check: PassApache-2.0
REST Clientmendixlabs/mxcli1281 repos~3.9kAutomated safety check: PassApache-2.0

Similar skills

  • Turns an API description, such as an OpenAPI file or a Postman collection, into a connector plugin for ToolJet's marketplace and checks it with the repo's validator.

    41k GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • API Endpoint Contract

    trycompai/comp

    The contract every new or modified API endpoint must follow so it is correct for the public OpenAPI spec, the MCP server (npm @trycompai/mcp-server), the ValidationPipe, and the docs.

    2k GitHub stars~2.7k tokensUpdated 5 days ago
    Backend & APIsAuto-check passed
  • Integrates applications with the SoundCloud HTTP API using OAuth 2.1, OpenAPI, and developer docs.

    257 GitHub stars~787 tokensUpdated 7 days ago
    Backend & APIsAuto-check passed
  • Mock REST APIs

    mendixlabs/mxcli

    Stand up an HTTP endpoint you control instead of a live third-party API, and point the Mendix app at it — Prism from an OpenAPI contract, a constant swap, or a forward proxy.

    128 GitHub starsUsed in 1 repo~2.5k tokens
    Backend & APIsAuto-check passed
  • REST Client

    mendixlabs/mxcli

    Call external REST APIs from Mendix — the three approaches (inline REST CALL, consumed REST client document, generated from OpenAPI) and how to choose.

    128 GitHub starsUsed in 1 repo~3.9k tokens
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed

Works with

Categories

Questions about OpenAPI CLI Caller

What does OpenAPI CLI Caller do?

Turns an OpenAPI, Swagger or OpenRPC spec into CLI commands the agent can search and call, with no MCP server or code generation. ocli-api lets the agent call an HTTP or JSON-RPC API straight from its OpenAPI, Swagger or OpenRPC description by turning each endpoint or method into a CLI command, so no MCP server, generated code or JSON schemas in context are needed. The skill pitches this as low overhead: one tool, at about 158 tokens per turn.

When should I use OpenAPI CLI Caller?

OpenAPI CLI Caller fits situations like: calling a REST API when you have its OpenAPI or Swagger spec; calling a JSON-RPC API described by an OpenRPC document; keeping tool overhead low instead of running an MCP server; switching between several APIs saved as profiles.

How do I install OpenAPI CLI Caller in Claude Code?

Run `npx skills add EvilFreelancer/openapi-to-cli --skill ocli-api -a claude-code`. Or copy the skill folder (skills/ocli-api in EvilFreelancer/openapi-to-cli) into .claude/skills/ocli-api in your project. Claude Code loads it when a task matches its description.

How do I install OpenAPI CLI Caller in Codex?

Run `npx skills add EvilFreelancer/openapi-to-cli --skill ocli-api -a codex`. Or copy the skill folder (skills/ocli-api in EvilFreelancer/openapi-to-cli) into .agents/skills/ocli-api in your project. Codex loads it when a task matches its description.

Can I use OpenAPI CLI Caller in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add EvilFreelancer/openapi-to-cli --skill ocli-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ocli-api, .gemini/skills/ocli-api, .github/skills/ocli-api and .opencode/skills/ocli-api in your project.

What does OpenAPI CLI Caller need to run?

Going by SKILL.md and its folder, OpenAPI CLI Caller needs the command-line tools its instructions call (npm). Our summary lists: openapi-to-cli installed globally with npm, which provides ocli; An OpenAPI, Swagger or OpenRPC spec as a URL or local file.

Does OpenAPI CLI Caller access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is OpenAPI CLI Caller safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does OpenAPI CLI Caller use?

OpenAPI CLI Caller is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does OpenAPI CLI Caller use?

About 879 tokens (SKILL.md is roughly 3.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to OpenAPI CLI Caller?

Skills that share tags, products or a category with OpenAPI CLI Caller: ToolJet Marketplace Plugin Builder (ToolJet/ToolJet, 41k stars), API Endpoint Contract (trycompai/comp, 2k stars), Soundcloud API Integration (soundcloud/api, 257 stars) and Mock REST APIs (mendixlabs/mxcli, 128 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains OpenAPI CLI Caller?

EvilFreelancer (a GitHub user) maintains it in EvilFreelancer/openapi-to-cli, which has 265 GitHub stars. The repository was last updated on September 22, 2026.

Source: EvilFreelancer/openapi-to-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.