AI Agent Guardrails Windows Guide — AI skill for Claude Code
Verified guide: a global guardrail that blocks catastrophic shell commands from AI agents on Windows (Claude Code + Git Bash) — shared denylist including password-manager CLIs, PreToolUse hook, Window.
How to install AI Agent Guardrails Windows Guide
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open AI-Architect-Lab-333/ai-agent-guardrails-windows-guide and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What AI Agent Guardrails Windows Guide does
Verified guide: a global guardrail that blocks catastrophic shell commands from AI agents on Windows (Claude Code + Git Bash) — shared denylist including password-manager CLIs, PreToolUse hook, Windows pitfalls documented
Alternatives in AI
- J Space Cognition Suite V3.7 — J-Space Cognition Suite V3.7 - AI cognitive-enhancement Skills based on Anthropic's J-space global workspace r 3k ★
- Agmsg — Cross-vendor messaging for CLI AI coding agents — let Claude Code, Codex, Gemini & Copilot talk to each other 1.5k ★
- Investment News — 为 A股投资者打造的全球产业链资讯看板 · 12 大赛道一一对应 A股板块(半导体/AI/机器人/新能源车…),覆盖 100+ 权威源,用你自己的大模型每日提炼中文「今日要点」+ 翻译 · 全程本地、零 API key 447 ★
README
Guide: a global guardrail against catastrophic commands, for AI agents on Windows (Claude Code + Git Bash)
**The problem this guide solves**: you let an AI agent (Claude Code or another) run shell commands on your Windows machine, sometimes autonomously. One day, by accident — a misread instruction, a badly built path, a hallucination — it will attempt something irreversible: `rm -rf /`, a `git push --force`, a `Remove-Item -Recurse` on the drive root. This guide installs a **global guardrail**: a list of catastrophic command patterns, checked by a hook *before every execution*, which blocks the command and tells the agent why.
**Verified working** configuration (Windows 11, Claude Code 2.1.x, Git for Windows, July 2026), including the end-to-end test: a real agent session asked to run `git push --force` gets blocked by the hook before git even starts.
**This guide exists because the Unix recipe does not work as-is on Windows.** The concept (a shared denylist plus a PreToolUse hook that exits with code 2) comes from [David Ondrej's `global-agent-guardrails` skill](https://github.com/davidondrej/skills/tree/main/skills/ops-and-setup/global-agent-guardrails) (MIT), designed for macOS/Linux. Installed naively on Windows, the guardrail **looks like it is in place but blocks nothing** — the worst possible failure mode for a safety tool. The scripts in this guide are an original reimplementation that fixes two very real Windows pitfalls, documented below.
**What this guardrail is — and is not.** It is a seatbelt against *accidents*. It is **not** a sandbox against a malicious agent: trivial obfuscation (`python -c "shutil.rmtree(...)"`) sails past a regex. If your threat model is a hostile agent, you need isolation (VM, container, dedicated account), not a denylist.
**Where this fits**: part of a Windows agent-tooling set — [orchestrating agents with tmux in WSL2](https://github.com/AI-Architect-Lab-333/windows-tmux-agent-orchestration) runs several agents at once
Related Skills
Bleep
Stops AI coding agents (Claude Code, Codex, Copilot) from leaking private/company repository names onto public
Smart Context Delegation
Cut coding-agent token usage by ~90%: a PreToolUse hook blocks large file reads; bulk-read/code-write delegate
Weir
Claude Code wrote grep 4,575 times and rg zero times across 25,216 Bash calls in one user’s transcripts. weir
MyEconomicClaude
Token-efficient Claude Code setup: global CLAUDE.md (clean code rules + best practices), RTK hook (60-90% toke
Ethos Gate
A PreToolUse safety gate for autonomous AI agents: blocks irreversible or outward-facing actions (sends, spend
Usewarden
Free, local guardrail for AI coding agents — Claude Code, Cursor, Gemini CLI and more. Blocks out-of-scope wri
Related Agents
Calendar Agent
Builds a publishing calendar the creator can actually hit — cadence from the channel archetype, backwards-plan
Code Audit Maintainer Shell
Maintainer-only audit of framework bash and the bats suites guarding it: quoting/portability correctness, a sh
Sp Reviewer
Use as a pre-push guardrail before committing or pushing. Runs lint, build, tests and a secret scan, reviews t