setup-shell — скилл для Claude Code: маскировка shell-команд
Ставит и обновляет shell-интеграцию Agent Guard: прописывает управляемый блок в rc-файл оболочки и включает обёртку команд.
npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a claude-codeЧто делает setup-shell
Скилл нужен, когда вы явно просите включить или обновить маскировку shell-команд, либо когда предупреждение о shell-интеграции советует перезапустить setup-shell. Он берёт бинарник из кэша плагина по относительному пути ../../bin/agent-guard и проверяет, что тот исполняемый. Даже если в PATH лежит другой agent-guard, используется именно плагинный — отдельную копию скилл не ставит и не обновляет.
Перед запуском скилл объясняет, что правка rc-файла оболочки не то же самое, что настройка хуков плагина, и что управляемый блок обновляется с включённой обёрткой команд по умолчанию. Запись в домашний каталог требует одобрения хоста. Дальше выполняется "<plugin-local-agent-guard>" setup-shell, и по успеху выводятся все пути rc из вывода команды.
После этого нужно перезапустить оболочку и все агентские сессии, запущенные из неё. У fish два rc-файла: интеграция написана на POSIX shell, а fish её не загружает, потому что снимки оболочки агента идут через bash или zsh. Если одобренную запись блокирует песочница хоста, скилл передаёт ошибку как есть и не пробует другой rc или ручную правку — он показывает команду для запуска в терминале и ждёт подтверждения. Опт-аут навсегда даёт setup-shell --no-command-wrapping, а AGENT_GUARD_COMMAND_WRAPPING=off выключает обёртку только на время работы.
Какие задачи решает
- включить маскировку shell-команд без поиска бинарника в кэше плагина
- обновить управляемый блок в rc-файле оболочки
- разобраться, почему предупреждение просит перезапустить
setup-shell - выключить обёртку команд навсегда или только на текущий запуск
- понять, какие rc-файлы править в fish и что перезапускать после
Примеры запросов агенту
- Включи маскировку shell-команд Agent Guard через setup-shell
- Перезапусти setup-shell и обнови блок в моём rc-файле
- Отключи обёртку команд навсегда через
setup-shell --no-command-wrapping
Как установить setup-shell
1Через Skills CLI (Vercel)
npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a claude-code2Вручную: положить файлы
~/.claude/skills/setup-shell/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/setup-shell/
1Через Skills CLI (Vercel)
npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a codex2Вручную: положить файлы
.agents/skills/setup-shell/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a cursor2Вручную: положить файлы
.cursor/skills/setup-shell/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install JeongJaeSoon/agent-guard setup-shell2Вручную: положить файлы
.github/skills/setup-shell/SKILL.md1Через Skills CLI (Vercel)
npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a gemini-cli2Командой платформы
gemini skills install https://github.com/JeongJaeSoon/agent-guard --path plugins/agent-guard/skills/setup-shellВручную: положить файлы
.devin/skills/setup-shell/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о setup-shell
Как установить setup-shell в Claude Code?
Выполните npx skills add JeongJaeSoon/agent-guard --skill setup-shell -a claude-code. Файл скилла окажется по пути ~/.claude/skills/setup-shell/SKILL.md.
Что делает setup-shell?
Ставит или обновляет shell-интеграцию Agent Guard: правит управляемый блок в rc-файле оболочки и включает обёртку команд. Запускается по вашей явной просьбе или по предупреждению о shell-интеграции.
Что нужно перезапустить после setup-shell?
Оболочку и все агентские сессии, запущенные из неё. В fish правятся два rc-файла, потому что интеграция — код POSIX shell, а снимки оболочки агента идут через bash или zsh.
Исходный текст
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