> For the complete documentation index, see [llms.txt](https://docs.konvu.com/konvu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.konvu.com/konvu/prevent/claude-code-guardrails.md).

# Set up Guardrails for Claude Code

Set up and manage the Konvu Guardrails integration for Claude Code.

Guardrails brings security rules from your connected repositories into Claude Code. An administrator adds the plugin to Claude Code managed settings; Claude Code then installs it on developer computers. [Guardrails on your computer](/konvu/prevent/guardrails-on-your-computer.md) explains what the plugin installs and checks during a session.

## Create the integration

First, [connect your source code to Konvu](/konvu/get-started/connect-your-environment/source-code.md) and make sure Guardrails has mapped rules for those repositories. You also need access to Konvu **Integrations** and your organization's Claude Code **Managed settings**.

1. In Konvu, open **Integrations → Claude Code → Add integration**.
2. Copy the JSON from the setup dialog into **Admin Settings → Claude Code → Managed settings**. Merge it with your existing settings. If `konvu` is already listed as a marketplace, replace that entry so an old release tag does not remain. This enables `guardrails@konvu` for the fleet and provides a deployment key for computer enrollment; you are adding settings, not uploading plugin code.
3. Return to Konvu and select **Create integration**.
4. Start a new Claude Code session on a developer computer. Claude Code installs the plugin, which enrolls the computer and downloads its repository rules in the background.

<figure><img src="https://4216786002-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd2uS6kuROSFKDrT5HC1U%2Fuploads%2Fgit-blob-dcfba90e39496d6ff306c11bd2a58ea6f5fcaafe%2Fguardrails-claude-setup-demo.png?alt=media" alt="Claude Code setup dialog with managed settings and a sample deployment key" width="560"><figcaption></figcaption></figure>

## Check and manage it

Open **Integrations → Claude Code** and select the integration. Enrolled computers appear after their next Claude Code session; check **Last seen** and **Status**.

<figure><img src="https://4216786002-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd2uS6kuROSFKDrT5HC1U%2Fuploads%2Fgit-blob-17b0c8a953aa3eca75a30ab3a8e58506f82f18dc%2Fguardrails-claude-integrations-demo.png?alt=media" alt="Claude Code integrations list with an enabled integration" width="540"><figcaption></figcaption></figure>

The deployment key enrolls new computers. It expires after seven days unless extended; computers already enrolled keep working. Under **Key actions**, you can extend it, generate a replacement, or revoke it. If you generate a new key, update Claude Code managed settings so new computers can enroll.

To disconnect one computer, select **Revoke** in its row. A computer that still receives a valid deployment key through managed settings can enroll again; rotate or revoke that key to prevent it. The integration menu also lets you rename or delete it.

<figure><img src="https://4216786002-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd2uS6kuROSFKDrT5HC1U%2Fuploads%2Fgit-blob-80794ddeed6d1e91eecebf4676a4f3c3544394ef%2Fguardrails-claude-management-demo.png?alt=media" alt="Key actions and connected computers in a Claude Code integration" width="540"><figcaption></figcaption></figure>

Treat the deployment key in managed settings as a credential: Claude Code passes it to processes it starts, including shell commands.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.konvu.com/konvu/prevent/claude-code-guardrails.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
