Skip to main content
Run npx -y cc-safety-net@latest install --copilot-cli. It installs the cc-safety-net@cc-marketplace plugin through Copilot CLI’s own plugin marketplace commands. If the plugin was disabled, it enables the plugin in ~/.copilot/settings.json. Then restart Copilot CLI, which picks up the plugin only after a restart.

Install CC Safety Net in GitHub Copilot CLI

1

Run the installer

2

Restart Copilot CLI

Restart Copilot CLI to load the plugin.
3

Confirm the plugin is active

What the GitHub Copilot CLI install changes

  • It adds the cc-marketplace marketplace if it is not already registered.
  • It installs the cc-safety-net@cc-marketplace plugin.
  • If the plugin was explicitly disabled, it sets the plugin to true in enabledPlugins in ~/.copilot/settings.json.

What the GitHub Copilot CLI hook checks

The plugin’s hook runs on Copilot CLI’s preToolUse event. It analyzes bash and powershell tool calls as shell commands and inspects the inputs of other tools for protected paths. If you add hooks by hand, Copilot CLI support depends on its version. Inline hook definitions in settings files need 1.0.8 or later, and user hook files need 0.0.422 or later. doctor reports the detected version and the hook sources it supports.

What happens when the GitHub Copilot CLI check fails

GitHub Copilot CLI blocks the tool call when the hook crashes, exits non-zero, or cannot start. A hook that times out after the default 30 seconds, or prints invalid output, lets the call proceed.

Uninstall CC Safety Net from GitHub Copilot CLI

Restart Copilot CLI after removing the plugin for the change to take effect.

Troubleshoot GitHub Copilot CLI

doctor checks the plugin and any CC Safety Net hooks you added by hand. COPILOT_HOME defaults to ~/.copilot.

Hooks you added by hand

doctor counts a CC Safety Net hook in any of these files, listed from highest precedence:
  1. <repo>/.github/copilot/settings.local.json
  2. <repo>/.github/copilot/settings.json
  3. <repo>/.claude/settings.local.json
  4. <repo>/.claude/settings.json
  5. $COPILOT_HOME/settings.json
  6. The hook files <repo>/.github/hooks/*.json and $COPILOT_HOME/hooks/*.json
An entry in a .claude file counts only when its command includes hook --copilot-cli or hook -cp. A Claude Code hook alone does not count. When a hook file or settings entry still runs the CC Safety Net hook, doctor reports it with the method hook config, even if the plugin is disabled.

Hooks or the plugin are switched off

  • disableAllHooks: true in a repository settings file turns off CC Safety Net in that repository, plugin included.
  • disableAllHooks: true in $COPILOT_HOME/settings.json turns off only that file’s inline hooks. Hook files and the plugin keep running.
  • A hook file that sets its own disableAllHooks to true does not count. The other hook files still do.
  • For cc-safety-net@cc-marketplace in enabledPlugins, the first repository settings file that sets it takes precedence over $COPILOT_HOME/settings.json. A repository true re-enables a user false.

Hook config errors in GitHub Copilot CLI

Last modified on October 22, 2026