$npx -y skills add tw93/Waza --skill healthRuns a budget-aware agent-assisted engineering health audit for instruction/config drift, hooks/MCP, verifier surfaces, and AI maintainability. Use when users ask in any language to audit Claude, Codex, Pi, agent instructions, MCP or hooks, verifier coverage, or AI-maintainabilit
| 1 | # Health: Agent-Assisted Engineering Health |
| 2 | |
| 3 | Prefix your first line with 🥷 inline, not as its own paragraph. |
| 4 | |
| 5 | **Update check (non-blocking).** Once per conversation, run `bash <skill-base-dir>/scripts/check-update.sh` with `<skill-base-dir>` replaced by this skill's base directory; relay any printed line, otherwise continue silently (also when the script already ran, is missing, or errors). It checks at most once a day, reads only a public version file, and sends no data. |
| 6 | |
| 7 | Audit the current project's agent setup and AI coding maintainability against this framework: |
| 8 | `agent config → instruction surfaces → tools/runtime → verifiers → maintainability` |
| 9 | |
| 10 | Find violations. Identify the misaligned layer. Calibrate to project complexity only. |
| 11 | |
| 12 | ## Outcome Contract |
| 13 | |
| 14 | - Outcome: a budget-aware health report that separates agent configuration risk from AI maintainability risk. |
| 15 | - Done when: each finding names the misaligned layer, the concrete evidence, and a copy-pasteable action or diagnostic command. |
| 16 | - Evidence: collected health script output, tracked project instructions, runtime config summaries, verifier logs, hooks/MCP surfaces, and live probes when needed. |
| 17 | - Output: prioritized findings with status, impact, and next action, or a clear clean bill with residual risk. |
| 18 | |
| 19 | Two lanes share one report: |
| 20 | |
| 21 | - **Agent config health**: Codex/Claude/Pi instruction drift, permissions, hooks, MCP, skills, and memory supply chain. |
| 22 | - **AI maintainability health**: project context surface, verifier wrapper, generated-artifact checks, hotspot ownership, and stale or misleading durable docs. |
| 23 | |
| 24 | **Output language:** Check in order: (1) project agent instructions (`AGENTS.md` before runtime-specific files); (2) global agent instructions; (3) user's recent language; (4) English. |
| 25 | |
| 26 | **Budget posture:** Start with the summary audit. Escalate automatically when the user asks for a deep, full, complete, thorough, "深入", "完整", "彻底", or "继续跑完" audit, when the user explicitly mentions AI coding code rot, Codex/Claude config drift, unclear context, missing verification, verifier output that points at stale paths, or "代码变烂", when current project instructions or remembered user preference says to run deep health checks by default, when the project is Complex, or when the summary pass exposes a critical ambiguity that cannot be resolved locally. Otherwise do not read full conversation extracts or launch inspector subagents. Tell the user before escalating because deep health audits can consume significant token quota. |
| 27 | |
| 28 | ## Durable Context Preflight |
| 29 | |
| 30 | See [references/durable-context.md](references/durable-context.md) for when to read durable context, the read-order budget, and the memory-type mapping. |
| 31 | |
| 32 | For `/health`: current config, command output, and live probes override memory. Also flag durable memory problems when they affect behavior: oversized injected summaries, stale or contradictory entries, missing project entrypoint references, or private paths copied into public instructions. Keep these as context findings, not code-review findings. |
| 33 | |
| 34 | ## Step 0: Assess project tier |
| 35 | |
| 36 | Pick one. Apply only that tier's requirements. |
| 37 | |
| 38 | | Tier | Signal | What's expected | |
| 39 | |---|---|---| |
| 40 | | **Simple** | <500 files, 1 contributor, no CI | CLAUDE.md only; 0-1 skills; hooks optional | |
| 41 | | **Standard** | 500-5K files, small team or CI | CLAUDE.md + 1-2 rules; 2-4 skills; basic hooks | |
| 42 | | **Complex** | >5K files, multi-contributor, active CI | Full six-layer setup required | |
| 43 | |
| 44 | ## Step 1: Collect data |
| 45 | |
| 46 | Run the collection script in summary mode first. Do not interpret yet. |
| 47 | |
| 48 | ```bash |
| 49 | # Resolve collect-data.sh from canonical locations (no personal home-dir paths). |
| 50 | HEALTH_SCRIPT="${CLAUDE_SKILL_DIR:+$CLAUDE_SKILL_DIR/scripts/collect-data.sh}" |
| 51 | if [ ! -f "${HEALTH_SCRIPT:-}" ]; then |
| 52 | for candidate in \ |
| 53 | "./skills/health/scripts/collect-data.sh" \ |
| 54 | "$(npx skills path tw93/Waza 2>/dev/null)/skills/health/scripts/collect-data.sh"; do |
| 55 | [ -f "$candidate" ] && HEALTH_SCRIPT="$candidate" && break |
| 56 | done |
| 57 | fi |
| 58 | if [ ! -f "${HEALTH_SCRIPT:-}" ]; then |
| 59 | echo "health collect-data.sh not found; set CLAUDE_SKILL_DIR or reinstall: npx skills add tw93/Waza -a |