# Clawkeeper

Install, configure, verify, and debug the Clawkeeper watcher stack in this workspace.

- Repository: https://github.com/SafeAI-Lab-X/ClawKeeper (1020 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-08-17
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add SafeAI-Lab-X/ClawKeeper --skill clawkeeper -g -a claude-code -y`
Codex: `npx skills add SafeAI-Lab-X/ClawKeeper --skill clawkeeper -g -a codex -y`
Cursor: `npx skills add SafeAI-Lab-X/ClawKeeper --skill clawkeeper -g -a cursor -y`
Gemini CLI: `npx skills add SafeAI-Lab-X/ClawKeeper --skill clawkeeper -g -a gemini-cli -y`

## Description

Install, configure, verify, and debug the Clawkeeper watcher stack in this workspace. Use when a user asks to set up `clawkeeper`, initialize `remote` or `local` mode, enable `clawkeeper-watcher`, wire `clawkeeper-bands`, diagnose `context-judge` routing, inspect watcher logs, fix mode/config mismatches, or troubleshoot startup, audit, hardening, rollback, drift monitoring, or bridge notification issues.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Clawkeeper

Use this skill only for the Clawkeeper workspace. Treat `clawkeeper-watcher` as the product center and `clawkeeper` as the launcher that prepares mode-specific runtime state.

## Core mental model

- `plugins/clawkeeper-watcher/` is the watcher plugin and governance engine.
- `clawkeeper/` is the launcher that prepares isolated `remote` and `local` mode roots, then delegates to OpenClaw.
- `plugins/clawkeeper-bands/` is the user-side bridge for notifications and approvals.
- `remote` is read-only judgment and historical intelligence.
- `local` is trusted audit, hardening, rollback, drift monitoring, and skill guard.
- Both watcher modes expose `POST /plugins/clawkeeper-watcher/context-judge`.

Read these files when needed:

- `README.md`
- `plugins/clawkeeper-watcher/README.md`
- `plugins/clawkeeper-bands/README.md`
- `clawkeeper/src/cli.ts`

## Preferred workflow

Follow this order unless the user explicitly narrows the task:

1. Identify whether the user wants install, config, validation, or debugging.
2. Check whether the issue is about the launcher, the watcher plugin, or the bands bridge.
3. Verify the exact mode in play: `remote`, `local`, or both.
4. Run the smallest direct validation command first.
5. Only after validation fails, inspect config, logs, bridge wiring, and code paths.

Do not jump straight to speculative fixes.

## Install and initialize

For source checkout setup in this repo, use:

```bash
pnpm install
cd clawkeeper
npm install
npm run build
npm link
cd ..
```

Initialize modes with:

```bash
clawkeeper init remote
clawkeeper init local
clawkeeper local config set gateway.mode local
clawkeeper status
```

Important:

- `local` mode expects `gateway.mode=local`.
- The launcher stores mode state under `~/.clawkeeper/` by default unless `--root` overrides it.
- If the problem is only inside the watcher plugin, do not blame launcher setup until `clawkeeper status` or mode launch actually fails.

## Validation commands

The rest: https://github.com/SafeAI-Lab-X/ClawKeeper/blob/HEAD/legacy/clawkeeper-watcher/skills/clawkeeper/SKILL.md
