Skip to main content

Claude Code

Sane defaults for Claude Code itself: allows the built-in tools so routine work doesn't prompt, and redirects /tmp paths to a per-session sandbox (/tmp/claude) so scratch files stay isolated.

.claude/fencepost.yaml
import:
- claude

Full preset​

presets/claude.yaml
# Fencepost preset: claude

# Rewrite /tmp -> /tmp/claude in tool inputs (Bash commands and file paths).
redirect:
tmp: true
tmpTarget: /tmp/claude

tools:
# A few built-in tools are intentionally NOT allow-listed, so they fall
# through to your `default` decision:
# - `Bash` and `PowerShell` run arbitrary shell commands; fencepost
# always routes Bash through the bash command pipeline (and PowerShell
# deserves the same caution), so listing them here would have no effect
# or would skip that scrutiny.
# - `WebFetch` and `WebSearch` reach external services (see the
# claude-web preset).
# - `Artifact`, `RemoteTrigger`, `SendUserFile`, `PushNotification`, and
# `ShareOnboardingGuide` publish, upload, or deliver content to
# claude.ai or a connected device.
# - `EnterWorktree` and `Workflow` are heavier operations (moving the
# session's working directory, fanning out many subagents) worth a
# prompt.
# - `EndConversation` can't be blocked by permission rules at all, so
# listing it here would have no effect.
allow:
- Read
- Glob
- Grep
- LSP
- ListMcpResourcesTool
- ReadMcpResourceTool
- Edit
- Write
- NotebookEdit
- TodoWrite
- TaskCreate
- TaskGet
- TaskList
- TaskUpdate
- TaskOutput
- TaskStop
- CronCreate
- CronList
- CronDelete
- ScheduleWakeup
- WaitForMcpServers
- EnterPlanMode
- ExitPlanMode
- ExitWorktree
- Monitor
- Skill
- ToolSearch
- Agent
- SendMessage
- ReportFindings
- AskUserQuestion

bash:
# Structured rules (feature 20) over the parsed command.
arguments:
# Allow scratch file ops when EVERY path argument is inside the sandbox.
# This is multi-target safe: "rm -rf /tmp/claude/x /etc" is NOT allowed,
# because /etc is outside the sandbox.
- command: "rm|rmdir|mkdir|touch|cp|mv|cat|ls|head|tail|stat|wc|file"
allArgsInside: ["/tmp/claude"]
decision: allow

redirects:
# Block writing/appending to an absolute path outside the sandbox or the
# project. (With redirect.tmp on, /tmp writes are already steered inward.)
- mode: write
outside: ["/tmp/claude", "."]
decision: deny
description: "Redirecting output outside the sandbox can clobber files."
alternative: "Write under /tmp/claude/ or a path inside the project."

allowChecks:
# Read-only subcommands of fencepost's own CLI (audit/verify/evaluate):
# no new trust, the same binary already runs unprompted on every tool call.
- '^node\s+"?[^"]*\.claude/plugins/cache/fencepost/fencepost/[^/"]+"?/dist/index\.js"?\s+(audit(\s+--global)?|verify|evaluate)\b'