skillpack-check
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkillpack Check
Skillpack 检查
Contract
约定
Running returns a JSON report with:
gbrain skillpack-check- (bool): true if no action needed.
healthy - (string): one-line summary safe to quote in a briefing.
summary - (string[]): every remediation command. If non-empty, run them.
actions - : full
doctoroutput (filesystem checks).gbrain doctor --fast --json - : applied/pending/partial counts from
migrations.apply-migrations --list
Exit code:
- — healthy, nothing to do.
0 - — action needed. Read
1and execute.actions[] - — could not determine (binary crash or missing subcommand). Investigate.
2
运行 会返回一份JSON报告,包含以下字段:
gbrain skillpack-check- (布尔值):无需操作时为true。
healthy - (字符串):适合在简报中引用的单行摘要。
summary - (字符串数组):所有修复命令。若数组非空,请执行这些命令。
actions - :
doctor的完整输出(文件系统检查结果)。gbrain doctor --fast --json - :来自
migrations的已应用/待处理/部分完成迁移计数。apply-migrations --list
退出码:
- — 状态正常,无需操作。
0 - — 需要执行操作。读取
1并执行相应命令。actions[] - — 无法判断状态(二进制文件崩溃或缺少子命令),需进一步排查。
2
When to run
运行时机
- Daily cron (e.g. your OpenClaw's ):
morning-briefing. Exit code alone tells you if anything is wrong; surface a one-liner in the briefing only when exit != 0. No JSON noise in happy-path briefings.gbrain skillpack-check --quiet - On demand: for the full JSON when debugging.
gbrain skillpack-check - In a CI pipeline: same pattern — exit code gates, JSON is the evidence.
- 每日定时任务(例如OpenClaw的 ):执行
morning-briefing。 仅通过退出码即可判断是否存在问题;仅当退出码不为0时,才在简报中显示单行摘要。正常情况下的简报不会包含JSON冗余信息。gbrain skillpack-check --quiet - 按需运行:调试时执行 获取完整JSON报告。
gbrain skillpack-check - CI流水线中:遵循相同模式——通过退出码判断状态,JSON作为诊断依据。
What to do with the output
输出结果处理方式
Happy path (healthy: true
)
healthy: true正常情况(healthy: true
)
healthy: trueSurface the summary in the agent's output only if asked. Nothing else.
仅当用户询问时,在Agent的输出中显示摘要,无需其他操作。
Action needed (healthy: false
)
healthy: false需要执行操作(healthy: false
)
healthy: falseThe array contains the commands to run, in order. Execute them:
actions[]bash
for cmd in $(echo "$REPORT" | jq -r '.actions[]'); do
eval "$cmd"
doneCommon entries and what they mean:
actions[]- — A migration is pending or half-finished. Run this (it's idempotent). If it exits
gbrain apply-migrations --yes, the host has non-builtin cron handlers that need plugin registration — followstatus: "partial".skills/migrations/v0.11.0.md - — Embeddings are stale.
gbrain embed --stale - — Dead links or missing back-links.
gbrain check-backlinks --fix - Free-text action (no prefix in the source message) — agent judgment needed. Quote it in the report for the user.
Run:
actions[]bash
for cmd in $(echo "$REPORT" | jq -r '.actions[]'); do
eval "$cmd"
done常见的 条目及其含义:
actions[]- — 存在待处理或部分完成的迁移。 执行该命令(该命令具有幂等性)。若返回
gbrain apply-migrations --yes,说明宿主存在非内置的定时任务处理器,需要进行插件注册——请参考status: "partial"。skills/migrations/v0.11.0.md - — 嵌入数据已过期。
gbrain embed --stale - — 存在无效链接或缺失反向链接。
gbrain check-backlinks --fix - 自由文本操作(源消息中无前缀)——需要Agent自行判断。请在报告中引用该内容告知用户。
Run:
Determine failure (exit 2
)
exit 2无法判断状态(退出码2)
Treat as urgent. Probably means the gbrain binary is missing from or
a required subcommand crashed. Check:
$PATH- returns a path
which gbrain - exits 0
gbrain --version - is accessible
~/.gbrain/
视为紧急情况。这可能意味着gbrain二进制文件不在中,或者某个必需的子命令崩溃。请检查:
$PATH- 返回有效路径
which gbrain - 退出码为0
gbrain --version - 可正常访问
~/.gbrain/
Output format
输出格式
json
{
"version": "0.11.1",
"ts": "2026-04-18T12:34:56.789Z",
"healthy": false,
"summary": "gbrain skillpack needs attention: 1 action(s) — gbrain apply-migrations --yes",
"actions": ["gbrain apply-migrations --yes"],
"doctor": {
"exit_code": 1,
"checks": [
{ "name": "minions_migration", "status": "fail", "message": "MINIONS HALF-INSTALLED (partial migration: 0.11.0). Run: gbrain apply-migrations --yes" }
]
},
"migrations": {
"applied_count": 0,
"pending_count": 0,
"partial_count": 1,
"stdout": "..."
}
}json
{
"version": "0.11.1",
"ts": "2026-04-18T12:34:56.789Z",
"healthy": false,
"summary": "gbrain skillpack needs attention: 1 action(s) — gbrain apply-migrations --yes",
"actions": ["gbrain apply-migrations --yes"],
"doctor": {
"exit_code": 1,
"checks": [
{ "name": "minions_migration", "status": "fail", "message": "MINIONS HALF-INSTALLED (partial migration: 0.11.0). Run: gbrain apply-migrations --yes" }
]
},
"migrations": {
"applied_count": 0,
"pending_count": 0,
"partial_count": 1,
"stdout": "..."
}
}Anti-Patterns
反模式
- ❌ Running without in a cron that emails its output — you'll get the full JSON blob in every daily email. Use
--quietin crons.--quiet - ❌ Ignoring exit code 2. A crashed doctor is worse than a failing check because you don't even know what's wrong.
- ❌ Running on every chat turn. Once per hour (or on user request) is plenty.
- ❌ Treating warnings as failures. Only status needs action;
failis informational.warn
- ❌ 在会发送邮件的定时任务中不使用参数——你会在每日邮件中收到完整的JSON内容。定时任务中请使用
--quiet。--quiet - ❌ 忽略退出码2。doctor命令崩溃比检查失败更严重,因为你甚至不知道问题出在哪里。
- ❌ 每次对话都运行该命令。每小时运行一次(或用户请求时运行)就足够了。
- ❌ 将警告视为失败。只有状态需要处理;
fail仅为信息提示。warn
Output Format
输出格式
The skill itself doesn't write files; it reports the CLI output verbatim to
the user (or to the agent's briefing pipeline). One-line summary first,
then the action list, then (only if relevant) the full JSON for debugging.
该Skill本身不会写入文件;它会将CLI输出直接报告给用户(或Agent的简报流水线)。先显示单行摘要,然后是操作列表,最后(仅在需要时)显示完整JSON用于调试。
Related
相关内容
- — the underlying filesystem + DB check. skillpack-check composes this.
gbrain doctor - — the migration status view.
gbrain apply-migrations --list - — the host-agent instruction manual for resolving
skills/migrations/v0.11.0.mditems.pending-host-work.jsonl - — troubleshooting a half-migrated install.
docs/guides/minions-fix.md
- — 底层的文件系统+数据库检查命令。skillpack-check基于该命令构建。
gbrain doctor - — 迁移状态查看命令。
gbrain apply-migrations --list - — 宿主Agent解决
skills/migrations/v0.11.0.md项的操作手册。pending-host-work.jsonl - — 排查部分完成迁移安装问题的指南。
docs/guides/minions-fix.md