Setup — Agent Foundry Permission Configuration
Configures Claude Code permissions for autonomous agentic sessions. The repo ships with conservative per-command allow rules. This skill upgrades to full autonomous mode.
When to Use
- First time running Claude Code in the agent-foundry repo
- After cloning and copying skills to
~/.claude/skills/ - When you want to switch between conservative and autonomous modes
Checklist
- Detect current state — check what permissions are already configured
- Present options — show the user what each level does
- Apply chosen config — write settings to the appropriate location
- Verify — confirm the config is valid and will take effect
Step 1: Detect Current State
Read the following files and report what exists:
# Project-level (applies when running claude inside this repo)
.claude/settings.json # shared baseline (committed)
.claude/settings.local.json # power-user override (gitignored)
# User-level (applies to all projects)
~/.claude/settings.json # global settings
Check each for:
permissions.defaultModevalue- Whether
Bash(*)is in the allow list (blanket vs granular) - Whether
Bash(git push*)is in the ask list - Any MCP tool allow rules
Report the current state concisely:
"Current: [conservative/autonomous/custom] at [project/global] level. [Details]."
Step 2: Present Options
Present exactly these three options:
Permission levels:
1. Conservative (current default)
acceptEditsmode + granular bash rules. Each command type explicitly allowed. Git push, reset --hard, rm -rf prompt. Safe for exploring.2. Full autonomous
acceptEditsmode +Bash(*)blanket. Everything auto-approved exceptgit push(still prompts). Best for productive agentic sessions.3. Full autonomous + MCP Same as (2) plus auto-approve all MCP tools (Gemini, pa-server, chrome). Best for multi-model workflows with forge/bob/alf.
Scope:
- Project — writes
.claude/settings.local.json(gitignored). Only applies in this repo.- Global — writes
~/.claude/settings.json. Applies to all projects.Which level? (1/2/3) And scope? (project/global)
Wait for the user's response.
Step 3: Apply Config
Level 2 — Full Autonomous
{
"permissions": {
"defaultMode": "acceptEdits",
"ask": [
"Bash(git push*)"
],
"allow": [
"Bash(*)",
"Read",
"Edit",
"Write",
"Glob",
"Grep",
"Skill",
"Agent",
"WebFetch",
"WebSearch",
"NotebookEdit"
]
}
}
Level 3 — Full Autonomous + MCP
{
"permissions": {
"defaultMode": "acceptEdits",
"ask": [
"Bash(git push*)"
],
"allow": [
"Bash(*)",
"Read",
"Edit",
"Write",
"Glob",
"Grep",
"Skill",
"Agent",
"WebFetch",
"WebSearch",
"NotebookEdit",
"mcp__pa-server__*",
"mcp__claude-in-chrome__*"
]
}
}
Scope: Project
Write to .claude/settings.local.json in the repo root. This file is gitignored and overrides the shared .claude/settings.json at precedence level 3 (above shared project settings at level 4).
Scope: Global
Write to ~/.claude/settings.json. Important: this file may already contain other settings (hooks, plugins, etc.). Read the existing file first and MERGE the permissions block — do not overwrite other keys.
Step 4: Verify
After writing:
- Validate JSON syntax:
python3 -c "import json; json.load(open('<path>'))" - Report what was written and where
- Tell the user: "Restart
claude(or start a new session) to pick up the new permissions. The status bar should showaccept edits on."
Reverting
To revert to conservative mode:
- Project scope: delete
.claude/settings.local.json - Global scope: remove the
permissionsblock from~/.claude/settings.json