Commands
compat
OpenClaw compatibility diagnostics for ClawVault packaging, hook metadata, and handler safety.
clawvault compat
clawvault compat validates ClawVault's OpenClaw integration contract from the current project root (or an override base directory).
Usage
clawvault compat [options]Options
| Flag | Description |
|---|---|
--strict | Exit non-zero when warnings exist |
--base-dir <path> | Validate against an alternate project root |
--json | Output machine-readable JSON |
Runtime Checks (Current)
The command checks:
- OpenClaw CLI availability (
openclaw --version) package.jsonhook registration (openclaw.hooksincludes./hooks/clawvault)hooks/clawvault/HOOK.mdrequired events (minimum:gateway:startup,command:new,session:start)- Hook manifest requirements (
metadata.openclaw.requires.binscontainsclawvault) - Hook handler safety conventions (execFileSync/no shell, profile delegation)
SKILL.mdOpenClaw metadata presence
Exit Behavior
0: no errors (and no warnings in strict mode)1: errors, or warnings when--strictis enabled
Examples
# Human-readable report
clawvault compat
# CI-safe gate
clawvault compat --strict
# JSON for automation
clawvault compat --json
# Validate from alternate fixture/project root
clawvault compat --base-dir ./fixtures/healthy --jsonSample JSON Shape
{
"generatedAt": "2026-02-15T16:00:00.000Z",
"checks": [
{ "label": "openclaw CLI available", "status": "ok" },
{ "label": "package hook registration", "status": "ok", "detail": "./hooks/clawvault" },
{ "label": "hook manifest events", "status": "ok" },
{ "label": "hook manifest requirements", "status": "ok" },
{ "label": "hook handler safety", "status": "ok" },
{ "label": "skill metadata", "status": "ok" }
],
"warnings": 0,
"errors": 0
}Troubleshooting
openclaw CLI warning
Install or fix OpenClaw on PATH, then re-run:
openclaw --version
clawvault compat --strictpackage hook registration error
Ensure package.json includes:
"openclaw": {
"hooks": ["./hooks/clawvault"]
}hook metadata or handler safety warning/error
Check:
hooks/clawvault/HOOK.mdhooks/clawvault/handler.jsSKILL.md
Then re-run clawvault compat --strict.