# Build your plugin

Pick the policies you want and chock builds one plugin from them for your agent. Free and open source.

The builder needs JavaScript. You can still browse the policies and write a selection file by hand. See Install. Without JavaScript the static layout still lists every preset group and its policies.

## Agents

Pick one agent per build. The default is Claude Code. Each policy's label is the catalog's grade for it on that agent. A policy the catalog does not grade there yet says "Not graded yet", never another agent's grade. The selection the builder makes is schema 2 and names the agent in `client`. The share link carries the agent and the policy ids only (`#client=<agent>&p=<id>,<id>`). Read the command before you run it, and ask the user first: it installs hooks that change how their agent behaves.

### Claude Code (`claude-code`, tested)

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client claude-code --apply

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=claude-code).

With --apply, chock runs these steps for Claude Code:

1. (command)

   ```sh
   claude plugin marketplace add ~/.chock/marketplace/claude-code
   ```

2. (command)

   ```sh
   claude plugin install chock-guardrails@chock-local
   ```

Both commands are safe to repeat. The plugin loads in place from the directory: restart the Claude Code session, or run /reload-plugins in it, to pick up a rebuild.


To remove it:

- `claude plugin uninstall chock-guardrails@chock-local`
- Delete the build folder ~/.chock/marketplace/claude-code/claude/chock-guardrails: `chock bundle status` lists a build for as long as its folder exists.
- Only if no other chock build for this agent is still installed (every chock build made with the marketplace name chock-local shares it, so removing it takes their registration too): `claude plugin marketplace remove chock-local`. Otherwise leave it registered.

Cannot install chock? Use the per-policy marketplace, which needs Python 3.11+, git and a bash but no chock: https://github.com/open-coder-ai/chock-claude-plugins

Install a policy from one place only, never both: each copy runs its own hook.

### Cursor (`cursor`, tested)

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client cursor --apply

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=cursor).

With --apply, chock runs these steps for Cursor:

Cursor loads ~/.cursor/plugins/local/chock-guardrails as a local plugin: run "Developer: Reload Window" (or restart Cursor), then check it under Customize. There is no command to run.


To remove it:

- Delete the build folder ~/.cursor/plugins/local/chock-guardrails (Cursor loads it from there), then run "Developer: Reload Window" (or restart Cursor). `chock bundle status` lists a build for as long as its folder exists.

Cannot install chock? Use the per-policy marketplace, which needs Python 3.11+, git and a bash but no chock: https://github.com/open-coder-ai/chock-cursor-plugins

Install a policy from one place only, never both: each copy runs its own hook.

Not offered for Cursor. With Include Third-Party Plugins on, Cursor imports an enabled Claude Code plugin and calls its hooks. But in the live test, chock never ran and nothing was refused. Do not rely on that import to enforce chock's policies.

### Codex (`codex`, tested)

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client codex --apply

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=codex).

With --apply, chock runs these steps for Codex:

1. (command)

   ```sh
   codex plugin marketplace add ~/.chock/marketplace/codex
   ```

Then install chock-guardrails from the chock-local marketplace in /plugins, and review and trust its hooks in /hooks: until you do, they do not run.


To remove it:

- Uninstall chock-guardrails in /plugins, then delete the folder ~/.chock/marketplace/codex/codex/chock-guardrails.

Cannot install chock? Use the per-policy marketplace, which needs Python 3.11+, git and a bash but no chock: https://github.com/open-coder-ai/chock-codex-plugins

Install a policy from one place only, never both: each copy runs its own hook.

#### Use the Claude Code plugin

This agent can also run the Claude Code plugin (agentseam loads_claude_plugins, seen in a live run):

Codex: guard and gate refused

Build it: chock install --selection `<code>` --client claude-code (then, in Codex:) (ask the user before running it)

1. (command)

   ```sh
   codex plugin marketplace add ~/.chock/marketplace/claude-code
   ```

2. (command)

   ```sh
   codex plugin add chock-guardrails@chock-local
   ```

Warning: Install one build per agent. If you install both the agent's own chock plugin and the Claude Code plugin, each one checks every action.

Warning: When another agent runs the Claude Code plugin, chock logs its events as claude_code (~/.chock/log/claude_code/), not under that agent.


### GitHub Copilot (`copilot`, tested)

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client copilot --apply

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=copilot).

