Foil — AI skill for Claude Code
Keep AI coding agents away from what they shouldn't touch: run Claude Code, Codex or any agent with secrets hidden (even .env in the repo), the network allow-listed, a policy file reviewed like code.
How to install Foil
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open ai-agentic-tools/Foil and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Foil does
Keep AI coding agents away from what they shouldn't touch: run Claude Code, Codex or any agent with secrets hidden (even .env in the repo), the network allow-listed, a policy file reviewed like code, and an audit log of every request. Copy-on-write branches, review before commit. No Docker, no root.
Alternatives in AI
- Pi Agent Desktop — Pi — A cross-platform AI coding agent, bringing the Claude Code experience to your desktop 289 ★
- Dsh Auto Review — Second-model AI auto-review for DeepSeek Harness approval requests: a read-only reviewer subagent returns stru 155 ★
- AppleAI — Apple AI is a lightweight, privacy‑minded macOS menu bar app that keeps your favorite AI assistants one keystr 145 ★
README
Foil: keep AI coding agents away from what they shouldn't touch
[](https://github.com/ai-agentic-tools/foil/actions/workflows/ci.yml) [](https://github.com/ai-agentic-tools/foil/releases/latest) [](LICENSE)
**Let AI agents work in your repo without handing them your secrets, your network, or your machine.**
Claude Code, Codex and their kind run as *you*: they can read `~/.ssh`, the `.env` in your repo and your cloud credentials, reach any host, and leave behind a git hook or a `.claude/settings.json` hook that runs on your machine long after the session ends. Foil puts a boundary around the agent that you can write down, review like code and audit afterwards. No Docker, no root, no VM: one 2 MB binary, Linux and macOS.
foil policy init # writes .foil/policy: hides the .env, keys and credentials it finds
foil agent claude # Claude Code in a strict, copy-on-write branch of this folder
# ...the agent works; when it exits, foil shows what it reached and changed:
# foil: network: 214 requests allowed, 2 blocked:
# pastebin.com:443 (not in the allowlist) x2
# foil: branch claude-20261108-101500 changed 4 paths
# Apply to ~/src/app? [c]ommit / [k]eep for later / [a]bort
foil audit claude-20261108-101500 # the full record, as text or --json
What the agent can't do
Inside `foil agent` (any command with `foil run --strict`), each of these is an automated test in the escape suite ([SECURITY.md](SECURITY.md)):
| The agent can't... | because |
|---|
Related Skills
Foundation Guard
Deterministic guard rails for AI coding agents like Claude Code. Blocks force-pushes, weakened tests and switc
Wardlume
Lock your Mac keyboard & mouse, keep the screen visible — botsit your AI agents (Claude Code, Codex, Cursor) w
Dsh Screensaver
macOS screen saver that keeps AI coding agents (Claude Code, Codex, DeepSeek Harness) running while you step a
Backlight
Scan a document or pasted text for hidden instructions aimed at an AI model, and report the result even if it
Shellbouncer
A firewall for AI coding agents. One policy file blocks rm -rf ~, curl sh and .env leaks in Claude Code, Codex
Agent Leaks
Scan and redact leaked secrets sitting in your AI agent session transcripts. Your agent ran cat .env once, and
Related Agents
Auth Policy Validator
Валидатор ZenStack access control policies. USE PROACTIVELY после изменений @@allow/@@deny для проверки безопа
Permission Analyst
Recommends allow/deny permission rules from denial telemetry and policy via PromptWise. Use to reduce permissi
Policy Engineer
Writes and changes Cedar policies, the built-in Cedar schema, the registry format and their allow and deny fix