skill-install-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseskill-install-manager
skill-install-manager
技能安装管理器 — 自动读取技能列表文件,与当前全局已安装技能进行对比,找出未安装或存在更新的技能,并执行一键安装/更新。支持三级回退:HTTPS → SSH → MCP/GitHub API 直接抓取。使用命令安装,安装为 Global,指定 Reasonix / Claude Code / OpenCode 三个 Agent。npx skills
Skill Installation Manager — Automatically reads skill list files, compares them with currently globally installed skills, identifies uninstalled or updatable skills, and performs one-click installation/update. Supports three-level fallback: HTTPS → SSH → direct fetch via MCP/GitHub API. Install using thecommand as a Global installation, specifying the three Agents: Reasonix / Claude Code / OpenCode.npx skills
触发条件
Trigger Conditions
用户表达以下任一意图时触发。即使只是暗示或间接提及技能安装/管理工作,也应使用本技能:
- "检查并安装缺少的技能" / "看看哪些技能还没装"
- "同步技能列表" / "同步 skills" / "skill sync"
- "更新所有技能到最新版本" / "检查更新" / "skill update"
- "技能管理" / "skill manager" / "管理技能"
- "批量安装 skills" / "安装这些技能" / "一键安装"
- "从技能列表安装" / "按列表安装"
- "帮我整理技能" / "技能状态" / "看看技能"
- "把新技能装上" / "补一下缺少的技能"
- "npx skills" / "skills add" / "技能仓库"
Trigger when users express any of the following intentions. Even if only implying or indirectly mentioning skill installation/management tasks, this skill should be used:
- "Check and install missing skills" / "See which skills are not installed"
- "Sync skill list" / "Sync skills" / "skill sync"
- "Update all skills to the latest version" / "Check for updates" / "skill update"
- "Skill management" / "skill manager" / "Manage skills"
- "Batch install skills" / "Install these skills" / "One-click installation"
- "Install from skill list" / "Install according to list"
- "Help me organize skills" / "Skill status" / "Check skills"
- "Install new skills" / "Fill in missing skills"
- "npx skills" / "skills add" / "Skill repository"
执行模式说明
Execution Mode Description
本 Skill 采用 agent 直接执行(主路径)+ JS 脚本(可选辅助) 的双模式设计:
| 模式 | 适用场景 | 特点 |
|---|---|---|
| 🟢 agent 直行 | 默认模式,推荐 | 每一步可见进度、超时可控、超时后自动降级 |
| 🔵 JS 脚本辅助 | 需要批量格式化输出时 | 快速输出结构化 JSON,但遇到网络问题可能卡住 |
核心原则:所有 shell 命令设严格超时(15-30s),超时后 agent 用自己的工具降级执行,不允许长时间无响应。
This Skill adopts a dual-mode design of Agent direct execution (main path) + JS script (optional auxiliary):
| Mode | Applicable Scenario | Features |
|---|---|---|
| 🟢 Agent Direct Execution | Default mode, recommended | Progress visible at each step, timeout controllable, automatic fallback after timeout |
| 🔵 JS Script Auxiliary | When batch formatted output is required | Quickly outputs structured JSON, but may get stuck due to network issues |
Core Principle: All shell commands have strict timeouts (15-30s). After timeout, the Agent uses its own tools to execute in a degraded manner; long-term unresponsiveness is not allowed.
工作流程概述
Workflow Overview
步骤⓪ 自更新(先更新 skill-install-manager 自身)
│ ├─ npx skills update 15s → 成功则跳过
│ └─ 失败 → npx skills add 降级
│
▼
步骤① 读取列表文件(从更新后的列表文件读取)
│
▼
步骤② 新旧列表对比(更新前记录旧列表摘要,更新后对比标记新增技能)
│
▼
步骤③ 解析列表(agent 在推理中解析,或调用 compare-skills.js 做格式化)
│
▼
步骤④ 获取安装状态(agent 直接运行 npx skills ls + read_file 读锁文件)
│
▼
步骤⑤ 对比分析(agent 逐一对比,每仓库 git ls-remote 15s 超时,同仓库共享一次查询)
│ ├─ 成功 → 标记 outdated/upToDate
│ └─ 超时 → web_fetch GitHub API 降级 → 标记 unknown
│
▼
步骤⑤.5 依赖预检(新!安装/更新前检查前置技能是否已装,缺失的加入安装队列并优先安装)
│
▼
步骤⑥ 执行安装/更新
│ ├─ 安装顺序:前置依赖 → 新增 → 缺失 → 更新
│ ├─ 已安装技能:npx skills update → add → SSH → 手动
│ ├─ 未安装技能:npx skills add → SSH → 手动(不变)
│ └─ 新增技能:标记为待安装
│
▼
步骤⑦ 生成报告(agent 直接格式化输出,含依赖处理说明)Step 0: Self-update (Update skill-install-manager itself first)
│ ├─ npx skills update 15s → Skip if successful
│ └─ Failed → Fallback to npx skills add
│
▼
Step 1: Read list file (Read from updated list file)
│
▼
Step 2: Compare old and new lists (Record old list summary before update, mark new skills after comparison)
│
▼
Step 3: Parse list (Agent parses during reasoning, or calls compare-skills.js for formatting)
│
▼
Step 4: Get installation status (Agent directly runs npx skills ls + read_file to read lock file)
│
▼
Step 5: Comparative analysis (Agent compares one by one, each repository's git ls-remote has 15s timeout, shared query for the same repository)
│ ├─ Success → Mark as outdated/upToDate
│ └─ Timeout → Fallback to web_fetch GitHub API → Mark as unknown
│
▼
Step 5.5: Dependency Pre-check (New! Check if prerequisite skills are installed before installation/update, add missing ones to installation queue and install first)
│
▼
Step 6: Execute installation/update
│ ├─ Installation order: Prerequisites → Newly added → Missing → Updates
│ ├─ Installed skills: npx skills update → add → SSH → Manual
│ ├─ Uninstalled skills: npx skills add → SSH → Manual (unchanged)
│ └─ Newly added skills: Mark as to be installed
│
▼
Step 7: Generate report (Agent directly formats output, including dependency handling instructions)详细执行步骤
Detailed Execution Steps
步骤⓪:自更新(更新 skill-install-manager 自身)
Step 0: Self-update (Update skill-install-manager itself)
在开始处理技能列表之前,先更新 skill-install-manager 自身到最新版本。这样可以确保技能列表文件是最新的,包含所有新增技能。
Before processing the skill list, first update skill-install-manager to the latest version. This ensures the skill list file is up-to-date and includes all new skills.
执行流程
Execution Flow
-
读取旧列表摘要:在执行更新前,先读取当前技能列表文件,记录所有技能名称集合作为「旧列表摘要」。
references/Reasonix-skill-list-v2.md -
尝试方式 A —(15s 超时):
npx skills updatepowershellnpx skills update skill-install-manager -g -y- 成功(15s 内返回)→ ✅ 自更新成功,跳到步骤 3
- 超时或失败 → 降级到方式 B
-
尝试方式 B —HTTPS(30s 超时):
npx skills addpowershellnpx skills add https://github.com/MarecGents/marec-agent-skills --skill skill-install-manager -g -a reasonix -y- 成功 → ✅ 自更新成功 (add)
- 超时 → 降级到方式 C
-
尝试方式 C —SSH(30s 超时):
npx skills addpowershellnpx skills add git@github.com:MarecGents/marec-agent-skills.git --skill skill-install-manager -g -a reasonix -y- 成功 → ✅ 自更新成功 (ssh)
- 超时 → 降级到方式 D
-
尝试方式 D — 手动下载(参照步骤⑥的方式 C): 直接从 GitHub 下载 skill-install-manager 的最新文件,覆盖本地安装。
-
更新完成后读取新列表:重新读取,记录最新内容以供后续步骤使用。
references/Reasonix-skill-list-v2.md
注意:如果所有更新方式都失败,不阻塞后续流程——使用当前的旧版本继续执行。记录失败原因到最终报告中。
进度报告:⏫ 自更新:成功/失败(方式X)
-
Read old list summary: Before executing the update, read the current skill list fileand record the set of all skill names as the "old list summary".
references/Reasonix-skill-list-v2.md -
Attempt Method A —(15s timeout):
npx skills updatepowershellnpx skills update skill-install-manager -g -y- Successful (returns within 15s) → ✅ Self-update successful, jump to Step 3
- Timeout or failed → Fallback to Method B
-
Attempt Method B —HTTPS (30s timeout):
npx skills addpowershellnpx skills add https://github.com/MarecGents/marec-agent-skills --skill skill-install-manager -g -a reasonix -y- Successful → ✅ Self-update successful (add)
- Timeout → Fallback to Method C
-
Attempt Method C —SSH (30s timeout):
npx skills addpowershellnpx skills add git@github.com:MarecGents/marec-agent-skills.git --skill skill-install-manager -g -a reasonix -y- Successful → ✅ Self-update successful (ssh)
- Timeout → Fallback to Method D
-
Attempt Method D — Manual download (refer to Method C in Step ⑥): Directly download the latest files of skill-install-manager from GitHub and overwrite the local installation.
-
Read new list after update: Re-readand record the latest content for subsequent steps.
references/Reasonix-skill-list-v2.md
Note: If all update methods fail, do not block the subsequent process — continue execution using the current old version. Record the failure reason in the final report.
Progress Report: ⏫ Self-update: Success/Failure (Method X)
步骤①:确定技能列表文件路径
Step 1: Determine skill list file path
- 检查用户是否在任务中明确指定了文件路径。如果是,直接使用。
- 如果用户未指定,按以下优先级查找默认路径:
- (当前工作目录)
./skill-list.md ./skills/skill-list.md./sandbox/dev/skill-list.md- (Skill 内置列表文件)
references/Reasonix-skill-list-v2.md
- 使用 工具读取文件内容。如果文件不存在,向下查找下一优先级。
read_file - 如果所有路径都不存在,询问用户提供文件路径。
- Check if the user explicitly specified a file path in the task. If yes, use it directly.
- If the user did not specify, search for default paths in the following priority:
- (current working directory)
./skill-list.md ./skills/skill-list.md./sandbox/dev/skill-list.md- (Skill built-in list file)
references/Reasonix-skill-list-v2.md
- Use the tool to read the file content. If the file does not exist, search for the next priority path.
read_file - If all paths do not exist, ask the user to provide the file path.
步骤②:新旧列表对比
Step 2: Compare old and new lists
自更新完成后,将更新后的技能列表与更新前记录的「旧列表摘要」进行对比。
-
比较新旧列表的技能名称集合:
- 找出「新列表有、旧列表没有」的技能 → 标记为 🆕 新增技能
- 找出「旧列表有、新列表没有」的技能 → 标记为 🗑️ 已移除技能(保留已安装的,不卸载)
- 两个列表都有的技能 → 标记为 ➡️ 延续技能
-
对 🆕 新增技能 的特殊处理:
- 在后续步骤⑤(对比分析)中,跳过版本检查(因为是全新的),直接标记为 missing(待安装)
- 在后续步骤⑥(执行安装)中,优先安装这些新增技能
-
输出对比结果:
📋 技能列表变更: 🆕 新增: xxx-skill, yyy-skill (N 个) 🗑️ 移除: zzz-skill (N 个) — 不影响已安装 ➡️ 延续: M 个
注意:如果自更新失败(使用旧版本),新旧列表对比的结果为空(无变化),直接跳过此步骤。
After self-update is completed, compare the updated skill list with the "old list summary" recorded before the update.
-
Compare the skill name sets of the old and new lists:
- Skills present in the new list but not in the old list → Mark as 🆕 Newly Added Skills
- Skills present in the old list but not in the new list → Mark as 🗑️ Removed Skills (retain installed ones, do not uninstall)
- Skills present in both lists → Mark as ➡️ Continued Skills
-
Special handling for 🆕 Newly Added Skills:
- Skip version check in subsequent Step ⑤ (Comparative Analysis) since they are brand new, directly mark as missing (to be installed)
- Prioritize installing these newly added skills in subsequent Step ⑥ (Execute Installation)
-
Output comparison results:
📋 Skill List Changes: 🆕 Added: xxx-skill, yyy-skill (N items) 🗑️ Removed: zzz-skill (N items) — No impact on installed skills ➡️ Continued: M items
Note: If self-update fails (using old version), the result of the old and new list comparison is empty (no changes), skip this step directly.
步骤③:解析列表文件
Step 3: Parse list file
agent 直行(主路径):在推理中直接解析文件内容
每行按以下规则处理:
- 以 开头的行 → 提取 URL,开始一个新的来源节
## Origin URL: - 以 格式的行 → 提取技能名称和安装命令
N. <skill-name>: npx skills add ... - 以 格式的行(无安装命令)→ 提取名称,标记 installCmd=null
N. <skill-name> - 空白行或非匹配行 → 跳过
解析结果存入一个临时结构,格式如下:
来源 1: https://github.com/owner/repo
├── skill-a → npx skills add ...
├── skill-b → npx skills add ...
来源 2: https://github.com/another/repo
├── skill-c → npx skills add ...🔵 JS 脚本辅助:如需输出结构化 JSON,可运行以下脚本(可选,非必须):powershellnode "<skill-path>\scripts\compare-skills.js" --parse-only --list "<list-file>"
进度报告:✅ 解析完成:N 个来源,M 个技能
Agent Direct Execution (Main Path): Directly parse file content during reasoning
Process each line according to the following rules:
- Lines starting with → Extract URL and start a new source section
## Origin URL: - Lines in the format → Extract skill name and installation command
N. <skill-name>: npx skills add ... - Lines in the format (without installation command) → Extract name, mark installCmd=null
N. <skill-name> - Blank lines or non-matching lines → Skip
Store the parsing results in a temporary structure, formatted as follows:
Source 1: https://github.com/owner/repo
├── skill-a → npx skills add ...
├── skill-b → npx skills add ...
Source 2: https://github.com/another/repo
├── skill-c → npx skills add ...🔵 JS Script Auxiliary: If structured JSON output is required, run the following script (optional, not mandatory):powershellnode "<skill-path>\scripts\compare-skills.js" --parse-only --list "<list-file>"
Progress Report: ✅ Parsing completed: N sources, M skills
步骤④:获取当前全局安装状态
Step 4: Get current global installation status
agent 直行(主路径):
-
运行以下命令获取全局安装列表:powershell
npx skills ls -g --json如果命令在 15s 内无响应(卡住),按 Ctrl+C 终止并跳过(标记为"安装列表获取失败")。 -
读取锁文件获取版本信息:powershell
Get-Content "$env:USERPROFILE\.agents\.skill-lock.json" | ConvertFrom-Json或者用 MCP工具直接读取read_file。~/.agents/.skill-lock.json -
提取每个已安装技能的:
- — 技能名称
name - — 已安装的 agent 列表
agents - — 安装时的 git commit SHA(用于版本对比)
skillFolderHash - /
sourceUrl— 来源信息skillPath
进度报告:✅ 已读取全局安装状态:N 个已安装技能
Agent Direct Execution (Main Path):
-
Run the following command to get the global installation list:powershell
npx skills ls -g --jsonIf the command has no response (stuck) within 15s, terminate with Ctrl+C and skip (mark as "Failed to get installation list"). -
Read lock file to get version information:powershell
Get-Content "$env:USERPROFILE\.agents\.skill-lock.json" | ConvertFrom-JsonOr use the MCPtool to directly readread_file.~/.agents/.skill-lock.json -
Extract the following information for each installed skill:
- — Skill name
name - — List of installed agents
agents - — Git commit SHA at installation (used for version comparison)
skillFolderHash - /
sourceUrl— Source informationskillPath
Progress Report: ✅ Global installation status read: N installed skills
步骤⑤:对比分析
Step 5: Comparative analysis
agent 直行(主路径) — 在推理中逐一对比,每步报告进度:
Agent Direct Execution (Main Path) — Compare one by one during reasoning, report progress at each step:
5.1 按来源分组处理
5.1 Process by source grouping
将步骤③解析的 origins 列表按 URL 分组,同一仓库的技能一起处理。
Group the origins list parsed in Step ③ by URL, process skills from the same repository together.
5.2 逐仓库版本检查
5.2 Version check per repository
对每个来源仓库(同一仓库只查一次,仓库内多个技能共享查询结果,避免重复网络请求):
正在检查: [仓库名称] (N 个技能)...方式 A(优先)— 快速检查:
git ls-remotepowershell
$job = Start-Job -ScriptBlock { git ls-remote https://github.com/{owner}/{repo}.git HEAD }
$result = $job | Wait-Job -Timeout 15
if ($result) {
$sha = (Receive-Job $job).Trim().Split()[0]
Remove-Job $job
} else {
Stop-Job $job; Remove-Job $job
# 降级到方式 B
}- 成功(15s 内返回)→ 提取 SHA,与锁文件对比 → 标记 outdated/upToDate
- 超时(15s 无响应)→ 降级到方式 B
方式 B(降级)— GitHub API 查询:
web_fetchweb_fetch: https://api.github.com/repos/{owner}/{repo}/commits?per_page=1- 成功 → 从返回的 JSON 中提取 latest_commit.sha
- 失败 → 标记为"状态未知(网络不可达)"
For each source repository (Query once per repository only, multiple skills in the same repository share the query result to avoid repeated network requests):
Checking: [Repository Name] (N skills)...Method A (Priority) — Quick Check:
git ls-remotepowershell
$job = Start-Job -ScriptBlock { git ls-remote https://github.com/{owner}/{repo}.git HEAD }
$result = $job | Wait-Job -Timeout 15
if ($result) {
$sha = (Receive-Job $job).Trim().Split()[0]
Remove-Job $job
} else {
Stop-Job $job; Remove-Job $job
# Fallback to Method B
}- Successful (returns within 15s) → Extract SHA, compare with lock file → Mark as outdated/upToDate
- Timeout (no response within 15s) → Fallback to Method B
Method B (Fallback) — GitHub API Query:
web_fetchweb_fetch: https://api.github.com/repos/{owner}/{repo}/commits?per_page=1- Successful → Extract latest_commit.sha from returned JSON
- Failed → Mark as "Status unknown (network unreachable)"
5.3 分类汇总
5.3 Classification summary
每处理完一个仓库,实时输出进度(同一仓库的技能共享同一次 commit 查询,结果一致):
📦 anthropics/skills (7 skills):
✅ 仓库最新 commit 9d2f1a...(1 次查询,7 个技能共享)
✅ skill-creator → 可更新 (hash: 7e3c9c... → 9d2f1a...)
📦 obra/superpowers (2 skills):
⚠️ git ls-remote 超时 → web_fetch 降级 → 最新 commit d884ae...
✅ brainstorming → 可更新
✅ systematic-debugging → 已最新
... (等)After processing each repository, output progress in real-time (skills in the same repository share the same commit query result, consistent results):
📦 anthropics/skills (7 skills):
✅ Latest commit of repository 9d2f1a... (1 query, shared by 7 skills)
✅ skill-creator → Updatable (hash: 7e3c9c... → 9d2f1a...)
📦 obra/superpowers (2 skills):
⚠️ git ls-remote timeout → Fallback to web_fetch → Latest commit d884ae...
✅ brainstorming → Updatable
✅ systematic-debugging → Up to date
... (etc)步骤⑤.5:依赖预检(安装/更新前)
Step 5.5: Dependency Pre-check (Before installation/update)
在执行安装/更新之前,先检查待处理技能(missing / 🆕 / outdated)的前置依赖是否已安装,避免装上技能后因缺少前置技能而无法工作。
Before executing installation/update, first check if prerequisite skills for pending skills (missing / 🆕 / outdated) are installed to avoid skills being installed but unable to work due to missing prerequisites.
5.5.1 判定依据
5.5.1 Judgment Basis
按以下优先级查找技能的前置依赖声明(只要命中任一来源即可):
- 列表文件标注:如果 中某技能名出现在另一技能条目附近且有依赖说明,直接采用
Reasonix-skill-list-v2.md - 技能自身元数据:读取待安装技能 的 frontmatter,检查
SKILL.md、related_skills、dependencies字段requires - 已知依赖模式(无需联网,直接内置判断):
- → 依赖
default、brainstorming、planning-with-files-zhskill-standard-harness - → 依赖
github-project-replication、brainstorming、planning-with-files-zhskill-standard-harness - → 依赖
academic-pipeline、academic-paper、academic-paper-reviewerdeep-research - /
ieee-mg-writing/ieee-mg-polishing→ 依赖ieee-mg-reviewerieee-mg-share - 系列 → 依赖
nature-*(或同源nature-shared)_shared - → 依赖
grill-me(同一仓库,必须一并安装)grilling - → 依赖
zh-quotes(作为 docx 的子技能)docx - → 文本提取需要
pptx(pip 包,如列表含 markitdown 技能则一并安装)markitdown - → 依赖
researchwrite、brainstorming(docx/professor为设计灵感,非运行依赖,不入列)avoid-ai-writing
Find the prerequisite dependency declaration of skills in the following priority (as long as any source is hit):
- List file annotation: If a skill name appears near another skill entry in with dependency instructions, use it directly
Reasonix-skill-list-v2.md - Skill's own metadata: Read the frontmatter of the to-be-installed skill's , check
SKILL.md,related_skills,dependenciesfieldsrequires - Known dependency patterns (no network required, built-in judgment directly):
- → Depends on
default,brainstorming,planning-with-files-zhskill-standard-harness - → Depends on
github-project-replication,brainstorming,planning-with-files-zhskill-standard-harness - → Depends on
academic-pipeline,academic-paper,academic-paper-reviewerdeep-research - /
ieee-mg-writing/ieee-mg-polishing→ Depends onieee-mg-reviewerieee-mg-share - series → Depends on
nature-*(or homologousnature-shared)_shared - → Depends on
grill-me(same repository, must be installed together)grilling - → Depends on
zh-quotes(as a sub-skill of docx)docx - → Text extraction requires
pptx(pip package, install together if markitdown skill is in the list)markitdown - → Depends on
researchwrite,brainstorming(docx/professorare design inspirations, not runtime dependencies, not included)avoid-ai-writing
5.5.2 处理流程
5.5.2 Processing Flow
- 对每个待处理技能,解析出前置依赖技能集合
- 与「当前已安装列表」(步骤④结果)对比:
- 前置已安装 → 无需处理,继续
- 前置未安装 → 将前置技能加入安装队列(记入 ),并标注来源技能
pendingDeps
- 依赖入列规则:
- 前置技能若已存在于列表文件(有 installCmd)→ 直接加入安装队列
- 前置技能不在列表文件 → 报告给用户,询问是否将该前置技能的安装命令补充进列表文件后再安装
- 同一仓库的前置技能(如 grill-me → grilling)→ 优先同仓库安装,减少网络请求
- 输出依赖预检结果:
🔗 依赖预检:
grill-me → 依赖 grilling(同仓库,已加入安装队列)
default → 依赖 brainstorming/planning-with-files-zh/skill-standard-harness(均已安装 ✅)
ieee-mg-writing → 依赖 ieee-mg-share(已安装 ✅)- Parse the set of prerequisite skills for each pending skill
- Compare with the "current installed list" (result of Step ④):
- Prerequisite installed → No processing needed, continue
- Prerequisite not installed → Add the prerequisite skill to the installation queue (record in ), and mark the source skill
pendingDeps
- Dependency queuing rules:
- If the prerequisite skill exists in the list file (has installCmd) → Add to installation queue directly
- If the prerequisite skill is not in the list file → Report to the user, ask whether to add the installation command of the prerequisite skill to the list file before installation
- Prerequisite skills from the same repository (e.g., grill-me → grilling) → Prioritize installation in the same repository to reduce network requests
- Output dependency pre-check results:
🔗 Dependency Pre-check:
grill-me → Depends on grilling (same repository, added to installation queue)
default → Depends on brainstorming/planning-with-files-zh/skill-standard-harness (all installed ✅)
ieee-mg-writing → Depends on ieee-mg-share (installed ✅)步骤⑥:执行安装/更新
Step 6: Execute installation/update
对 missing(缺失)、outdated(可更新)和 🆕 新增技能,按以下规则安装或更新:
For missing, outdated and 🆕 newly added skills, install or update according to the following rules:
6.1 判断技能状态
6.1 Judge skill status
根据技能的状态选择安装方式:
| 状态 | 安装方式 |
|---|---|
| missing(未安装) | |
| outdated(已安装可更新) | |
| 🆕 新增(列表新增) | 等同 missing,标记为待安装 |
| pendingDeps(依赖预检入列) | 等同 missing,但优先于其他所有状态安装 |
Agent 参数统一(白名单):所有命令统一使用npx skills add(四个 Agent 全量安装,agent 名全部小写连字符:-a reasonix -a claude-code -a opencode -a codex、reasonix、claude-code、opencode)。不安装 GitHub Copilot(codex)与 Kimi Code CLI(github-copilot)——这是本机确定的安装白名单,任何安装/更新命令不得包含这两个 agent。若某些 Agent 未安装导致报错,可回退到kimi-code-cli单 Agent。-a reasonix
Select installation method based on skill status:
| Status | Installation Method |
|---|---|
| missing (not installed) | |
| outdated (installed and updatable) | |
| 🆕 Newly Added (added to list) | Equivalent to missing, marked as to be installed |
| pendingDeps (added via dependency pre-check) | Equivalent to missing, but installed prior to all other statuses |
Unified Agent Parameters (Whitelist): Allcommands uniformly usenpx skills add(install all four Agents, agent names are all lowercase hyphenated:-a reasonix -a claude-code -a opencode -a codex,reasonix,claude-code,opencode). Do not install GitHub Copilot (codex) and Kimi Code CLI (github-copilot) — this is the confirmed installation whitelist for this machine, no installation/update command shall include these two agents. If errors occur due to some Agents not being installed, fallback tokimi-code-clisingle Agent.-a reasonix
6.2 对 missing / 🆕 新增技能:执行安装
6.2 For missing / 🆕 newly added skills: Execute installation
正在安装: [skill-name] (来源: [origin-url])...尝试 A — HTTPS 安装(30s 超时):
powershell
$job = Start-Job -ScriptBlock { npx skills add "{url}" --skill "{name}" -g -a reasonix -a claude-code -a opencode -a codex -y }
$result = $job | Wait-Job -Timeout 30
if ($result) {
$output = Receive-Job $job
Remove-Job $job
# 安装成功 → ✅
} else {
Stop-Job $job; Remove-Job $job
# 超时 → 降级到尝试 B
}- 成功(30s 内返回)→ ✅ 记录成功
- 超时(30s 无响应)→ 降级到尝试 B
尝试 B(降级)— SSH 安装(30s 超时):
URL 转换: https://github.com/owner/repo → git@github.com:owner/repo.gitpowershell
$job = Start-Job -ScriptBlock { npx skills add "git@github.com:{owner}/{repo}.git" --skill "{name}" -g -a reasonix -y }
$result = $job | Wait-Job -Timeout 30- 成功 → ✅ (ssh) 记录成功
- 超时 → 降级到尝试 C
尝试 C(最终降级)— agent 直接手动下载安装:
当 完全不可用时,agent 用自己的工具完成安装:
npx skills add-
获取仓库默认分支:
web_fetch: https://api.github.com/repos/{owner}/{repo}提取(通常为 main 或 master)default_branch -
获取文件树,定位 skill 目录:
web_fetch: https://api.github.com/repos/{owner}/{repo}/git/trees/{default_branch}?recursive=1在文件树中查找包含技能名称的路径,确定基础路径。 -
逐个下载所有文件: 对基础路径下的每个 blob 文件:
web_fetch: https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{filepath}将内容写入。~/.agents/skills/{skill-name}/{relative-path}- 使用 (
bash+New-Item)或 MCP FilesystemSet-Content写入write_file
- 使用
-
更新锁文件:powershell
$lock = Get-Content "$env:USERPROFILE\.agents\.skill-lock.json" | ConvertFrom-Json $lock.skills."{name}" = @{ source = "{owner}/{repo}" sourceType = "github" sourceUrl = "https://github.com/{owner}/{repo}.git" skillPath = "{base-path}" skillFolderHash = "{tree-sha}" installedAt = (Get-Date -Format o) updatedAt = (Get-Date -Format o) } $lock | ConvertTo-Json -Depth 10 | Set-Content "$env:USERPROFILE\.agents\.skill-lock.json" -
注册 skill(可选): 手动安装后,如果有可用,运行:
npx skillspowershellnpx skills experimental_sync -y如果仍不可用,告知用户 skill 文件已写入但需手动注册。npx skills
Installing: [skill-name] (Source: [origin-url])...Attempt A — HTTPS Installation (30s timeout):
powershell
$job = Start-Job -ScriptBlock { npx skills add "{url}" --skill "{name}" -g -a reasonix -a claude-code -a opencode -a codex -y }
$result = $job | Wait-Job -Timeout 30
if ($result) {
$output = Receive-Job $job
Remove-Job $job
# Installation successful → ✅
} else {
Stop-Job $job; Remove-Job $job
# Timeout → Fallback to Attempt B
}- Successful (returns within 30s) → ✅ Record success
- Timeout (no response within 30s) → Fallback to Attempt B
Attempt B (Fallback) — SSH Installation (30s timeout):
URL Conversion: https://github.com/owner/repo → git@github.com:owner/repo.gitpowershell
$job = Start-Job -ScriptBlock { npx skills add "git@github.com:{owner}/{repo}.git" --skill "{name}" -g -a reasonix -y }
$result = $job | Wait-Job -Timeout 30- Successful → ✅ (ssh) Record success
- Timeout → Fallback to Attempt C
Attempt C (Final Fallback) — Agent direct manual download installation:
When is completely unavailable, the Agent uses its own tools to complete installation:
npx skills add-
Get repository default branch:
web_fetch: https://api.github.com/repos/{owner}/{repo}Extract(usually main or master)default_branch -
Get file tree, locate skill directory:
web_fetch: https://api.github.com/repos/{owner}/{repo}/git/trees/{default_branch}?recursive=1Find the path containing the skill name in the file tree to determine the base path. -
Download all files one by one: For each blob file under the base path:
web_fetch: https://raw.githubusercontent.com/{owner}/{repo}/{branch}/{filepath}Write the content to.~/.agents/skills/{skill-name}/{relative-path}- Use (
bash+New-Item) or MCP FilesystemSet-Contentto writewrite_file
- Use
-
Update lock file:powershell
$lock = Get-Content "$env:USERPROFILE\.agents\.skill-lock.json" | ConvertFrom-Json $lock.skills."{name}" = @{ source = "{owner}/{repo}" sourceType = "github" sourceUrl = "https://github.com/{owner}/{repo}.git" skillPath = "{base-path}" skillFolderHash = "{tree-sha}" installedAt = (Get-Date -Format o) updatedAt = (Get-Date -Format o) } $lock | ConvertTo-Json -Depth 10 | Set-Content "$env:USERPROFILE\.agents\.skill-lock.json" -
Register skill (optional): After manual installation, ifis available, run:
npx skillspowershellnpx skills experimental_sync -yIfis still unavailable, inform the user that the skill files have been written but need manual registration.npx skills
6.3 对 outdated(已安装可更新)技能:执行更新
6.3 For outdated (installed and updatable) skills: Execute update
对于已安装且可更新的技能,优先使用 ,而不是重新 add。
npx skills update正在更新: [skill-name]...尝试 A(优先)— (15s 超时):
npx skills updatepowershell
npx skills update {name} -g -y- 成功(15s 内返回)→ ✅ 记录成功(update)
- 超时或失败 → 降级到尝试 B
尝试 B — HTTPS(30s 超时):
npx skills addpowershell
npx skills add "{url}" --skill "{name}" -g -a reasonix -y- 成功 → ✅ 记录成功(add)
- 超时 → 降级到尝试 C
尝试 C — SSH 安装(30s 超时):
URL 转换: https://github.com/owner/repo → git@github.com:owner/repo.gitpowershell
npx skills add "git@github.com:{owner}/{repo}.git" --skill "{name}" -g -a reasonix -y- 成功 → ✅ 记录成功(ssh)
- 超时 → 降级到尝试 D
尝试 D — 手动下载(同 6.2 尝试 C 的流程)
For installed and updatable skills, prioritize using instead of re-adding.
npx skills updateUpdating: [skill-name]...Attempt A (Priority) — (15s timeout):
npx skills updatepowershell
npx skills update {name} -g -y- Successful (returns within 15s) → ✅ Record success (update)
- Timeout or failed → Fallback to Attempt B
Attempt B — HTTPS (30s timeout):
npx skills addpowershell
npx skills add "{url}" --skill "{name}" -g -a reasonix -y- Successful → ✅ Record success (add)
- Timeout → Fallback to Attempt C
Attempt C — SSH Installation (30s timeout):
URL Conversion: https://github.com/owner/repo → git@github.com:owner/repo.gitpowershell
npx skills add "git@github.com:{owner}/{repo}.git" --skill "{name}" -g -a reasonix -y- Successful → ✅ Record success (ssh)
- Timeout → Fallback to Attempt D
Attempt D — Manual download (same process as Attempt C in 6.2)
6.4 安装顺序
6.4 Installation Order
按以下优先级安装(依赖优先,确保前置技能先就位):
- 🔗 pendingDeps 前置依赖技能(最先安装,其他技能的前置必须先装好)
- 🆕 新增技能(其次安装,确保新技能尽快就位)
- ❌ 缺失技能(再次安装)
- 🔄 可更新技能(最后更新)
同仓库的技能尽量连续处理(共享一次 与 clone 缓存),减少网络请求。依赖技能的安装失败不阻塞依赖方安装,但在最终报告中明确标注依赖未满足。
git ls-remoteInstall in the following priority (Dependencies first, ensure prerequisites are in place first):
- 🔗 pendingDeps Pre-dependency Skills (Install first, prerequisites for other skills must be installed first)
- 🆕 Newly Added Skills (Install next, ensure new skills are available as soon as possible)
- ❌ Missing Skills (Install next)
- 🔄 Updatable Skills (Update last)
Skills from the same repository should be processed consecutively as much as possible (share one and clone cache) to reduce network requests. Installation failure of dependency skills does not block the installation of dependent skills, but clearly mark unmet dependencies in the final report.
git ls-remote步骤⑦:生成报告
Step 7: Generate report
agent 直行(主路径) — 直接格式化输出:
╔════════════════════════════════════════════╗
║ Skill 安装/更新报告 ║
╚════════════════════════════════════════════╝
📊 汇总:
总计 : 36 个技能
已安装 : 36 个
缺失 : 0 个
可更新 : 5 个(已更新: 3, 失败: 2)
已最新 : 28 个
状态未知 : 3 个
依赖补齐 : 1 个(grilling,因 grill-me 依赖而入列)
🔗 依赖处理:
✅ grill-me → grilling(已一并安装)
✅ ieee-mg-writing → ieee-mg-share(已安装)
❌ pptx → markitdown(pip 包,需手动 pip install "markitdown[pptx]")
📦 anthropics/skills:
✅ skill-creator → 已更新 (HTTPS)
📦 imbad0202/academic-research-skills:
✅ academic-paper → 已更新 (SSH 降级)
❌ academic-pipeline → 更新失败: 手动下载超时
📦 MarecGents/marec-agent-skills:
⏭️ check-reasonix-update → 状态未知(锁文件数据缺失)Agent Direct Execution (Main Path) — Directly format output:
╔════════════════════════════════════════════╗
║ Skill Installation/Update Report ║
╚════════════════════════════════════════════╝
📊 Summary:
Total : 36 skills
Installed : 36 skills
Missing : 0 skills
Updatable : 5 skills (Updated: 3, Failed: 2)
Up to date: 28 skills
Unknown status: 3 skills
Dependencies filled: 1 (grilling, added due to grill-me dependency)
🔗 Dependency Handling:
✅ grill-me → grilling (installed together)
✅ ieee-mg-writing → ieee-mg-share (installed)
❌ pptx → markitdown (pip package, need to manually run pip install "markitdown[pptx]")
📦 anthropics/skills:
✅ skill-creator → Updated (HTTPS)
📦 imbad0202/academic-research-skills:
✅ academic-paper → Updated (SSH fallback)
❌ academic-pipeline → Update failed: Manual download timeout
📦 MarecGents/marec-agent-skills:
⏭️ check-reasonix-update → Unknown status (lock file data missing)JS 辅助脚本(可选)
JS Auxiliary Scripts (Optional)
本技能附带 JS 脚本作为可选辅助工具,非核心工作流依赖:
| 脚本 | 用途 | 触发方式 |
|---|---|---|
| 共享工具模块 | 被其他脚本引用 |
| 快速输出结构化 JSON | |
| 批量安装带三级回退 | |
使用场景:当需要快速获取格式化 JSON 输出(如集成到其他工具链)时使用。日常工作流中推荐使用 agent 直行模式。
This skill comes with JS scripts as optional auxiliary tools, not core workflow dependencies:
| Script | Purpose | Trigger Method |
|---|---|---|
| Shared tool module | Referenced by other scripts |
| Quickly output structured JSON | |
| Batch installation with three-level fallback | |
Usage Scenario: Use when quick formatted JSON output is needed (e.g., integration into other toolchains). Agent direct execution mode is recommended for daily workflows.
参考文件
Reference Files
- — 内置的技能列表文件,包含所有 Origin URL 及对应 Skills
references/Reasonix-skill-list-v2.md - — 技能列表文件的格式说明
references/skill-list-format.md
- — Built-in skill list file, containing all Origin URLs and corresponding Skills
references/Reasonix-skill-list-v2.md - — Format description of skill list files
references/skill-list-format.md
使用示例
Usage Examples
示例 1:完整同步
用户:帮我同步一下技能
执行流程:
0. 自更新: → 成功,获取新版列表
npx skills update skill-install-manager -g -y- 读取更新后的内置列表文件
references/Reasonix-skill-list-v2.md - 新旧对比:对比旧摘要,发现新增 2 个技能 → 标记 🆕
- agent 解析:7 个来源,38 个技能
- → 读取安装状态
npx skills ls -g --json - 逐仓库 对比版本(设 15s 超时)
git ls-remote- anthropics/skills → 成功,skill-creator 可更新
- Yuan1z0825/nature-skills → 超时,web_fetch 降级成功
- 执行安装/更新:
- 🆕 新增技能 → 安装
npx skills add - outdated 技能 → 优先更新
npx skills update
- 🆕 新增技能 →
- 输出报告
示例 2:安装特定技能
用户:帮我安装 xx-skill,列表在 ./my-list.md
执行流程:
- 读取
./my-list.md - 解析找到 xx-skill 及其来源 URL
- 检查是否已安装 → 未安装
- (30s 超时)
npx skills add <url> --skill xx-skill -g -a reasonix -y - 成功 → ✅ 输出报告
示例 3:已安装技能更新
用户:把已安装的技能都更新到最新
执行流程:
0. 自更新 skill-install-manager → 获取最新技能列表
- 读取列表文件
- 获取全局安装状态
- 对比分析 → 找出 outdated 技能
- 对每个 outdated 技能:
- (15s 超时)→ 成功 ✅
npx skills update <name> -g -y - 失败则降级
npx skills add
- 输出更新报告
示例 4:完全离线安装(npx 不可用)
- 解析列表,确定需要安装的技能列表
- 对所有技能,直接走手动下载流程
- GitHub API → 获取文件树
web_fetch - raw 内容 → 写入
web_fetch~/.agents/skills/ - 更新锁文件
- 告知用户文件已就位
Example 1: Full Sync
User: Help me sync my skills
Execution Flow:
0. Self-update: → Successful, get new version list
npx skills update skill-install-manager -g -y- Read updated built-in list file
references/Reasonix-skill-list-v2.md - Old and new comparison: Compare with old summary, find 2 newly added skills → Mark as 🆕
- Agent parses: 7 sources, 38 skills
- → Read installation status
npx skills ls -g --json - Compare versions per repository with (15s timeout set)
git ls-remote- anthropics/skills → Successful, skill-creator is updatable
- Yuan1z0825/nature-skills → Timeout, web_fetch fallback successful
- Execute installation/update:
- 🆕 Newly added skills → Install via
npx skills add - Outdated skills → Prioritize update via
npx skills update
- 🆕 Newly added skills → Install via
- Output report
Example 2: Install Specific Skill
User: Help me install xx-skill, the list is in ./my-list.md
Execution Flow:
- Read
./my-list.md - Parse and find xx-skill and its source URL
- Check if installed → Not installed
- (30s timeout)
npx skills add <url> --skill xx-skill -g -a reasonix -y - Successful → ✅ Output report
Example 3: Update Installed Skills
User: Update all installed skills to the latest version
Execution Flow:
0. Self-update skill-install-manager → Get latest skill list
- Read list file
- Get global installation status
- Comparative analysis → Identify outdated skills
- For each outdated skill:
- (15s timeout) → Successful ✅
npx skills update <name> -g -y - Fallback to if failed
npx skills add
- Output update report
Example 4: Fully Offline Installation (npx unavailable)
- Parse list, determine the list of skills to install
- For all skills, directly proceed with manual download process
- GitHub API → Get file tree
web_fetch - raw content → Write to
web_fetch~/.agents/skills/ - Update lock file
- Inform user that files are in place
注意事项
Notes
- 超时设计:所有 shell 命令使用 +
Start-Job控制超时,避免长时间卡住。Wait-Job -Timeout15s 超时,git ls-remote15s 超时,npx skills update30s 超时。npx skills add - 降级路径:每步都有明确的降级路径:shell 超时 → web_fetch 降级 → 手动文件操作。不允许失败后无反馈。
- 进度可见:每处理完一个仓库/技能,必须输出进度标记(/
✅/⚠️),不能长时间静默。❌ - 网络环境:GitHub API()和 raw 文件(
api.github.com)可能需要代理。如果所有方式都失败,向用户报告具体情况。raw.githubusercontent.com - 文件路径:Windows 路径中的反斜杠需要用双引号包裹,或在 PowerShell 中使用单引号。
- :这是
skillFolderHash中记录的安装时刻的 git commit SHA(40 位十六进制)。如果锁文件中缺少此字段,技能会被标记为"状态未知",agent 会尝试通过.skill-lock.jsonGitHub API 获取远程版本作为参考。旧版安装器(v2.2 前)可能写入 64 位 blob/tree SHA——此类记录无法与web_fetch的 commit SHA 对比,compare-skills.js 会将其归入git ls-remote(带unknown)而非误报refreshHint;执行outdated刷新锁记录后可恢复对比。npx skills update - 分类:列表中的特殊条目(如
skippable共享资源目录)没有安装命令,跳过不处理。_shared - 优先:对于已安装的技能,优先使用
npx skills update(15s 超时),而不是重新 add。这比npx skills update <skill-name> -g -y更快(只更新已安装的技能,无需重新克隆整个仓库),且不会重复复制文件。仅当 update 失败时,才降级到 add。npx skills add - 依赖预检必做:步骤⑤.5 的依赖预检不可跳过。凡是安装/更新缺失或新增技能,必须先检查其前置依赖;依赖未安装会导致技能装上但不可用(如只有 grill-me 没有 grilling)。
- 路径大小写:等路径大小写敏感,务必使用
MarecGents确认的准确路径。pwd - Agent 名称大小写与白名单:的
npx skills add参数中 agent 名称大小写敏感,且必须使用小写连字符形式。Reasonix 为-a、Claude Code 为reasonix、OpenCode 为claude-code、Codex 为opencode。使用展示名(codex/Reasonix/Claude Code)会报OpenCode错误。本机安装白名单仅限以上 4 个 agent——不要安装Invalid agents(GitHub Copilot)与github-copilot(Kimi Code CLI)。kimi-code-cli
- Timeout Design: All shell commands use +
Start-Jobto control timeout and avoid long-term stuck.Wait-Job -Timeouthas 15s timeout,git ls-remotehas 15s timeout,npx skills updatehas 30s timeout.npx skills add - Fallback Path: Each step has a clear fallback path: shell timeout → web_fetch fallback → manual file operation. No feedback failure is allowed.
- Progress Visibility: After processing each repository/skill, must output progress markers (/
✅/⚠️), no long-term silence allowed.❌ - Network Environment: GitHub API () and raw files (
api.github.com) may require proxy. If all methods fail, report specific situation to the user.raw.githubusercontent.com - File Path: Backslashes in Windows paths need to be wrapped in double quotes, or use single quotes in PowerShell.
- : This is the git commit SHA (40-bit hexadecimal) recorded in
skillFolderHashat installation time. If this field is missing in the lock file, the skill will be marked as "unknown status", and the Agent will try to get the remote version via.skill-lock.jsonGitHub API as reference. Old version installers (before v2.2) may write 64-bit blob/tree SHA — such records cannot be compared with the commit SHA fromweb_fetch, compare-skills.js will classify them asgit ls-remote(withunknown) instead of false reportingrefreshHint; comparison can be restored after executingoutdatedto refresh the lock record.npx skills update - Category: Special entries in the list (such as
skippableshared resource directory) have no installation command, skip processing._shared - Priority: For installed skills, prioritize using
npx skills update(15s timeout) instead of re-adding. This is faster thannpx skills update <skill-name> -g -y(only updates installed skills, no need to re-clone the entire repository) and does not duplicate file copying. Only fallback to add when update fails.npx skills add - Dependency Pre-check Mandatory: The dependency pre-check in Step ⑤.5 cannot be skipped. Whenever installing/updating missing or newly added skills, must first check their prerequisites; missing dependencies will cause skills to be installed but unavailable (e.g., only grill-me without grilling).
- Path Case Sensitivity: Paths like are case-sensitive, be sure to use the exact path confirmed by
MarecGents.pwd - Agent Name Case and Whitelist: The agent names in the parameter of
-aare case-sensitive, and must use lowercase hyphenated form. Reasonix isnpx skills add, Claude Code isreasonix, OpenCode isclaude-code, Codex isopencode. Using display names (codex/Reasonix/Claude Code) will result inOpenCodeerror. The installation whitelist for this machine is limited to the above 4 agents — do not installInvalid agents(GitHub Copilot) andgithub-copilot(Kimi Code CLI).kimi-code-cli