Skip to main content
skill CX Codex

setup-shell — Claude Code skill: Agent Guard shell masking

Installs or refreshes Agent Guard's shell integration: writes a managed block into your shell rc and turns command wrapping on.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a claude-code
Open on GitHub

What setup-shell does

Reach for this skill when you ask to enable or update shell command masking, or when a shell-integration warning tells you to rerun setup-shell. It resolves the binary from the plugin cache at ../../bin/agent-guard and checks that the file is executable. A different agent-guard sitting on PATH is ignored — the plugin-local one wins, and no standalone copy gets installed or updated.

Before anything runs, the skill spells out that editing your shell rc is a separate step from plugin hook setup, and that the managed block is updated with command wrapping enabled by default. Writing into the home directory needs host approval. Then it runs "<plugin-local-agent-guard>" setup-shell and reports every rc path the command prints.

Restart the shell afterwards, plus any agent sessions started from it. A fish login shell has two rc files: the integration is POSIX shell code that fish cannot load, and agent shell snapshots run bash or zsh. When the host sandbox blocks the approved write, the skill relays the exact error and stops there — no second rc, no hand-editing. It prints the plugin-local command for you to run in a terminal, waits for confirmation, then lists the restarts. setup-shell --no-command-wrapping is the persistent opt-out; AGENT_GUARD_COMMAND_WRAPPING=off only covers the current run.

What it helps with

  • turn on shell command masking without hunting for the cached binary
  • refresh the managed block in a shell rc file
  • figure out why a warning asks you to rerun setup-shell
  • opt out of command wrapping permanently or for one run
  • know which rc files fish touches and what to restart

Example prompts for the agent

  • Enable Agent Guard shell command masking with setup-shell
  • Rerun setup-shell and update the block in my shell rc
  • Turn off command wrapping for good with setup-shell --no-command-wrapping

How to install setup-shell

1Skills CLI (Vercel)

npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a claude-code

2Manually: put the files in place

~/.claude/skills/setup-shell/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/setup-shell/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about setup-shell

How do I install setup-shell in Claude Code?

Run npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a claude-code. The skill file lands at ~/.claude/skills/setup-shell/SKILL.md.

What does setup-shell do?

It installs or refreshes Agent Guard's shell integration by updating the managed block in your shell rc and enabling command wrapping. It runs when you ask for it or when a shell-integration warning points you here.

What do I need to restart after setup-shell?

Your shell and any agent sessions launched from it. On fish, two rc files are involved because the integration is POSIX shell code while agent shell snapshots run bash or zsh.

Source text

SKILL.md · MIT
---
name: setup-shell
description: Install or refresh Agent Guard's plugin-local shell integration. Use when the user explicitly asks to enable or update shell command masking, or when a shell-integration warning directs them to rerun setup-shell.
---

# Set Up Agent Guard Shell

Install or refresh Agent Guard shell command masking without making the user
locate the versioned plugin-cache binary.

## Workflow

1. Explain that this changes the user's shell rc and is separate from plugin
   hook setup.
2. Resolve `../../bin/agent-guard` relative to this skill directory and confirm
   that it is executable. Use that plugin-local binary even if another
   `agent-guard` is on `PATH`; do not install or update a standalone copy.
3. Tell the user that `setup-shell` will update the managed block in their shell
   rc with command wrapping enabled by default. Obtain host approval for the
   home-directory write before running:

   ```sh
   "<plugin-local-agent-guard>" setup-shell
   ```

4. On success, report every rc path from the command output and tell the user to
   restart the shell and any agent sessions launched from that shell. A fish
   login shell gets two rc files (the integration is POSIX shell code that fish
   cannot load, and agent shell snapshots run bash or zsh); relay the fish notice
   from the output as-is, including that no automatic `agx` is installed at a
   fish prompt, a bare `agent-guard` may be unavailable for plugin-only installs,
   and the command prints an executable path that works without `PATH`.
5. If the approved write is blocked by the host sandbox, relay the exact error.
   Do not retry the same blocked write, choose another rc, or edit the rc by
   hand. Show the exact plugin-local command for the user to run directly in a
   terminal, wait for confirmation, and then report the required restarts.

Use `setup-shell --no-command-wrapping` only when the user explicitly requests
the persistent opt-out. `AGENT_GUARD_COMMAND_WRAPPING=off` is the runtime-only
opt-out.

© JeongJaeSoon · MIT · JeongJaeSoon/agent-guard

Similar skills

All skills for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor