Install in Claude Code on the web
Set up LeoPrevent for claude.ai/code cloud sessions with a setup script, a licence key and an allowed domain.
Cloud sessions at claude.ai/code do not use your local installs and have no /plugin command. You set LeoPrevent up once in the environment's settings, and it applies to every new session in that environment.
Before you start#
- A licence key from Plugin setup in the dashboard. Cloud machines are rebuilt, so this environment connects with a key rather than browser login.
Setup#
All of these are in the environment's ⋮ menu, under Edit environment.
- 1Add it to the setup script
Append these lines, keeping whatever is already there.
# LeoPrevent security review hook CLAUDE_BIN="$(command -v claude || ls -d "$HOME"/.local/bin/claude "$HOME"/.claude/local/claude \ /usr/local/bin/claude /opt/node*/bin/claude 2>/dev/null | head -1)" CLAUDE_BIN="${CLAUDE_BIN:-claude}" "$CLAUDE_BIN" plugin marketplace add leotrace-hq/leoprevent-plugin \ --sparse .claude-plugin .agents/plugins || true "$CLAUDE_BIN" plugin install leoprevent@leotrace \ || echo "leoprevent: install failed, reviews will not run" >&2 "$CLAUDE_BIN" plugin list || true # confirms in the setup log that it landed - 2Set your licence key
Add it as an environment variable with this name.
LEOPREVENT_LICENSE_KEY - 3Allow the server
Under Network access, choose Custom, tick Also include default list of common package managers, and add this to Allowed domains:
api.leotrace.io - 4Verify in a new session
The setup log should show
leoprevent@leotrace … enabled.claude plugin list
These settings apply to new sessions. A failed install never blocks your session; if reviews never run, look in the setup log for leoprevent: install failed, reviews will not run.
Check it worked#
Paste this into your agent and let it reply. The finished turn is what checks in.
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.
Already installed this before?#
Nothing to reinstall. The setup script runs again when the environment is rebuilt, and your key is an environment variable, so it comes back with it.
Update#
The setup script installs the latest version whenever the environment is rebuilt. To update sooner, edit the setup script or the allowed domains, which forces a rebuild.
Remove#
Delete the LeoPrevent lines from the setup script and remove the LEOPREVENT_LICENSE_KEY variable. New sessions no longer load the plugin.