Skills

Verify Ccsn

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

Install

npx skills add kenryu42/cc-safety-net --skill verify-ccsn -g -a claude-code -y
Category
Testing
Updated
3d ago
License
MIT
Context cost
Mediumabout 2,145 tokens
Runs scripts
No, instructions only

What it does

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.

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:

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:

Read the whole SKILL.md on GitHub

More in Testing