mcpField
C
cli-skill-collector

cli-skill-collector

github.com/diegosouzapwAgent 工作流82.6k881 次安装今天更新
代码仓库

关于 cli-skill-collector

这是 OmniRoute 的一项技能,可检测已安装的编码命令行工具、查找相关 GitHub Agent 技能,并引导安装。适合希望为本机编码工具发现技能的开发者。

主要功能

  1. 01检测已安装的编码命令行工具
  2. 02在 GitHub 查找相关技能
  3. 03将技能匹配到已安装工具
  4. 04规划所选工具的安装路径

适用场景

  1. 01查找适用于现有编码命令行工具的技能
  2. 02审查并选择匹配的 GitHub 技能
  3. 03为一个或多个工具安装所选技能

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/diegosouzapw/omniroute --skill cli-skill-collector

安装后在 Claude Code 中输入/cli-skill-collector确认已加载。

详细介绍

概述

检测已安装的 CLI 编码工具(Claude Code、Codex、Cursor、Copilot、Cline 等),在 GitHub 上搜索匹配的 Agent 技能,并通过 OmniRoute 内置 API 将其安装到检测到的工具中。

快速安装

npm install -g omniroute   # or: npx omniroute
omniroute --version

子命令

autostart

示例:

omniroute autostart
autostart enable

示例:

omniroute autostart enable
autostart disable

示例:

omniroute autostart disable
autostart toggle

示例:

omniroute autostart toggle
autostart status

示例:

omniroute autostart status
config

显示或更新 CLI 工具配置

示例:

omniroute config
config list

列出所有 CLI 工具及其配置状态

标志:

  • --json

示例:

omniroute config list
config get <tool>

显示工具的当前配置

标志:

  • --json

示例:

omniroute config get <tool>
config set <tool>

写入工具配置

标志:

  • --model <model>
  • --non-interactive
  • --yes
  • --allow-container-write

示例:

omniroute config set <tool>
config validate <tool>

验证配置格式,不写入配置

标志:

  • --model <model>
  • --json

示例:

omniroute config validate <tool>
config opencode

生成 OpenCode 配置(的别名

标志:

  • --model <model>
  • --non-interactive
  • --yes
  • --allow-container-write

示例:

omniroute config opencode
config lang

示例:

omniroute config lang
config get

标志:

  • --json

示例:

omniroute config get
config set <code>

标志:

  • --force

示例:

omniroute config set <code>
config list

标志:

  • --json

示例:

omniroute config list
env

显示和管理环境变量

示例:

omniroute env
env show

显示当前环境变量

标志:

  • --json

示例:

omniroute env show
env get <key>

获取单个环境变量

示例:

omniroute env get <key>
env set <key> <value>

设置环境变量(仅限当前会话)

示例:

omniroute env set <key> <value>
setup

标志:

  • --password <value>
  • --add-provider
  • --provider <id>
  • --provider-name <name>
  • --api-key <value>
  • --default-model <model>
  • --provider-base-url <url>
  • --test-provider
  • --non-interactive
  • --list

示例:

omniroute setup
update

标志:

  • --check
  • --apply
  • --changelog
  • --dry-run
  • --no-backup
  • --yes

示例:

omniroute update

/cli-skill-collector — Agent 技能收集器

为你的编码 CLI 工具发现并安装 Agent 技能——全部通过 OmniRoute 内置 API 完成。

本技能将指导你:

  1. 检测此机器上安装了哪些编码 CLI
  2. 搜索GitHub 上相关的 Agent 技能(SKILL.md 仓库)
  3. 安装发现的技能到检测到的编码工具中

无需单独安装 Skill Collector 应用——OmniRoute 自带的 CLI 检测和 GitHub 搜索即可处理所有工作。


第 1 步 — 检测已安装的编码工具

查询 OmniRoute 的 CLI 工具检测功能,查找已安装的编码 Agent:

curl -H "Authorization: Bearer $OMNIROUTE_API_KEY" http://localhost:20128/api/skills/collect/detect

返回内容包括:

  • OmniRoute 目录中的所有 CLI 工具(CLI_TOOL_IDS:claude、codex、cursor、copilot、opencode、cline、kilocode、hermes、hermes-agent、openclaw、droid、continue、qwen、windsurf、devin、antigravity 等)
  • 每个工具是否已安装且可运行
  • 与已安装工具匹配的 GitHub 技能(按相关性评分)

响应示例:

{
  "tools": {
    "codex": { "installed": true, "runnable": true, "command": "codex" },
    "claude": { "installed": true, "runnable": true, "command": "claude" },
    "cursor": { "installed": false, "runnable": false }
  },
  "installedToolIds": ["codex", "claude"],
  "matchedSkills": [
    { "toolId": "codex", "repo": "user/skill-codex-xxx", "score": 0.85, "stars": 120 },
    { "toolId": "claude", "repo": "user/claude-agent-rules", "score": 0.92, "stars": 340 }
  ],
  "totalSkills": 85
}

第 2 步 — 查看匹配的技能

对于每个已安装的工具,API 会返回包含 SKILL.md 或 Agent 配置文件的相关 GitHub 仓库。使用 score 字段确定优先级:

分数建议
0.80+极佳——维护良好、星标较多且活跃
0.60+良好——相关性高,质量不错
0.40+一般——可能需要审核
<0.40质量较低——跳过

你也可以手动浏览:

curl -H "Authorization: Bearer $OMNIROUTE_API_KEY" \
  "http://localhost:20128/api/github-skills?minStars=3&maxResults=50"

步骤 3 — 将技能安装到检测到的工具

将选定的技能安装到一个或多个检测到的工具:

curl -X POST http://localhost:20128/api/skills/collect/install \
  -H "Authorization: Bearer $OMNIROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "repoName": "user/skill-codex-xxx",
    "targets": ["codex", "claude"],
    "description": "Agent skill for coding workflows"
  }'

