健康检查
- 作者仓库星标 0
- 作者仓库 skills-registry
Health Skill — Codex Configuration Validation
Verify that the Codex Brain configuration is healthy and complete.
Steps
1. AGENTS.md
- Exists and is not empty
- Line count:
wc -l < AGENTS.md - Size:
wc -c < AGENTS.md(budget: ≤32KB = 32768 bytes) - Contains key sections: Skills Roster, Exit Checklist, Terminal Rules
2. config.toml
.codex/config.tomlexists and is valid TOML- Has
#:schemadirective on first line - Has
codex_hooks = trueunder[features]
3. hooks.json
.codex/hooks.jsonexists and is valid JSON:jq . .codex/hooks.json- Hook count:
jq '[.. | objects | select(has("command"))] | length' .codex/hooks.json
4. Hook Scripts
- All
.codex/hooks/*.shfiles exist and are executable:for h in .codex/hooks/*.sh; do test -x "$h" || echo "NOT_EXEC: $h"; done
5. Subagents
- All
.codex/agents/*.tomlfiles exist - Each has
name,description,developer_instructionsfields:for f in .codex/agents/*.toml; do grep -q 'developer_instructions' "$f" || echo "INCOMPLETE: $f"; done
6. Skills
- All
.agents/skills/*/SKILL.mdfiles exist - Each has
name:anddescription:in frontmatter:for f in .agents/skills/*/SKILL.md; do grep -q '^name:' "$f" || echo "BAD FRONTMATTER: $f"; done
7. Error Log
brain/tasks/CODEX_ERRORS.mdexists (warn if missing)
8. Secrets Scan
git ls-files | xargs grep -l 'BEGIN.*PRIVATE KEY\|password\s*=\s*[^{][^"\x27]\{8,\}' 2>/dev/null | head -10
Report any matches as ⚠️ warnings.
9. MCP Tool Reachability
Check that the required runtimes are available (all MCP tools run via uvx or npx):
command -v uvx &>/dev/null && echo "uvx: ✅" || echo "uvx: ❌ missing — install via: pip install uv"
command -v npx &>/dev/null && echo "npx: ✅" || echo "npx: ⚠️ missing — install Node.js (for playwright)"
command -v ccc &>/dev/null && echo "cocoindex CLI (ccc): ✅" || echo "cocoindex CLI (ccc): ⚠️ optional — install via: pip install cocoindex"
# uvx-based: codebase-memory-mcp, code-review-graph, serena, cocoindex-code-mcp-server (available when uvx installed)
Report Format
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Codex Health — <repo>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AGENTS.md budget ✅ 187 lines / 4.2KB (budget: 32KB)
config.toml ✅ valid + schema directive
hooks.json ✅ valid JSON, 9 hooks registered
Hook scripts ✅ 9/9 executable
Subagents ✅ 5/5 complete
Skills ✅ 30/30 have valid frontmatter
Error log ✅ CODEX_ERRORS.md exists
Secrets scan ✅ no leaks detected
codebase-memory-mcp ⚠️ missing — run setup-plugins.sh
cocoindex (ccc) ✅ installed
code-review-graph ✅ installed
uvx (playwright/serena) ✅ installed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Overall: ⚠️ healthy with 1 warning
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
After the table, list any ⚠️/❌ items with one-line fix instructions.
<!-- tomevault:4.0:skill_md:2026-05-23 -->Source: brain-bootstrap/codex-brain-bootstrap — distributed by TomeVault.
- 流狐分类
- 安全
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 检测到的文件与系统行为
-
- 只读
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Steps
Exists and is not empty Line count: wc -l < AGENTS.md Size: wc -c < AGENTS.md (budget: ≤32KB = 32768 bytes)
.codex/config.toml exists and is valid TOML Has :schema directive on first line Has codexhooks = true under [features]
.codex/hooks.json exists and is valid JSON: jq . .codex/hooks.json Hook count: jq '[.. | objects | select(has("command"))] | length' .codex/hooks.json
All .codex/hooks/.sh files exist and are executable:
All .codex/agents/.toml files exist Each has name, description, developerinstructions fields:
# Health Skill — Codex Configuration Validation
Verify that the Codex Brain configuration is healthy and complete.
## Steps
### 1. AGENTS.md
- Exists and is not empty
- Line count: `wc -l < AGENTS.md`
- Size: `wc -c < AGENTS.md` (budget: ≤32KB = 32768 bytes)
- Contains key sections: Skills Roster, Exit Checklist, Terminal Rules
### 2. config.toml
- `.codex/config.toml` exists and is valid TOML
- Has `#:schema` directive on first line
- Has `codex_hooks = true` under `[features]`
### 3. hooks.json
- `.codex/hooks.json` exists and is valid JSON: `jq . .codex/hooks.json`
- Hook count: `jq '[.. | objects | select(has("command"))] | length' .codex/hooks.json`
### 4. Hook Scripts
- All `.codex/hooks/*.sh` files exist and are executable:
```bash
for h in .codex/hooks/*.sh; do test -x "$h" || echo "NOT_EXEC: $h"; done
```
### 5. Subagents
- All `.codex/agents/*.toml` files exist
- Each has `name`, `description`, `developer_instructions` fields:
```bash
for f in .codex/agents/*.toml; do grep -q 'developer_instructions' "$f" || echo "INCOMPLETE: $f"; done
```
### 6. Skills
- All `.agents/skills/*/SKILL.md` files exist
- Each has `name:` and `description:` in frontmatter:
```bash
for f in .agents/skills/*/SKILL.md; do grep -q '^name:' "$f" || echo "BAD FRONTMATTER: $f"; done
```
### 7. Error Log
- `brain/tasks/CODEX_ERRORS.md` exists (warn if missing)
### 8. Secrets Scan
```bash
git ls-files | xargs grep -l 'BEGIN.*PRIVATE KEY\|password\s*=\s*[^{][^"\x27]\{8,\}' 2>/dev/null | head -10
```
Report any matches as ⚠️ warnings.
### 9. MCP Tool Reachability
Check that the required runtimes are available (all MCP tools run via `uvx` or `npx`):
```bash
command -v uvx &>/dev/null && echo "uvx: ✅" || echo "uvx: ❌ missing — install via: pip install uv"
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Steps → 1. AGENTS.md → 2. config.toml → 3. hooks.json → 4. Hook Scripts → 5. Subagents
要点 -> Verify that the Codex Brain configuration is healthy and complete. · After the table, list any ⚠️/❌ items with one-line fix instructions.
文件/命令 -> wc -l < AGENTS.md · wc -c < AGENTS.md · .codex/config.toml · #:schema · codexhooks = true · [features] · .codex/hooks.json · jq . .codex/hooks.json
内容 SHA-256 -> e0a1bd57b867
方法与流程
适用与边界
原文中的明确线索
wc -l < AGENTS.md、wc -c < AGENTS.md、.codex/config.toml、#:schema、codexhooks = true、[features]、.codex/hooks.json、jq . .codex/hooks.json