npx skills add https://github.com/boshu2/agentops --skill heal-skill目的: 检测并自动修复
skills/目录下常见的技能规范性问题。
你必须执行此工作流。不要仅仅描述它。
/heal-skill # 检查所有技能(仅报告)
/heal-skill --fix # 自动修复所有可修复的问题
/heal-skill --strict # 检查所有技能,发现问题时退出码为 1(CI 模式)
/heal-skill skills/council # 检查特定技能
/heal-skill --fix skills/vibe # 修复特定技能
按顺序运行十项检查:
| 代码 | 问题 | 是否可自动修复? |
|---|---|---|
MISSING_NAME | SKILL.md 的 frontmatter 中没有 name: 字段 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 是 —— 从目录名添加名称 |
MISSING_DESC | SKILL.md 的 frontmatter 中没有 description: 字段 | 是 —— 添加占位符 |
NAME_MISMATCH | Frontmatter 中的 name 与目录名不一致 | 是 —— 更新为与目录名匹配 |
UNLINKED_REF | references/ 中的文件未在 SKILL.md 中链接 | 是 —— 将纯反引号引用转换为 Markdown 链接 |
EMPTY_DIR | 技能目录存在但没有 SKILL.md 文件 | 是 —— 移除空目录 |
DEAD_REF | SKILL.md 引用了不存在的 references/ 文件 | 否 —— 仅警告 |
SCRIPT_REF_MISSING | SKILL.md 引用了不存在的 scripts/ 文件 | 否 —— 仅警告 |
INVALID_AO_CMD | SKILL.md 引用了不存在的 ao 子命令(仅在 ao 在 PATH 中时运行) | 否 —— 仅警告 |
DEAD_XREF | SKILL.md 引用了 /skill-name,但没有找到对应的技能目录 | 否 —— 仅警告 |
CATALOG_MISSING | 一个用户可调用的技能未出现在 using-agentops 目录中 | 否 —— 仅警告 |
# 检查模式(默认)—— 仅报告,不修改
bash skills/heal-skill/scripts/heal.sh --check
# 修复模式 —— 自动修复可修复的问题
bash skills/heal-skill/scripts/heal.sh --fix
# 针对特定技能
bash skills/heal-skill/scripts/heal.sh --check skills/council
bash skills/heal-skill/scripts/heal.sh --fix skills/council
--check 模式下,即使发现问题也返回退出码 0(仅报告)。--strict 或 --fix 标志时报告了问题。在 --fix 模式下,可修复的问题已被修复;重新运行 --check 以确认。显示输出。如果使用了 --fix,总结所做的更改。如果仍有 DEAD_REF 问题,建议用户手动移除或更新损坏的引用。
每个问题占一行:
[MISSING_NAME] skills/foo: Frontmatter 中缺少 name 字段
[MISSING_DESC] skills/foo: Frontmatter 中缺少 description 字段
[NAME_MISMATCH] skills/foo: Frontmatter 名称 'bar' 与目录名 'foo' 不匹配
[UNLINKED_REF] skills/foo: refs/bar.md 未在 SKILL.md 中链接
[EMPTY_DIR] skills/foo: 目录存在但没有 SKILL.md 文件
[DEAD_REF] skills/foo: SKILL.md 链接到不存在的 refs/bar.md
[SCRIPT_REF_MISSING] skills/foo: 引用了 scripts/bar.sh 但文件未找到
[INVALID_AO_CMD] skills/foo: 引用了 'ao badcmd',这不是有效的子命令
[DEAD_XREF] skills/foo: 引用了 /nonexistent 但未找到对应的技能目录
[CATALOG_MISSING] using-agentops: bar 是用户可调用的技能,但未出现在目录中
--fix 会产生相同的结果。DEAD_REF、SCRIPT_REF_MISSING、INVALID_AO_CMD、DEAD_XREF 和 CATALOG_MISSING 仅作警告,因为正确的解决方式需要人工判断。INVALID_AO_CMD 仅在 ao CLI 在 PATH 中可用时运行。否则静默跳过。CATALOG_MISSING 是全局检查(非针对单个技能),仅在 using-agentops/SKILL.md 存在时运行。skills/ 下的所有目录。--strict:发现任何问题时退出码为 1。不使用 --strict 时,检查模式即使发现问题也退出码为 0。用户输入: /heal-skill
执行过程:
skills/ 下的每个目录,针对每个技能检查十类问题(缺少名称、缺少描述、名称不匹配、未链接的引用、空目录、死引用、脚本引用完整性、CLI 命令验证、交叉引用验证、目录完整性)。[NAME_MISMATCH] skills/foo: Frontmatter 名称 'bar' 与目录名 'foo' 不匹配)。--strict 或 --fix 标志时退出码为 1。结果: 一份诊断报告,显示仓库中所有技能的规范性问题,且不修改任何文件。
用户输入: /heal-skill --fix skills/vibe
执行过程:
skills/vibe/,对该技能运行所有针对单个技能的检查。MISSING_NAME、UNLINKED_REF),脚本自动应用修复 —— 从目录名添加名称、将纯反引号引用转换为 Markdown 链接等。DEAD_REF 问题将作为警告报告,因为它们需要人工判断来解决。结果: skills/vibe/SKILL.md 被原地修复,并附有已应用更改的摘要和任何剩余的警告。
| 问题 | 原因 | 解决方案 |
|---|---|---|
DEAD_REF 问题在 --fix 后仍然存在 | 死引用仅作警告,因为正确的修复(删除、创建或更新)需要人工判断 | 手动检查每个死引用,要么创建缺失的文件,要么从 SKILL.md 中移除链接,要么更新路径 |
脚本报告正在开发的技能存在 EMPTY_DIR | 技能目录已创建但尚未编写 SKILL.md 文件 | 要么在目录中添加 SKILL.md 文件,要么移除空目录。运行 --fix 会自动移除它 |
NAME_MISMATCH 修复更改了错误的名称 | 脚本总是将 frontmatter 中的 name 更新为与目录名匹配,而不是反过来 | 如果目录名错误,请先重命名目录,然后重新运行 --fix |
| 脚本退出码为 0,但技能仍有问题 | 问题类型不属于修复脚本检测的十类检查之一 | 修复脚本仅涵盖结构规范性问题。内容质量问题需要手动审查或 /council 验证 |
运行两次 --fix 产生不同的输出 | 这不应该发生 —— 脚本是幂等的 | 提交错误报告。检查两次运行之间是否有其他进程修改了技能文件 |
每周安装数
162
代码仓库
GitHub 星标数
204
首次出现
2026年2月17日
安全审计
安装于
opencode161
codex157
gemini-cli156
github-copilot156
amp156
kimi-cli156
Purpose: Detect and auto-fix common skill hygiene issues across the skills/ directory.
YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
/heal-skill # Check all skills (report only)
/heal-skill --fix # Auto-repair all fixable issues
/heal-skill --strict # Check all skills, exit 1 on findings (CI mode)
/heal-skill skills/council # Check a specific skill
/heal-skill --fix skills/vibe # Fix a specific skill
Ten checks, run in order:
| Code | Issue | Auto-fixable? |
|---|---|---|
MISSING_NAME | No name: field in SKILL.md frontmatter | Yes -- adds name from directory |
MISSING_DESC | No description: field in SKILL.md frontmatter | Yes -- adds placeholder |
NAME_MISMATCH | Frontmatter name differs from directory name | Yes -- updates to match directory |
UNLINKED_REF | File in references/ not linked in SKILL.md | Yes -- converts bare backtick refs to markdown links |
EMPTY_DIR | Skill directory exists but has no SKILL.md | Yes -- removes empty directory |
DEAD_REF | SKILL.md references a non-existent references/ file | No -- warn only |
SCRIPT_REF_MISSING | SKILL.md references a scripts/ file that does not exist | No -- warn only |
INVALID_AO_CMD | SKILL.md references an ao subcommand that does not exist (only runs if ao is on PATH) | No -- warn only |
DEAD_XREF | SKILL.md references a /skill-name that has no matching skill directory | No -- warn only |
CATALOG_MISSING | A user-invocable skill is missing from the using-agentops catalog | No -- warn only |
# Check mode (default) -- report only, no changes
bash skills/heal-skill/scripts/heal.sh --check
# Fix mode -- auto-repair what it can
bash skills/heal-skill/scripts/heal.sh --fix
# Target a specific skill
bash skills/heal-skill/scripts/heal.sh --check skills/council
bash skills/heal-skill/scripts/heal.sh --fix skills/council
--check mode with findings (report-only).--strict or --fix flag. In --fix mode, fixable issues were repaired; re-run --check to confirm.Show the output. If --fix was used, summarize what changed. If DEAD_REF findings remain, advise the user to remove or update the broken references manually.
One line per finding:
[MISSING_NAME] skills/foo: No name field in frontmatter
[MISSING_DESC] skills/foo: No description field in frontmatter
[NAME_MISMATCH] skills/foo: Frontmatter name 'bar' != directory 'foo'
[UNLINKED_REF] skills/foo: refs/bar.md not linked in SKILL.md
[EMPTY_DIR] skills/foo: Directory exists but no SKILL.md
[DEAD_REF] skills/foo: SKILL.md links to non-existent refs/bar.md
[SCRIPT_REF_MISSING] skills/foo: references scripts/bar.sh but file not found
[INVALID_AO_CMD] skills/foo: references 'ao badcmd' which is not a valid subcommand
[DEAD_XREF] skills/foo: references /nonexistent but skill directory not found
[CATALOG_MISSING] using-agentops: bar is user-invocable but missing from catalog
--fix twice produces the same result.DEAD_REF, SCRIPT_REF_MISSING, INVALID_AO_CMD, DEAD_XREF, and CATALOG_MISSING are warn-only because the correct resolution requires human judgment.INVALID_AO_CMD only runs if the ao CLI is available on PATH. Skipped silently otherwise.CATALOG_MISSING is a global check (not per-skill) and only runs when using-agentops/SKILL.md exists.User says: /heal-skill
What happens:
skills/, checking each for the ten issue types (missing name, missing description, name mismatch, unlinked references, empty directories, dead references, script reference integrity, CLI command validation, cross-reference validation, catalog completeness).[NAME_MISMATCH] skills/foo: Frontmatter name 'bar' != directory 'foo').--strict or --fix flags.Result: A diagnostic report showing all skill hygiene issues across the repository, with no files modified.
User says: /heal-skill --fix skills/vibe
What happens:
skills/vibe/, running all per-skill checks against that skill.MISSING_NAME, UNLINKED_REF), the script applies the repair automatically -- adding the name from the directory, converting bare backtick references to markdown links, etc.DEAD_REF findings are reported as warnings since they require human judgment to resolve.Result: The skills/vibe/SKILL.md is repaired in place, with a summary of changes applied and any remaining warnings.
| Problem | Cause | Solution |
|---|---|---|
DEAD_REF findings persist after --fix | Dead references are warn-only because the correct fix (delete, create, or update) requires human judgment | Manually inspect each dead reference and either create the missing file, remove the link from SKILL.md, or update the path |
Script reports EMPTY_DIR for a skill in progress | The skill directory was created but SKILL.md has not been written yet | Either add a SKILL.md to the directory or remove the empty directory. Running --fix will remove it automatically |
NAME_MISMATCH fix changed the wrong name | The script always updates the frontmatter name to match the directory name, not the other way around |
Weekly Installs
162
Repository
GitHub Stars
204
First Seen
Feb 17, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode161
codex157
gemini-cli156
github-copilot156
amp156
kimi-cli156
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
114,200 周安装
skills/.--strict for CI gates: exits 1 on any finding. Without --strict, check mode exits 0 even with findings.If the directory name is wrong, rename the directory first, then re-run --fix |
| Script exits 0 but a skill still has issues | The issue type is not one of the ten checks the heal script detects | The heal script covers structural hygiene only. Content quality issues require manual review or /council validation |
Running --fix twice produces different output | This should not happen -- the script is idempotent | File a bug. Check if another process modified the skill files between runs |