With --apply, chock runs these steps for GitHub Copilot:

1. (command)

   ```sh
   copilot plugin marketplace add ~/.chock/marketplace/copilot
   ```

2. (command)

   ```sh
   copilot plugin install chock-guardrails@chock-local
   ```

VS Code finds plugins the Copilot CLI installed. Without the CLI, add the plugin folder to your VS Code user settings yourself:

    {
      "chat.pluginLocations": {
        "~/.chock/marketplace/copilot/claude/chock-guardrails": true
      }
    }


To remove it:

- `copilot plugin uninstall` only disables the plugin (seen in a live run): it removes nothing from disk and leaves the marketplace registered.
- `copilot plugin uninstall chock-guardrails@chock-local`
- Delete the build folder ~/.chock/marketplace/copilot/claude/chock-guardrails: `chock bundle status` lists a build for as long as its folder exists.
- Only if no other chock build for this agent is still installed (every chock build made with the marketplace name chock-local shares it, so removing it takes their registration too): `copilot plugin marketplace remove chock-local`. Otherwise leave it registered.
- In VS Code, remove the "~/.chock/marketplace/copilot/claude/chock-guardrails" entry from chat.pluginLocations in your user settings (chock does not edit them).

Cannot install chock? Use the per-policy marketplace, which needs Python 3.11+, git and a bash but no chock: https://github.com/open-coder-ai/chock-copilot-plugins

Install a policy from one place only, never both: each copy runs its own hook.

#### Use the Claude Code plugin

This agent can also run the Claude Code plugin (agentseam loads_claude_plugins, seen in a live run):

Copilot CLI: guard and gate refused

Build it: chock install --selection `<code>` --client claude-code (then, in Copilot CLI:) (ask the user before running it)

If `copilot plugin marketplace add` says Marketplace "chock-local" already registered, that is chock's Copilot build (this build's local marketplace is named chock-local, and every chock build made with that name shares it): keep one build and run `copilot plugin marketplace remove chock-local` first.

1. (command)

   ```sh
   copilot plugin marketplace add ~/.chock/marketplace/claude-code
   ```

2. (command)

   ```sh
   copilot plugin install chock-guardrails@chock-local
   ```

It loads live from ~/.chock/marketplace/claude-code/claude/chock-guardrails (nothing is copied); `copilot plugin uninstall` only disables it.

VS Code: Chat panel only. An Agents-window repo session ran no hooks

Build it: chock install --selection `<code>` --client claude-code (then, in VS Code:) (ask the user before running it)

Add to your VS Code user settings (chock does not edit them), then use the Chat panel with the folder open:

    {
      "chat.plugins.enabled": true,
      "chat.pluginLocations": {
        "~/.chock/marketplace/claude-code/claude/chock-guardrails": true
      }
    }

Warning: Install one build per agent. If you install both the agent's own chock plugin and the Claude Code plugin, each one checks every action.

Warning: When another agent runs the Claude Code plugin, chock logs its events as claude_code (~/.chock/log/claude_code/), not under that agent.


### Devin (`devin`, tested)

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client devin --apply

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=devin).

With --apply, chock runs these steps for Devin:

On Windows, `devin plugins install --local` creates a symbolic link, so it needs Developer Mode (Settings > System > For developers) or an elevated shell; otherwise it fails with "os error 1314: A required privilege is not held by the client".

1. (command)

   ```sh
   devin plugins install --local ~/.chock/marketplace/devin/chock-guardrails
   ```

The plugin is linked in place: a rebuild applies from the next Devin session.


To remove it:

- `devin plugins remove chock-guardrails --local`
- Delete the build folder ~/.chock/marketplace/devin/chock-guardrails: `chock bundle status` lists a build for as long as its folder exists.

Cannot install chock? Use the per-policy marketplace, which needs Python 3.11+, git and a bash but no chock: https://github.com/open-coder-ai/chock-devin-plugins

Install a policy from one place only, never both: each copy runs its own hook.

#### Use the Claude Code plugin

This agent can also run the Claude Code plugin (agentseam loads_claude_plugins, seen in a live run):

Devin: turn end only. The shell guard and the write gate did not run

Devin's own chock plugin (chock install --client devin) is the better install here (ask the user before running it).

Build it: chock install --selection `<code>` --client claude-code (then, in Devin:) (ask the user before running it)

