一键导入
harness-gc
Garbage Collection Agent — 定期扫描项目健康状态,检测文档/代码一致性漂移,自动发起修复提案。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Garbage Collection Agent — 定期扫描项目健康状态,检测文档/代码一致性漂移,自动发起修复提案。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Entry point for new users — guides through initialization, architecture review, and cleanup. Use when the user first opens this project or says "开始" / "初始化" / "怎么用".
Independently verifies whether a completed task meets its defined goal conditions. Implements maker/checker separation — the agent that wrote the code does not grade its own work. Use after task execution to validate completion before marking done.
Reviews technical decisions before implementation. Detects outdated or suboptimal approaches by searching current best practices. Use when the user asks to implement something using a specific tool, library, or methodology.
Initialize this project with the Harness Engineering starter template. Detects project language, installs dependencies, and updates CLAUDE.md placeholders. Use when the user wants to set up or reset the Harness configuration.
Switch Harness workflow mode (full/hotfix/tweak) and development phase (design/build/fix). Use when the user wants to change the current working mode or phase.
| name | harness-gc |
| description | Garbage Collection Agent — 定期扫描项目健康状态,检测文档/代码一致性漂移,自动发起修复提案。 |
gc-scan.mjs,非 Agent 自我报告(Sniff 模式)| 方式 | 命令 | 说明 |
|---|---|---|
| 手动 | node scripts/gc-scan.mjs | 立即执行一次健康检查 |
| Loop | /loop 24h "node scripts/gc-scan.mjs" | 每 24 小时自动扫描 |
| Routine | /schedule daily GC scan at 2am | 持久化定时(需 Max) |
| # | 维度 | 检查项 | 严重性 |
|---|---|---|---|
| 1 | CLAUDE.md 完整性 | 必要章节 + 占位符 | critical / warning |
| 2 | Git 状态 | 未提交变更数 + 调试残留 (console.log/debugger) | info / warning |
| 3 | TODO/FIXME 密度 | 单文件 >5 处 | info |
| 4 | .gitignore 健康 | node_modules/reviews/loops 遗漏 | info |
| 5 | Hook 注册 | 文件存在但未注册/被注释 | critical / warning |
| 6 | Harness 状态 | .harness-state 有效性 | info / warning |
| 7 | TypeScript 类型 | tsc --noEmit 错误(如存在 tsconfig.json) | warning |
| 8 | LSP 配置 | .lsp.json 有效性 | info / warning |
维度清单以此表为准。代码中
gc-scan.mjs的 JSDoc 为权威来源。
TRIGGER → SCAN (gc-scan.mjs) → ANALYZE → PROPOSE (可选) → WAIT (你 review)
.claude/loops/STATE.md — 当前活跃状态 (hot, 每次会话自动加载).claude/loops/LOG.md — 历史执行记录 (warm, 按需读取).claude/.harness-state — Phase/Mode 配置连续 3 次扫描无改善 → STOP 自动提案 → 标记 Phase: blocked → 等你人工介入。