这会为每个目标工具规划安装路径:

  • claude → ~/.claude/skills/{category}/
  • codex → ~/.codex/skills/{category}/
  • hermes → ~/AppData/Local/hermes/skills/{category}/
  • opencode → ~/.opencode/skills/{category}/
  • gemini → ~/.gemini/skills/{category}/

实际的文件同步(从 GitHub 克隆并复制 SKILL.md)由 Agent 使用标准的 curl + cp 命令完成。


步骤 4 — 验证安装

安装后,验证技能是否已就位:

# For Codex
ls -la ~/.codex/skills/imported-github/*/SKILL.md

# For Claude Code
ls -la ~/.claude/skills/imported-github/*/SKILL.md

# For Hermes (Windows)
ls -la ~/AppData/Local/hermes/skills/imported-github/*/SKILL.md

还要重新检查检测结果:

curl -H "Authorization: Bearer $OMNIROUTE_API_KEY" http://localhost:20128/api/skills/collect/detect

快速开始(完整工作流)

AUTH_HEADER="Authorization: Bearer $OMNIROUTE_API_KEY"

# 1. Detect
DETECT=$(curl -s -H "$AUTH_HEADER" http://localhost:20128/api/skills/collect/detect)

# 2. Pick top matched skill for first installed tool
TOOL=$(echo "$DETECT" | python3 -c "import sys,json;d=json.load(sys.stdin);print(d['installedToolIds'][0] if d['installedToolIds'] else '')")
SKILL=$(echo "$DETECT" | python3 -c "import sys,json;d=json.load(sys.stdin);ms=d.get('matchedSkills',[]);print(ms[0]['repo'] if ms else '')")

if [ -n "$TOOL" ] && [ -n "$SKILL" ]; then
  # 3. Install
  curl -s -X POST http://localhost:20128/api/skills/collect/install \
    -H "$AUTH_HEADER" \
    -H "Content-Type: application/json" \
    -d "{\"repoName\": \"$SKILL\", \"targets\": [\"$TOOL\"]}"
  echo "Installed $SKILL to $TOOL"
fi

注意事项

  • OmniRoute 必须在本地的端口 20128(默认值)上运行——自定义端口设置请参阅 docs/frameworks/SKILLS.md。
  • /api/skills/collect/* 和 /api/github-skills 端点需要与其他所有 /api/skills/* 路由相同的管理范围身份验证:仪表板会话、回环 CLI 令牌,或具有 manage 范围的 API 密钥(requireManagementAuth())。只有在服务器完全未配置登录/API 密钥要求时,才会绕过身份验证。
  • 此功能取代了独立的 Skill Collector Python 应用——现在所有逻辑都在 OmniRoute 中。

评论

支持 Markdown