subagent-driven-development
OBobra/superpowers298k近 7 天新增 2,631 个 star
Audit Codex installation health and workspace context quality by combining the built-in `codex doctor` report with read-only checks for AGENTS.md scope, instruction bloat or duplication, Skills, MCP, hooks, config, thread-provider history scope, Git state, and repository-root hygiene. Use whenever the user asks for `/doctor`, `/checkup`, Codex health checks, context cleanup, AGENTS.md cleanup, unused or broken Skills/MCP/hooks, missing history after provider changes, slow or polluted context, or asks why Codex is ignoring rules. Default to diagnosis only; never edit, disable, delete, trust, install, update, authenticate, move, or clean anything without a separately approved finding-level diff.
Run a two-layer health check:
codex doctor --json for installation, config, auth, runtime, Git environment, terminal, app-server, update, and thread-inventory checks. Derive one narrow provider-scope warning when the default provider represents only a small minority of indexed history.The scanner gathers deterministic evidence. You make the semantic judgment. This separation matters because a script can prove that text repeats, but it cannot safely decide that a business fact, safety boundary, brand voice, or directory rule is disposable.
Resolve the Skill directory from the loaded Skill path, then run:
python3 <skill-dir>/scripts/scan_workspace.py --cwd "$PWD" --compact-json
For a faster workspace-only pass when the built-in report was already run in the same task:
python3 <skill-dir>/scripts/scan_workspace.py --cwd "$PWD" --compact-json --skip-built-in
--compact-json preserves every finding and every built-in check row while omitting large Skill inventories and verbose passing-check details. Use --json only when full deterministic inventory evidence is required.
Do not save the raw built-in report inside the repository. If temporary storage is needed, use /tmp and remove it before finishing.
Read checks-and-repair-policy.md before proposing any cleanup or repair. Keep severity and confidence separate:
S0: proven secret exposure or proven destructive riskS1: broken effective configuration, truncated hard rules, missing enabled executables, or installation/update mismatchS2: exact redundancy, duplicate active names/sources, or a clear project hygiene violationS3: maintenance pressure, stale disabled entries, new-version notice, or oversized descriptionsS4: informational, semantic candidate, or evidence gapTreat semantic_candidates as prompts for inspection, not findings. Read the relevant source section and classify it as one of:
Static discovery cannot prove a Skill is unused. If the user explicitly asks for unused or low-frequency Skills, use the installed codex-skill-admin Skill in read-only audit mode:
python3 <codex-skill-admin-dir>/scripts/codex_skill_admin.py audit-unused --cwd "$PWD" --days 30
Report the evidence window and distinct session/source count. Do not disable anything unless the user separately asks and approves the target list.
Lead with the overall result, then show only actionable or decision-relevant items:
# Codex 健康检查
状态:PASS / WARN / FAIL
## 需要处理
- [finding id] severity / confidence — conclusion
Evidence: source and observed state
Impact: concrete failure or context cost
Recommendation: exact next action
## 建议人工审查
- semantic candidates with why they may be inferable or stale
## 已通过
- grouped domains, not every low-level row
## Evidence gaps
- checks that cannot be proven from public/local data
Preserve built-in doctor sub-checks as separate facts. For example, an HTTP reachability failure and a WebSocket success must remain two rows; do not collapse them into “the network is broken.”
Diagnosis does not authorize repair. When the user asks to fix findings:
apply_patch.Never automatically:
Before reporting completion:
OBobra/superpowers298k近 7 天新增 2,631 个 star
MAmattpocock/skills288k近 7 天新增 10,178 个 star
MAmattpocock/skills288k近 7 天新增 10,178 个 star
MAmattpocock/skills288k近 7 天新增 10,178 个 star
AFaffaan-m/ECC278k近 7 天新增 4,046 个 star
AFaffaan-m/ECC278k近 7 天新增 4,046 个 star