Install the Claude Code skill
/chainpatrol skill to ~/.claude/skills/chainpatrol/SKILL.md and installs
shell completions. Claude Code then knows the command surface — how to log in, list
detection configs, find reports awaiting review, and run an organization healthcheck —
without you spelling it out each time.
In a cloud or headless Claude Code environment, add --cloud:
SessionStart hook that surfaces the device-code login URL when the
session is not yet authenticated, so the agent can hand you a link instead of stalling on
a login it cannot complete.
Re-running setup after a CLI upgrade refreshes the skill to match. To remove both:
Flags that matter for automation
--json
Ask for JSON in every automated call. Success and failure are both JSON, so one parser
handles the whole stream.
--dry-run
Prints the exact payload a mutation would send, without sending it. Supported on the
commands that write:
reports createproposals reviewdetections runanddetections configs rundetections configs update
--dry-run to a read-only command is an error rather than a no-op, so a mistaken
“safe” preview never turns into a silent live read of the wrong thing.
--explain
Adds the recommendation context behind a result — why a config was flagged as drifting,
what the suggested action is — instead of just the numbers.
--no-input
Disables every interactive prompt. Combine it with --yes on commands that confirm before
writing:
Authentication for unattended runs
SetCHAINPATROL_API_KEY rather than relying on a stored login. See
Authentication.
Guardrails to respect
Two habits keep an agent honest:- Read before you write. Every review needs an
assetIdfrom a listing you just fetched. That is deliberate. - Do not retry a
403or a409. A403from a safety check means the decision needs a person; a409means the asset does not match or the proposal is already resolved. Re-read instead of retrying the same body.