---
name: self-check
description: Self-diagnose this ClaudeTools machine's harness wiring (tools, identity, hooks, skills, commands, scripts, capability tier, connectivity) against the fleet baseline, and optionally publish the census to coord.
---

# /self-check — ClaudeTools Harness Self-Diagnosis

Runs the conformance probe in `.claude/skills/self-check/scripts/self-check.sh`,
which grades this machine RED/AMBER/GREEN against the provisional baseline manifest
and accounts for capability differences (e.g. no local Ollama -> remote/none ruleset).

See `.claude/skills/self-check/SKILL.md` for the full model. This command is a thin
runner — invoke the **self-check** skill for interpretation and follow-up.

## Run it

Always pass a real UTC timestamp via `SELFCHECK_TS` (the script falls back to
`date` if available, but pass it explicitly for correctness):

```bash
SELFCHECK_TS="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
  bash .claude/skills/self-check/scripts/self-check.sh report
```

Modes:

| Arg | What it does |
|-----|--------------|
| `report` (default) | Human-readable RED/AMBER/GREEN report. Exit 0/1/2 = GREEN/AMBER/RED. |
| `--json` | Structured census JSON only (for piping/aggregation). |
| `--publish` | Run + PUT the census to coord as component `selfcheck_<host>`. |
| `fanout` | Broadcast a self-check + self-remediate + re-publish request to ALL_SESSIONS. |
| `aggregate` | Read every machine's published census; print fleet table + proposed baseline. |

## Typical flows

**Just check this box:**
```bash
SELFCHECK_TS="$(date -u +%Y-%m-%dT%H:%M:%SZ)" bash .claude/skills/self-check/scripts/self-check.sh report
```

**Build the fleet baseline (V1 census):**
```bash
# 1) From any machine, request the fleet to report:
bash .claude/skills/self-check/scripts/self-check.sh fanout
# 2) Each instance (incl. this one) publishes:
SELFCHECK_TS="$(date -u +%Y-%m-%dT%H:%M:%SZ)" bash .claude/skills/self-check/scripts/self-check.sh --publish
# 3) Aggregate what came back:
bash .claude/skills/self-check/scripts/self-check.sh aggregate
```

After running, summarize the grade and the FAIL/WARN items for the user with the
exact fix commands. Do NOT auto-apply fixes — V1 is report-only by design.
