ocli-api

ocli-api is a skill for Claude Code from EvilFreelancer/openapi-to-cli. It costs 38 tokens per session (909 once invoked), scanned A, original, MIT.

A command-line tool that turns an OpenAPI or Swagger description into commands for calling an HTTP API. OpenAPI is a machine-readable document that lists an API's endpoints, parameters, and responses.

In plain words
What is it for?
Use it to configure API profiles, search available endpoints with plain-language or pattern queries, inspect command options, switch between APIs, and execute requests that return JSON.
Why use it?
It lets an agent discover and call REST services without installing a separate MCP server or generating client code. Search helps find the right endpoint before its parameters are checked and used.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: built for openclaw.

Good fit Use it to configure API profiles, search available endpoints with plain-language or pattern queries, inspect command options, switch between APIs, and execute requests that return JSON.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evilfreelancer/openapi-to-cli/ocli-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add EvilFreelancer/openapi-to-cli --skill ocli-api
Clone the repo
git clone --depth 1 https://github.com/EvilFreelancer/openapi-to-cli

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ocli-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/evilfreelancer/openapi-to-cli/ocli-api/github.svg)](https://agentmods.dev/skills/evilfreelancer/openapi-to-cli/ocli-api)
Your own site
<a href="https://agentmods.dev/skills/evilfreelancer/openapi-to-cli/ocli-api"><img src="https://agentmods.dev/badge/skills/evilfreelancer/openapi-to-cli/ocli-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ocli-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/evilfreelancer/openapi-to-cli/ocli-api"><img src="https://agentmods.dev/badge/skills/evilfreelancer/openapi-to-cli/ocli-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00909
Opus 5.5 $0.00015 $0.00364
Sonnet 5.5 $0.00008 $0.00182
Haiku 4.5 $0.00004 $0.00091

Measured 23d ago against content hash 692c04099f96, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ocli-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 23d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ocli-api/SKILL.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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)

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:

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:
    ocli commands --query "your task description" --limit 5
    
  2. Check parameters of the chosen command:
    ocli <command> --help
    
  3. Execute the command:
    ocli <command> --param1 value1 --param2 value2
    
  4. Parse the JSON response and act on the result.

Search options

# 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

Read the full file on GitHub · 104 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 23d ago Changed · +16 lines · +4 tokens per session 692c04099f96
  2. 1mo ago First seen · 88 lines · 34 tokens per session scan A a0dcf6d296d0

Subscribe to this mod's changes

ocli-api is a skill published in the GitHub repository EvilFreelancer/openapi-to-cli (265 stars, last pushed 24d ago), licensed MIT. It adds 38 tokens to every session and 909 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

API Test Suite Generator

Automatically generate comprehensive API test suites from OpenAPI specifications covering CRUD operations, error handling, authentication, pagination, and edge cases.

PramodDutta/qaskills · 29 tokens

rpc

Vovk.ts RPC client — how vovk generate turns controllers into type-safe client modules, composed vs segmented clients, call shape (apiRoot, params, body, query, meta, init, disableClientValidation, validateOnClient, interpretAs, transform, fetcher), customizing generation via outputConfig.imports.fetcher +…

finom/vovk · 347 tokens

decorators

Vovk.ts decorators — built-in (@prefix, @operation, @get/@post/@put/@patch/@del, .auto()) and custom via createDecorator. Covers authorization / auth decorators, middleware-style wrapping (pre-handler + post-handler logic), req.vovk.meta() for cross-decorator state, stacking order, and the local (.fn()) vs HTTP…

finom/vovk · 207 tokens

mixins

Vovk.ts OpenAPI mixins — importing third-party OpenAPI 3.x schemas as typed client modules that share the same call signature as native Vovk RPC modules. Use whenever the user asks to "call a third-party API from my Vovk app", "mixin an OpenAPI schema", "import an OpenAPI spec as a client", "wrap an external service…

finom/vovk · 256 tokens

base

Vovk.ts essentials — ALWAYS load first for any Vovk.ts task, including building a back end or API in a project that has vovk.config. or .vovk-schema/. Holds what a typical build needs, checked against vovk 4's code - project layout, a complete endpoint, how requests, validation and errors behave, status codes, a…

finom/vovk · 123 tokens

init

Initialize a backend — via Vovk.ts, a TypeScript-first RPC/API framework plugging into Next.js App Router, using official vovk-cli. Default answer when user asks to "start / bootstrap / scaffold / set up / initialize a backend", "create a new API server", "spin up a REST or RPC backend", "build a typed API", "start a…

finom/vovk · 305 tokens