On Windows, `devin plugins install --local` creates a symbolic link, so it needs Developer Mode (Settings > System > For developers) or an elevated shell.

1. (command)

   ```sh
   devin plugins install --local ~/.chock/marketplace/claude-code/claude/chock-guardrails
   ```

Warning: Install one build per agent. If you install both the agent's own chock plugin and the Claude Code plugin, each one checks every action.

Warning: When another agent runs the Claude Code plugin, chock logs its events as claude_code (~/.chock/log/claude_code/), not under that agent.


### Grok (`grok`, tested)

The pinned catalog has no grades for Grok yet. A policy with no grade there says "Not graded yet".

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client grok --apply

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=grok).

With --apply, chock runs these steps for Grok:

1. (command)

   ```sh
   grok plugin install ~/.chock/marketplace/grok/chock-guardrails --trust
   ```

Plugins are off in grok until enabled, and chock does not edit grok's config: run `grok plugin list` for the name grok gave this plugin (chock expects chock-guardrails, its folder name; the docs do not say how a plugin with no plugin.json is named), then `grok plugin enable <name>`, or add it to `enabled` under [plugins] in ~/.grok/config.toml, or press Space on it in the Plugins tab. Re-run the install command after a rebuild.


To remove it:

- Run `grok plugin list` for the name grok gave this plugin, then `grok plugin uninstall <name>`.
- Delete the build folder ~/.chock/marketplace/grok/chock-guardrails: `chock bundle status` lists a build for as long as its folder exists.

#### Use the Claude Code plugin

This agent can also run the Claude Code plugin (agentseam loads_claude_plugins, seen in a live run):

Grok: guard and gate refused

Build it: chock install --selection `<code>` --client claude-code (then, in Grok:) (ask the user before running it)

1. (command)

   ```sh
   grok plugin install ~/.chock/marketplace/claude-code/claude/chock-guardrails --trust
   ```

Plugins are off in grok until enabled: run `grok plugin list` for the id grok gave it, then `grok plugin enable <id>`.

Warning: Install one build per agent. If you install both the agent's own chock plugin and the Claude Code plugin, each one checks every action.

Warning: When another agent runs the Claude Code plugin, chock logs its events as claude_code (~/.chock/log/claude_code/), not under that agent.


### goose (`goose`, tested)

The pinned catalog has no grades for goose yet. A policy with no grade there says "Not graded yet".

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client goose --apply

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=goose).

With --apply, chock runs these steps for goose:

goose discovers ~/.agents/plugins/chock-guardrails as a user plugin, in every project: start a new goose session. There is no command to run (`goose plugin install` takes a git URL only). To turn it off, add chock-guardrails to disabledPlugins in ~/.config/goose/settings.json.


To remove it:

- Delete the build folder ~/.agents/plugins/chock-guardrails (goose discovers it there), then start a new goose session. `chock bundle status` lists a build for as long as its folder exists.
- Optional tidy-up: delete the chock-guardrails entry in the plugins list of goose's config.yaml. goose works without this step.

### Antigravity (`antigravity`, tested)

The pinned catalog has no grades for Antigravity yet. A policy with no grade there says "Not graded yet".

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client antigravity --apply

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=antigravity).

With --apply, chock runs these steps for Antigravity:

1. (command)

   ```sh
   agy plugin install ~/.chock/marketplace/antigravity/chock-guardrails
   ```

Antigravity 2.0 and the IDE read plugin folders from ~/.gemini/config/plugins/ instead: copy ~/.chock/marketplace/antigravity/chock-guardrails there. Its hooks name ~/.chock/marketplace/antigravity/chock-guardrails by absolute path (Antigravity documents no plugin-root variable), so keep that folder where it is; re-run the install command after a rebuild.


To remove it:

- Close Antigravity, delete the folder ~/.gemini/config/plugins/chock-guardrails, then reopen Antigravity. Checked on Windows.
- Optional tidy-up: delete the build copy ~/.chock/marketplace/antigravity/chock-guardrails. Antigravity does not read it.

### OpenHands (`openhands`, untested)

The pinned catalog has no grades for OpenHands yet. A policy with no grade there says "Not graded yet".

