首页龙虾技能列表 › Ocli Api — Ocli工具

🔌 Ocli Api — Ocli工具

v1.0.0

[AI辅助] Turn any OpenAPI/Swagger API into CLI commands and call them. Search endpoints with BM25, check parameters, execute — no MCP server needed.

0· 159·0 当前·0 累计
by @vakovalskii (Valerii Kovalskii)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/17
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
medium confidence
The skill is internally consistent with its stated purpose (it delegates work to the ocli CLI) but leaves credential handling and package installation to the user — review the external npm package and token usage before installing.
评估建议
This skill is a thin adapter that tells the agent to call the ocli CLI to discover and call OpenAPI endpoints. Before installing or using it: (1) verify and trust the 'openapi-to-cli' npm package (review its repository and release source); (2) only configure API profiles with least-privilege tokens and avoid putting high-privilege secrets in environment variables the agent can access; (3) be aware the agent will be able to make arbitrary HTTP calls to any configured base URL — avoid pointing it ...
详细分析 ▾
用途与能力
Name/description say 'turn OpenAPI into CLI commands' and the skill requires the 'ocli' binary; that is coherent. No unrelated binaries, env vars, or config paths are requested.
指令范围
SKILL.md instructs the agent to run ocli commands (search, inspect, execute) against OpenAPI specs. This stays within the declared purpose, but those commands enable the agent to make arbitrary HTTP requests to whatever API base URL/profile is configured — which can access internal endpoints or accept user-supplied tokens. The instructions do not tell the agent to read unrelated local files, but they do encourage parsing JSON responses and supplying request parameters, which could include sensitive values if provided.
安装机制
This is an instruction-only skill (no install spec). The SKILL.md asks users to 'npm install -g openapi-to-cli' in the setup example. That's reasonable for an instruction-only skill, but npm packages run arbitrary code at install/runtime — you should verify the openapi-to-cli package and its provenance before installing.
凭证需求
The skill declares no required env vars, yet the setup examples show supplying a bearer token via --api-bearer-token "$TOKEN". This is not inherently malicious, but it's a mismatch: the skill will expect the user (or agent) to provide API tokens for target APIs even though no primaryEnv is declared. Ensure tokens are least-privilege and not left in environments the agent can read unintentionally.
持久化与权限
always is false, no config paths or system-wide modifications are requested. The skill does not request elevated or permanent presence.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/3/17

Initial release of ocli-api - Launches ocli-api for turning any OpenAPI/Swagger API into CLI commands. - Enables endpoint search using BM25 or regex queries. - Supports checking command parameters and executing API calls directly from the CLI. - No MCP server or code generation required; minimal token usage. - Includes guardrails and troubleshooting guidance for common errors.

● 无害

安装命令 点击复制

官方npx clawhub@latest install ocli-api
镜像加速npx clawhub@latest install ocli-api --registry https://cn.clawhub-mirror.com

技能文档

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

当...时 到 使用

  • 您 需要 到 call REST API (internal, cloud, SaaS)
  • 您 有 OpenAPI 或 Swagger spec (URL 或 local file)
  • 您 want minimal 令牌 overhead (1 tool, ~158 tokens/turn)

Setup (one-时间)

npm install -g openapi-to-cli

ocli profiles add \ --api-base-url \ --openapi-spec \ --api-bearer-token "$TOKEN"

ocli use

Workflow

  • 搜索 对于 right command:
   ocli commands --query "your task description" --limit 5
   
  • Check parameters 的 chosen command:
   ocli  --help
   
  • Execute command:
   ocli  --param1 value1 --param2 value2
   
  • 解析 JSON 响应 和 act 在...上 结果.

搜索 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

Multiple APIs

# Switch active profile
ocli use github

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

Guardrails

  • Always 搜索 之前 guessing command name.
  • Always check --help 之前 calling command 您 haven't used 之前.
  • Never fabricate parameter names — 使用 ones 从 --help 输出.
  • 如果 command returns 错误, 读取 响应 body 之前 retrying.

Failure handling

  • Command 不 found: re-搜索 带有 不同 keywords 或 使用 --regex.
  • Missing 必填 parameter: run --help 和 添加 missing 标志.
  • 401/403: check 个人资料 有 有效 令牌 (ocli profiles show ).
  • Spec 不 loaded: run ocli profiles 添加 again 带有 --openapi-spec 到 刷新 缓存.
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务