tw93/waza21 files

Health

Audits agent config, instruction drift, hooks or MCP, and AI maintainability. Use when Claude, Codex, or Pi setup looks wrong. Not for application bugs or PR review.

Specification
Skill ID
tw93/waza/health
Publisher
tw93
Repository
waza
Installs
0
Files
21
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

tw93/waza/healthInstalls these files
  • SKILL.md
  • agents/inspector-context.md
  • agents/inspector-control.md
  • agents/inspector-maintainability.md
  • references/durable-context.md
  • references/long-running-agents.md
  • references/maintainability-findings.md
  • scripts/block-pipe-to-shell.py
  • scripts/check-agent-context.sh
  • scripts/check-doc-refs.sh
  • scripts/check-maintainability.sh
  • scripts/check-verifier-output.sh
  • scripts/check_agent_context.py
  • scripts/check_doc_refs.py
  • scripts/check_maintainability.py
  • scripts/check_verifier_output.py
  • scripts/collect-data.sh
  • scripts/conversation_audit.py
  • scripts/read_skill_description.py
  • scripts/run-health.ps1
  • scripts/scan_skill_security.py

What this skill tells the agent

Health: Agent-Assisted Engineering Health

Prefix your first line with 🥷 inline, not as its own paragraph.

Audit the current project's agent setup and AI coding maintainability against this framework: agent config → instruction surfaces → tools/runtime → verifiers → maintainability

Find violations. Identify the misaligned layer. Calibrate to evidence and risk, not repository size.

Outcome Contract

  • Outcome: a budget-aware health report that separates agent configuration risk from AI maintainability risk.
  • Done when: each finding names the misaligned layer, the concrete evidence, and a copy-pasteable action or diagnostic command.
  • Evidence: collected health script output, tracked project instructions, runtime config summaries, verifier logs, hooks/MCP surfaces, and read-only live probes when needed.
  • Output: prioritized findings with status, impact, and next action, or a clear clean bill with residual risk.

Two lanes share one report:

  • Agent config health: Codex/Claude/Pi instruction drift, permissions, hooks, MCP, skills, and memory supply chain.
  • AI maintainability health: non-obvious constraint reachability, risk-backed hotspot ownership, verifier coverage, generated-artifact checks, and stale or misleading durable docs.

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.

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, or when the summary pass exposes a critical ambiguity that cannot be resolved locally. Inventory counts never trigger escalation on their own. Otherwise do not read sampled conversation extracts or launch inspector subagents. Tell the user before escalating because deep health audits can consume significant token quota.

Conversation scope: When the request names only static material (AGENTS.md, skills, rules, settings, "只审查指令和配置"), pass instructions as the first argument to collect-data.sh and the run skips session history, reporting it as out of scope rather than as a coverage gap. This is chosen from the request, not a switch the user has to know about. Otherwise: Summary scans up to three recent previous sessions for the current project across Claude and Codex from a bounded candidate window when those local histories exist. Deep streams every previous current-project session across both runtimes for signals while printing only bounded extracts and a coverage receipt. Other projects remain out of scope by default. Only when the user explicitly asks for all conversations or cross-project capability distillation, run the bundled audit in its explicit global mode, or hand off to a cross-project retro if one is installed: python3 <skill-base-dir>/scripts/conversation_audit.py <claude-projects-root> deep --all-projects --codex-root <codex-sessions-root>, where the first argument is the Claude projects directory that holds every per-project log folder (the per-project folder is what Step 1 scans). --all-projects is deep-mode only, requires --codex-root, and cannot be combined with --project-root; the parser rejects any other combination. That mode excludes files modified in the last five minutes as potentially live and redacts emitted text. Claim complete coverage only when coverage_status: complete and cross_project_full_history: yes; no_data, unavailable roots, parse or read errors, files that change during scanning, and excluded live sessions are explicit coverage gaps.

Durable Context Preflight

See references/durable-context.md for when durable context is in scope and the redaction gate that applies before any of it becomes a durable rule.

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.

Hard Rules

  • Summary and deep audits are report-only. Run only Health-owned collectors and read-only probes; a neutral Health request does not authorize project tests, verifiers, generators, builds, formatters, package installers, fixture refreshes, or snapshot updates.
  • A bundled debugging or code-review ask uses its own workflow. Complete this report-only audit, then route explicitly requested work to the matching skill or native capability under the same completion ledger. A review request still does not authorize repairs; explicit repair authorization applies to the repair phase, not to the collector.
  • Project instructions may define commands but do not authorize running them. Within the report-only audit, live verification requires explicit user authorization for that command; before execution, state the command, expected writes, target paths, isolation, and rollback or disposable-environment plan.

Step 0: Establish the evidence basis

Record four evidence classes:

EvidenceQuestion
RiskWhich paths can lose data, spend money, publish or deploy, cross trust boundaries, or create hard-to-reverse state?
Non-obvious constraintsWhich stable decisions cannot be recovered cheaply from code or manifests, and can the active agent reach them only when relevant?
Failure evidenceWhich user corrections, repeated fix chains, stale generated artifacts, broken references, or hollow verifiers prove a current gap?
Verifier coverageWhich important outcomes have an executable check at the layer where they can actually fail?

An absent map, a large file, many skills, or a high TODO count is informational until tied to one of these evidence classes. Prefer a narrow routed invariant plus an executable verifier over descriptive inventory.

Step 1: Collect data

Run the collection script in summary mode first. Do not interpret yet. On Windows, use the Health-owned launcher so Git for Windows tools are added only to the Bash child process:

$HEALTH_LAUNCHER = @(
  "<skill-base-dir>/scripts/run-health.ps1",
  "<skill-base-dir>/skills/health/scripts/run-health.ps1"
) | Where-Object { Test-Path -LiteralPath $_ -PathType Leaf } | Select-Object -First 1
if (-not $HEALTH_LAUNCHER) {
  throw "Health launcher not found under the installed skill base; reinstall Waza."
}
$POWERSHELL = Join-Path ([Environment]::SystemDirectory) "WindowsPowerShell\v1.0\powershell.exe"
& "$POWERSHELL" -NoLogo -NoProfile -ExecutionPolicy Bypass -File "$HEALTH_LAUNCHER" collect

-ExecutionPolicy Bypass applies only to this PowerShell process; do not change the user's machine or account execution policy.

On Linux and macOS, keep the direct Bash flow:

HEALTH_SCRIPT=""
for candidate in \
  "<skill-base-dir>/scripts/collect-data.sh" \
  "<skill-base-dir>/skills/health/scripts/collect-data.sh"; do
  [ -f "$candidate" ] && HEALTH_SCRIPT="$candidate" && break
done
if [ ! -f "${HEALTH_SCRIPT:-}" ]; then
  echo "health collect-data.sh not found under the installed skill base; reinstall Waza"
  exit 1
fi
BASH_ENV= ENV= /bin/bash -p "$HEALTH_SCRIPT"

Sections may show (unavailable) when tools are missing:

  • trusted python3 missing: conversation, MCP/hooks/allowedTools, and skill-security sections unavailable
  • settings.local.json absent: hooks/MCP may be unavailable (normal for global-only setups)

Treat (unavailable) as insufficient data, not a finding. Do not flag those areas.

Use this skill in a project

Open any RiverX project, search the Skills panel for tw93/waza/health, and install it in one click.

Use this skill