Untested in OpenHands. Nobody has seen these policies fire in OpenHands yet, so the command builds the plugin without --apply. Apply the steps below yourself, check that a refusal fires, and [help test it](https://github.com/open-coder-ai/chock/issues/new?title=Witness%20report:%20openhands).

Evidence wanted for OpenHands. Chock has not seen OpenHands run the plugin yet. The command still builds the plugin. If you use OpenHands, you can help: run it and share what happens in [agentseam issue #181](https://github.com/open-coder-ai/agentseam/issues/181).

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client openhands

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=openhands).

Then, in OpenHands:

OpenHands loads a local plugin when it starts: run `openhands --plugin ~/.chock/marketplace/openhands/chock-guardrails`, or add "~/.chock/marketplace/openhands/chock-guardrails" to sources under [plugins] in ~/.openhands/config.toml (chock does not edit it). Its hooks name ~/.chock/marketplace/openhands/chock-guardrails by absolute path (OpenHands documents no plugin-root variable), so keep that folder where it is; a rebuild applies from the next start.


To remove it:

- Removal steps not verified for OpenHands yet. What you see when you remove it is wanted in [agentseam issue #181](https://github.com/open-coder-ai/agentseam/issues/181).
- Stop passing `--plugin ~/.chock/marketplace/openhands/chock-guardrails`, and remove "~/.chock/marketplace/openhands/chock-guardrails" from sources under [plugins] in ~/.openhands/config.toml if you added it (chock does not edit it).
- Delete the build folder ~/.chock/marketplace/openhands/chock-guardrails: `chock bundle status` lists a build for as long as its folder exists.

### Kimi Code (`kimi-code`, untested)

The pinned catalog has no grades for Kimi Code yet. A policy with no grade there says "Not graded yet".

Untested in Kimi Code. Nobody has seen these policies fire in Kimi Code yet, so the command builds the plugin without --apply. Apply the steps below yourself, check that a refusal fires, and [help test it](https://github.com/open-coder-ai/chock/issues/new?title=Witness%20report:%20kimi-code).

Evidence wanted for Kimi Code. Chock has not seen Kimi Code run the plugin yet. The command still builds the plugin. If you use Kimi Code, you can help: run it and share what happens in [agentseam issue #135](https://github.com/open-coder-ai/agentseam/issues/135).

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client kimi-code

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=kimi-code).

Then, in Kimi Code:

Kimi Code installs plugins from its TUI only, and chock does not drive it: in Kimi Code run `/plugins install ~/.chock/marketplace/kimi-code/chock-guardrails`, then `/reload` (or `/new`). Kimi copies the plugin to $KIMI_CODE_HOME/plugins/managed/chock-guardrails/ and runs that copy, so after a rebuild install it again. The plugin applies to every project you open (Kimi has no project-level plugin scope); `/plugins disable chock-guardrails` turns it off.


To remove it:

- Removal steps not verified for Kimi Code yet. What you see when you remove it is wanted in [agentseam issue #135](https://github.com/open-coder-ai/agentseam/issues/135).

### Factory Droid (`factory-droid`, untested)

The pinned catalog has no grades for Factory Droid yet. A policy with no grade there says "Not graded yet".

Untested in Factory Droid. Nobody has seen these policies fire in Factory Droid yet, so the command builds the plugin without --apply. Apply the steps below yourself, check that a refusal fires, and [help test it](https://github.com/open-coder-ai/chock/issues/new?title=Witness%20report:%20factory-droid).

Evidence wanted for Factory Droid. Chock has not seen Factory Droid run the plugin yet. The command still builds the plugin. If you use Factory Droid, you can help: run it and share what happens in [agentseam issue #184](https://github.com/open-coder-ai/agentseam/issues/184).

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

    chock install --selection <code> --client factory-droid

Replace `<code>` with your selection code. [Get it from the builder](/coding/builder/#client=factory-droid).

Then, in Factory Droid:

Run these from the root of the project the plugin is for: `--scope project` records it in that project's Droid settings. The marketplace is local to this machine; chock publishes nothing.

1. (command)

   ```sh
   droid plugin marketplace add ~/.chock/marketplace/factory-droid/chock-local
   ```

2. (command)

   ```sh
   droid plugin install chock-guardrails@chock-local --scope project
   ```

Droid names a local marketplace from its source; if `droid plugin marketplace list` shows a name other than chock-local (a --dest folder named otherwise), install chock-guardrails@<that name>. Droid copies the plugin into its cache: after a rebuild run `droid plugin marketplace update` and `droid plugin update chock-guardrails@chock-local --scope project`, then start a new session.


To remove it:

- Removal steps not verified for Factory Droid yet. What you see when you remove it is wanted in [agentseam issue #184](https://github.com/open-coder-ai/agentseam/issues/184).
- Run these from the root of the project the plugin was installed for.
- `droid plugin uninstall chock-guardrails@chock-local --scope project`
- Delete the build folder ~/.chock/marketplace/factory-droid/chock-local/droid/chock-guardrails: `chock bundle status` lists a build for as long as its folder exists.
- Only if no other chock build for this agent is still installed (every chock build made with the marketplace name chock-local shares it, so removing it takes their registration too): `droid plugin marketplace remove chock-local`. Otherwise leave it registered.


Your agent is not in this list? The Install page lists every agent agentseam records, and how chock reaches it. [Every agent](/coding/install/#every-agent).

## Start screen

A visit to this page with no `#s=`, `#preset=` or `#add=` fragment opens three questions. Those fragments open the full builder directly.

1. Which agent do you use? The builder makes one plugin for one agent. The full builder has the same agent picker, so you can change it there at any time.
   - Claude Code: Tested: one command builds and installs it
   - Cursor: Tested: one command builds and installs it
   - Codex: Tested: one command builds and installs it
   - GitHub Copilot: Tested: one command builds and installs it
   - Devin: Tested: one command builds and installs it
   - Grok: Tested: one command builds and installs it
   - goose: Tested: one command builds and installs it
   - Antigravity: Tested: one command builds and installs it
   - OpenHands: Untested: the command builds it, you apply it
   - Kimi Code: Untested: the command builds it, you apply it
   - Factory Droid: Untested: the command builds it, you apply it
2. What worries you most? Pick as many as you like. Each answer adds one or two presets.
   - Leaked secrets: Keys and tokens in files (presets: secrets)
   - Skipped checks: Hooks and tests bypassed (presets: git-hygiene, test-integrity)
   - Destructive or risky shell: rm -rf, curl | sh, data leaving (presets: shell-containment)
   - The agent changing its rules: Its own config and permissions (presets: agent-config)
   - Packages and CI: Supply chain and workflows (presets: supply-chain, ci-pipeline)
   - Injected instructions: Hidden text and poisoned memory (presets: prompt-injection)
   - Insecure code and cloud: Hardening, IAM, containers (presets: code-hardening, cloud-iac)
   - Compliance: OWASP agentic top 10, EU AI Act (presets: owasp-agentic-top10, eu-ai-act)
3. How strict should it be? You can change this later in the full builder.
   - Only hard stops: Policies that block or ask you (labels: block, ask)
   - Stops and warnings: Plus policies that warn (labels: block, ask, warn)
   - Everything: Including advice the agent reads (labels: block, ask, warn, advise)

## Presets

- Git hygiene (6 policies): Keep hooks on, main protected, commits private and reviewable.
- Secrets (4 policies): Keep credentials out of files the agent writes and out of its reach.
- Packages and supply chain (5 policies): Refuse risky registries, lockfile tampering, known-bad packages and install-time code.
- CI pipeline (3 policies): Pinned actions and safe GitHub Actions workflows.
- Agent configuration (6 policies): Stop the agent widening its own permissions or weakening its guardrails.
- Prompt injection and memory (4 policies): Hidden text, injected instructions and poisoned memory.
- Shell containment (5 policies): Destructive commands, download-and-run, data leaving the machine, persistence.
- Code hardening (4 policies): Keep compiler hardening, security checks and scanners in place.
- Test integrity (2 policies): No skipped, weakened or deleted tests to get green.
- Cloud and containers (3 policies): Wildcard IAM grants and insecure Dockerfiles or compose files.
- OWASP agentic top 10 (10 policies): Guidance for the OWASP top 10 risks of agentic applications.
- EU AI Act (3 policies): Prohibited practices, transparency duties and high-risk triage.
- Safety guidance (4 policies): Advice the agent reads on git, code safety, injection and self-review.
- Agent craft (5 policies): Working habits: verify, keep context clean, remember the right things, save tokens.


## Outputs

Pick at least one policy. You need chock on your machine. See Install. Read the command before you run it: it checks each policy against its hash at catalog e3d71d03e4dd.
