← 返回 Skills 市场
dull-bird

Clihub Pub Full

作者 Dull Bird · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ⚠ suspicious
79
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install clihub
功能描述
Universal CLI discovery gateway — one skill to manage all CLI tools
使用说明 (SKILL.md)

CLI Hub

One skill to manage all CLI tools. Works across OpenClaw, Claude Code, Codex CLI, Cursor, and Aider.

Trigger Check (read FIRST)

⚠️ CRITICAL: Your training data is OUT OF DATE for tools installed after your cutoff. NEVER identify an unfamiliar tool from memory. ALWAYS look it up in the registry.

Rule: when the user mentions ANY tool name, your FIRST action must be lookup \x3Ctool> via the registry script. Only after the lookup fails should you try raw --help. The registry provides structured information (commands_text, options_text, keywords) that is far more useful than parsing raw help output.

This skill triggers broadly — any mention of a CLI. To avoid overloading the context window, do a quick sanity check before proceeding:

  • Is the user asking something purely conversational? ("你好", "今天天气", ...) → skip
  • Is another official skill already handling this? → defer to it
  • Does the request involve running a tool, looking up a command, or understanding CLI output? → proceed with lookup \x3Ctool> FIRST

Platform Detection

At runtime, determine platform by checking which directories exist:

Platform Skill root Registry root
OpenClaw ~/.agents/skills/ ~/.openclaw/cli-registry/
Claude Code ~/.claude/skills/ ~/.claude/cli-registry/
Codex CLI ~/.agents/skills/ ~/.codex/cli-registry/
Cursor ~/.cursor/skills/ ~/.cursor/cli-registry/

Fallback: run \x3Ctool> --help directly if no registry path is available.

See references/platforms.md for details.

Priority Resolution

When the user wants to use a CLI tool, resolve in order:

  1. Official Skill$SKILLS_ROOT/\x3Ctool>/SKILL.md exists → use it immediately. The skill author knows their tool best. This ALWAYS takes priority.
  2. Registry Lookup$REGISTRY_ROOT/\x3Ctool>.json → description, subcommands, usage. Then check version: if version matches installed version, use cached data. If version differs or is null (non-standard CLI), refresh via --help and re-register.
  3. Keyword Search$REGISTRY_ROOT/.keywords.json → maps task words to tool names. Use when the user describes a task without naming a specific tool.
  4. Live Discovery — run \x3Ctool> --help as last resort when nothing is cached.

Version-aware lookup flow

lookup \x3Ctool>
  │
  ├─ registered + version matches installed → use cached data (fast, structured)
  │
  ├─ registered + version differs → --help refresh → register new version
  │
  ├─ registered + version is null → --help refresh → mark as "non-standard"
  │     (re-check with --help on every use)
  │
  └─ not registered → --help → register for next time

Registry Script

# The registry script is always at scripts/cli-registry.py relative to this SKILL.md.
# Auto-detect platform root:

if [ -d ~/.claude/skills/cli-hub ]; then
  SCRIPT=~/.claude/skills/cli-hub/scripts/cli-registry.py
elif [ -d ~/.agents/skills/cli-hub ]; then
  SCRIPT=~/.agents/skills/cli-hub/scripts/cli-registry.py
elif [ -d ~/.cursor/skills/cli-hub ]; then
  SCRIPT=~/.cursor/skills/cli-hub/scripts/cli-registry.py
else
  echo "cli-hub not found" >&2 && exit 1
fi

Commands

Command Use
python3 $SCRIPT register \x3Ccli> [--binary \x3Cbin>] [--desc \x3Ctext>] Register a CLI tool
python3 $SCRIPT list [--format json] List all registered tools
python3 $SCRIPT lookup \x3Ccli> Show structured info (desc, subcommands, flags, keywords, help)
python3 $SCRIPT search \x3Ckeyword...> Find tools by task keywords (e.g. "json filter")
python3 $SCRIPT discover Auto-scan system for known binaries
python3 $SCRIPT remove \x3Ccli> Remove from registry
python3 $SCRIPT help \x3Ccli> Fetch live --help output
python3 $SCRIPT remove \x3Ccli> Remove from registry
python3 $SCRIPT help \x3Ccli> Live --help dump (registered or not)

Decision Tree

User: "use jq to extract the name field"
        │
    ┌───▼─────────────────────────────────┐
    │ 1. Official Skill?                  │
    │    ls $SKILLS_ROOT/jq/SKILL.md      │
    │    → EXISTS: use it (authoritative)  │
    ├─────────────────────────────────────┤
    │ 2. Registry Lookup                  │
    │    lookup jq → description, version, │
    │    commands, keywords, help_raw      │
    │    → FOUND: construct command        │
    │    → NOT FOUND: tool may not exist   │
    │    ⚠️ NEVER guess what a tool is —   │
    │    only trust the registry           │
    ├─────────────────────────────────────┤
    │ 3. Keyword Search (no tool named)   │
    │    search "json extract" → jq, yq   │
    │    → best match → lookup to verify  │
    ├─────────────────────────────────────┤
    │ 4. Live --help (last resort)        │
    │    Nothing in registry → --help      │
    └─────────────────────────────────────┘

Reading help_raw (for UNKNOWN tools)

When the tool is NOT in the built-in knowledge base (no human-written description, no keywords), you MUST read its help_raw field — it's your only source of truth.

