# Install in Claude Code for VS Code

Have Claude Code in VS Code walk you through installing and connecting LeoPrevent, or add it yourself from the /plugins panel.

The Claude Code extension for VS Code installs plugins from its `/plugins` panel. Have Claude walk you through it, or do it yourself. For GitHub Copilot's chat panel, see [Install in GitHub Copilot](https://help.leotrace.io/install-github-copilot/).

## Before you start

- The **Claude Code** extension by **Anthropic** is installed in VS Code, and you are signed in to Claude.
- Your repository is open and trusted, and it is a git repository.
- You have a LeoPrevent account.

## Set it up with your agent

Claude walks you through the plugin manager, then opens your browser to connect it. The same prompt is in the dashboard under **Plugin setup**, with **Copy**.

Open Claude Code in VS Code and send this prompt:

```text
Walk me through installing LeoPrevent in the Claude Code extension for VS Code from https://github.com/leotrace-hq/leoprevent-plugin. Use /plugins to check whether leoprevent is already installed and enabled. If absent, add leotrace-hq/leoprevent-plugin in Marketplaces, then install leoprevent. Start a new conversation, then run /leoprevent:login if not already connected. Never print or ask me for a licence key. Keep login running until it prints "LeoPrevent · Connected". Tell me what I need to approve or restart myself. Verify with a real turn, not by running the hook by hand: LeoPrevent fails open, so a successful manual run does not prove your coding agent invokes it. Confirm that turn appears in the LeoPrevent dashboard; report verification as pending if you cannot check it.
```

On the setup screen you see when you first sign in, **Open in VS Code** opens Claude Code with the prompt filled in.

Approve what it asks for, start a new conversation when it tells you to, and choose **Link installation** when the browser opens.

## Manual setup

**Open Claude Code in VS Code**

Open your repository, then run this from the Command Palette. If Restricted Mode disables the extension, trust the repository only if you trust its contents. Sign in to Claude if prompted.

```text
Claude Code: Open in New Tab
```

**Open the plugin manager**

If **leoprevent** is already installed and enabled, skip the next two steps.

```text
/plugins
```

**Add the marketplace**

In **Marketplaces**, add the repository.

```text
leotrace-hq/leoprevent-plugin
```

**Install leoprevent**

In **Plugins**, find **leoprevent** and install it for you or for this project. Start a new conversation afterwards.

**Connect to LeoPrevent**

Run this, then choose **Link installation** on the page it opens in your browser. Keep it running until it prints **LeoPrevent · Connected**. Skip this step if the installation is already connected.

```text
/leoprevent:login
```

## Check it worked

Paste this into your agent and let it reply. The finished turn is what checks in.

```text
Hello! I just installed LeoPrevent. Say hi back so this turn finishes.
```

The installation then shows as **Live** in **Plugin setup**. See [Check it's working](https://help.leotrace.io/check-its-working/).

## Already installed this before?

Use `/plugins` to reinstall **leoprevent**, then start a new conversation. Your existing connection survives.

## Update

Open `/plugins`, refresh the `leotrace` marketplace, then update **leoprevent**. Start a new conversation afterwards. Your connection survives the update.

## Remove

In `/plugins`, uninstall **leoprevent**, then start a new conversation.

Source: https://help.leotrace.io/install-claude-code-vs-code/ (updated 2026-11-19)
