/agent-guard:setup-agent-guardfrom agent-guard
Diagnoses and repairs Agent Guard installation: verifies plugin binary, jq/gitleaks dependencies, host integration, and hook protection. Use when Agent Guard reports degraded protection or setup warnings.
Ships in agent-guard. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Make Agent Guard operational without silently changing the machine. Diagnose first, request approval before package-manager or download actions, and finish with a real smoke test.
Resolve the Agent Guard executable without confusing the plugin with a standalone install.
../../bin/agent-guard relative to this SKILL.md directory.command -v agent-guard, if present. Compare its version with the plugin binary and report version drift, but do not substitute it for the plugin binary or modify the standalone installation without explicit approval.command -v agent-guard when the plugin-relative binary is unavailable, and clearly state that plugin-local verification could not be completed.PATH.Run the read-only diagnosis:
"<agent-guard-bin>" setup
setup and doctor report only local dependencies. Their
host hook protection: unverified notice is expected even when they exit
0; do not call that result runtime protection.
If jq is missing, identify the available system package manager and show the exact install command. Ask for explicit user approval before running it. Do not use sudo unless the user explicitly approves elevated installation.
If setup reports gitleaks version isolation requires setsid or perl
rather than a missing gitleaks, or setup --install stops with
install a gitleaks process-isolation helper:, do not reinstall gitleaks.
Show the exact command that installs util-linux (which provides setsid)
on Linux, or Perl in a Homebrew environment, and ask for explicit approval
before running it. setup --install does not automatically install this
helper tool either: without it, setup --install stops before the gitleaks
download and keeps exiting nonzero until the tool is installed.
If gitleaks is missing, prefer Agent Guard's private, checksum-pinned installer:
agent-guard setup.AGENT_GUARD_GITLEAKS_HELPER=off skips it."<agent-guard-bin>" setup --install \
--gitleaks-version "<version>" \
--gitleaks-checksum "<published-sha256>"
Never substitute an unverified checksum and never bypass TLS verification.
If an approved dependency installation is blocked by the host sandbox:
"<agent-guard-bin>" setup diagnosis, and continue only when the dependency
reports ok.Verify the plugin-local installation:
"<agent-guard-bin>" check
"<agent-guard-bin>" smoke-test
Treat check as dependency/config validation and smoke-test as proof of the binary's own behavior. They do not prove that the host is dispatching plugin hooks.
Identify the active host and verify its plugin boundary before claiming that protection is active.
SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, and Stop hooks. Every hook must be enabled and trusted. Treat Untrusted and Modified as inactive; an updated hook must be reviewed and trusted again.hooks.state or copy trust hashes into config.toml. Hook trust is a user security decision and must go through the Codex trust UI. If SessionStart itself is untrusted, explain that it cannot emit the setup warning or invoke this skill automatically./agent-guard:verify can check the working tree, but it does not prove live hook dispatch.$setup-agent-guard in Codex or /agent-guard:setup-agent-guard in Claude Code). Do not apply one host's setup steps to the other.Run live host probes through the normal command tool selected by the active host for the current task. Do not read a real sensitive file.
Pre-tool probe:
printf '%s\n' 'AGENT_GUARD_LIVE_PRE_TOOL_PROBE'
The expected result is an Agent Guard block before the marker is printed. If the marker appears, the live command boundary is not protected.
Post-tool probe:
printf '%s\n' 'AGENT_GUARD_LIVE_POST_TOOL_PROBE'
The raw marker must not reach the model; expect [REDACTED] in a masked or sanitized replacement. While local diagnostic logging is on the replacement also names the hook invocation that produced it, as [REDACTED] agent-guard live probe run_id=<run id>; report that id so the user can resolve it with agent-guard logs export instead of taking the probe result on trust.
[REDACTED] for running the probe. These sentinels prove host dispatch without reading a sensitive file or printing a credential-shaped value; the plugin-local smoke test separately proves the real detection rules.In Codex, if only a wrapping/orchestration tool such as functions.exec is exposed, test that exact route. Agent Guard cannot replace or wrap Codex's host executor; it can protect only nested calls that Codex exposes to plugin hooks.
In Claude Code, run the probes through the normal Bash tool so the plugin's PreToolUse and PostToolUse hooks are exercised.
If either probe bypasses the hook, report that route as unsupported in the current host instead of claiming successful setup.
After dependency, enablement, or trust changes, restart the active host and run both live probes again in a new task. In Codex, plugin hooks provide the supported command boundary; do not configure Claude-specific command wrapping as a Codex setup step. In Claude Code, restart the shell and Claude Code only when the optional shell integration changed.
Classify each exact host route from the visible host result and Agent Guard hook output. Do not invent a CLI subcommand, collect settings or traces, or ask the CLI to attest who made a host decision.
PreToolUse blocked message is not enough to identify the
source.DEGRADED response shows a dispatched hook
whose dependency or policy check could not run. It is neither a clean scan
nor proof of protection.0.
Keep those two observations distinct in the report.Bash, apply_patch, and MCP calls; do not claim that Codex hooks intercept arbitrary read, grep, web-search, or opaque wrapping-tool calls. In Claude Code, verify the configured matcher and the exact tool route used.agent-guard setup-shell, agx, and command wrapping are Claude Code shell-snapshot integrations. setup-shell enables command wrapping by default; --no-command-wrapping is the persistent opt-out and AGENT_GUARD_COMMAND_WRAPPING=off is the runtime opt-out. Only configure them when the user explicitly asks for Claude Code coverage.check and smoke-test.What SKILL.md sets; muted values are Claude Code's defaults
2 skills in this plugin
npx claudepluginhub jeongjaesoon/agent-guard --plugin agent-guardOther plugins' skills for the same job