How to parse help_raw efficiently:

  1. Find the usage line — usually at the top or marked "Usage:" / "用法:" → Tells you the basic invocation pattern: tool [OPTIONS] COMMAND [ARGS]

  2. Scan for COMMAND sections — look for headings like:

    • "Commands:", "Subcommands:", "Available commands:"
    • "Unit Commands:", "Management Commands:"
    • Single-word lines ending with : or followed by indented blocks
    • Each indented line is typically a command + description
  3. Identify OPTIONS sections — look for:

    • Flag-like patterns: -x, --option, --option=VALUE
    • Lines starting with - and followed by a description
    • Help text often lists all options before any commands
  4. Extract the summary — the first non-flag, non-usage line over 15 chars is usually the tool's one-line description

  5. Watch for nested commands — some tools use cmd subcmd \x3Cargs>:

    • subscription use \x3Cname> → "use" is a sub-action of "subscription"
    • container ls, container start → grouped under "container"
  6. Check description/keywords from registry — even for unknown tools, _extract_summary() may have found a description. The keywords field may be empty for unknown tools; fall back to tokenizing the description.

Example: parsing an unseen tool's help_raw:

help_raw = """
xsv 0.13.0
Usage: xsv \x3Ccommand> [\x3Cargs>...]

Commands:
    cat      Concatenate CSV files by rows
    count    Count records
    flatten  Flatten conditional nested fields
    fmt      Reformat CSV data
    headers  Show headers of CSV data
    select   Select columns from CSV
    sort     Sort CSV data
    ...
"""

→ Look at "Commands:" heading → find indented blocks
→ Commands: cat, count, flatten, fmt, headers, select, sort
→ Each has a description after the name
→ Construct: xsv select name,age data.csv

Typical Workflows

User mentions an unfamiliar tool name (most common case)

User: "用 mmx 生成图片"
→ DON'T think about what "mmx" might be (your training data is outdated)
→ lookup mmx → "MiniMax multimodal AI toolkit" + subcommands
→ mmx image generate "a cat"

Known tool (in knowledge base)

User: "用 jq 把 name 字段提取出来"
→ search "json extract" → jq (built-in desc + keywords)
→ lookup jq → binary=jq, has 'filter' subcommand
→ Run: jq '.name' input.json

Unknown tool (NOT in knowledge base — rely on help_raw)

User: "用 xsv 处理这个 csv"
→ No official skill, not in KB, not in registry
→ Run: xsv --help → store as help_raw
→ READ help_raw (follow "Reading help_raw" guide above):
   → Usage: xsv \x3Ccommand> [\x3Cargs>...]
   → Commands: cat, count, select, sort, headers...
   → Found "select" subcommand: "Select columns from CSV"
→ Run: xsv select name,age data.csv
→ Register: python3 $SCRIPT register xsv

Unknown tool (found in registry, but no KB entry)

User: "用 fq 解析这个二进制文件"
→ search "binary parse" → fq (matched from description tokens)
→ lookup fq → binary=fq, description="Tool for inspecting binary data"
→ description came from _extract_summary(), keywords from description tokens
→ READ help_raw to learn subcommands and options
→ Construct command from help_raw

Design Principle

  • No duplication: If an official SKILL.md exists, this skill defers completely
  • Registry is cache, not source: --help is the ground truth; registry caches it
  • JSON not YAML: Registry entries are plain JSON, no frontmatter, machine-readable
  • Always fallback: Even unregistered tools work via live --help
安全使用建议
Install only if you want the agent to help discover and use local command-line tools broadly. Keep shell/tool approvals on, review commands before execution, avoid using it against production or privileged accounts without confirmation, and clear the CLI registry if you register untrusted tools.
能力评估
Purpose & Capability
The stated purpose is a universal CLI gateway, but the artifacts scope it to essentially every local CLI tool, including powerful account and infrastructure tools, without an allowlist or per-tool boundaries.
Instruction Scope
The skill instructs the agent to act on any mentioned tool name and to run registry lookup or live --help discovery as a first step, which is broader than a narrowly user-directed helper.
Install Mechanism
No install spec or dependency installer is provided; the visible helper script is included in the manifest, and there is no artifact evidence of hidden downloads or remote install-time execution.
Credentials
Scanning and registering local command-line tools is coherent with the purpose, but the environment access is broad and not limited by OS, tool category, or risk level.
Persistence & Privilege
The design stores CLI help/metadata in a persistent registry and may guide use of CLIs that inherit existing user credentials or local account context.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clihub
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clihub 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
clihub 1.2.0 - Major redesign: CLI tool lookup is now registry-first and version-aware; never guess tool features from memory. - New registry script: provides structured info, keyword search, auto-discovery, and platform detection. - Workflow safety: must always run lookup before using/guessing with --help, especially for unknown tools. - Added decision trees and parsing instructions for “help_raw” to ensure correct handling of unfamiliar CLIs. - Unified CLI management for OpenClaw, Claude Code, Codex CLI, Cursor, and Aider platforms.
元数据
Slug clihub
版本 1.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Clihub Pub Full 是什么?

Universal CLI discovery gateway — one skill to manage all CLI tools. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 79 次。

如何安装 Clihub Pub Full?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install clihub」即可一键安装,无需额外配置。

Clihub Pub Full 是免费的吗?

是的,Clihub Pub Full 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Clihub Pub Full 支持哪些平台?

Clihub Pub Full 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Clihub Pub Full?

由 Dull Bird(@dull-bird)开发并维护,当前版本 v1.2.0。

💬 留言讨论