# Verify Ccsn

Launch and drive the real cc-safety-net CLI, the hook decision path, explain...

- Repository: https://github.com/kenryu42/cc-safety-net (1883 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add kenryu42/cc-safety-net --skill verify-ccsn -g -a claude-code -y`
Codex: `npx skills add kenryu42/cc-safety-net --skill verify-ccsn -g -a codex -y`
Cursor: `npx skills add kenryu42/cc-safety-net --skill verify-ccsn -g -a cursor -y`
Gemini CLI: `npx skills add kenryu42/cc-safety-net --skill verify-ccsn -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add kenryu42/cc-safety-net`

## Description

Launch and drive the real cc-safety-net CLI, the hook decision path, explain, status/doctor/statusline, logs, rule and policy config, and the local policy GUI, against an isolated home, capturing evidence. Use when a change needs proof in the running app, not just the test suite.

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

# Verify cc-safety-net

cc-safety-net is a CLI (`cc-safety-net` / `ccsn`) that coding-agent CLIs invoke as a pre-tool-use
hook: JSON describing a tool call arrives on stdin, an allow/deny decision leaves on stdout, and
every decision is appended to an audit log under the active home. Users also run diagnostic
commands (`status`, `doctor`, `explain`, `logs`), config commands (`rule`, `policy`), and a
local web GUI (`gui`).

**Safety invariants for every run:**

- Command strings under test (`git reset --hard`, `rm -rf /`, …) are analyzer INPUT. They go into
  a JSON payload or an `explain` argument. Never execute one in a shell.
- Never run the CLI against the real home. Every invocation goes through `./ccsn-isolated` (see
  Helpers), which redirects `HOME`, `CC_SAFETY_NET_HOME`, and `CC_SAFETY_NET_AUDIT_HOME` into a
  disposable directory. A bare `bun run src/entries/bin.ts` writes to the developer's real
  `~/.cc-safety-net/logs`.
- Never drive `install`, `update`, or `uninstall` (CLI or GUI Integrations tab) in a verification
  run: install detection and npx-cache clearing reach real machine state beyond `$HOME`.
- Run `rule` and `policy` commands from `$WS`, never the repo: without `--global` they write the
  project config under the cwd's `.cc-safety-net/`.

## Launch

No build step: the CLI runs from source with bun. Set up one isolated run:

```bash
REPO=$(git rev-parse --show-toplevel)
RUN_ID=verify-$(date +%Y%m%d-%H%M%S)
export CCSN_VERIFY_HOME=$REPO/artifacts/verify-homes/$RUN_ID   # disposable fake $HOME
EVIDENCE=$REPO/artifacts/verify/$RUN_ID                        # proof artifacts (gitignored)
WS=$CCSN_VERIFY_HOME/workspace                                 # cwd the "agent" works in
mkdir -p "$CCSN_VERIFY_HOME" "$EVIDENCE" "$WS"
```

One-shot commands (hook, explain, status, logs, doctor) need no server, each drive is one
`./ccsn-isolated …` invocation from `$REPO/.agents/skills/verify-ccsn/`.

The only long-lived instance is the GUI:

The rest: https://github.com/kenryu42/cc-safety-net/blob/HEAD/.agents/skills/verify-ccsn/SKILL.md
