Profiles
Table of contents
- What is a profile?
- Profile structure
- 3-layer merge
- Listing profiles
- Switching profiles
- Querying the active profile
- Launching Claude with profile flags
- Creating a custom profile
What is a profile?
A profile is a named configuration bundle that controls:
- Which agent system prompt (
CLAUDE.md) Claude Code loads - Which settings overrides are applied (permissions, env vars)
- Which MCP tool categories are enabled (via
MCP_CATEGORIES) - Which skills, agents, commands, and rules are symlinked
- Model selection, turn limits, permission mode, and timeout settings (via
agentihooks claude)
Profiles are stored under profiles/<name>/ in the repository or in a linked bundle.
Profile structure
profiles/
├── _base/
│ └── settings.base.json # Canonical settings (hooks, permissions, MCP servers)
├── default/
│ ├── CLAUDE.md # Agent system prompt (at profile ROOT)
│ ├── profile.yml # agentihooks metadata + claude launch config
│ └── .claude/
│ ├── settings.overrides.json # Per-profile settings overrides
│ ├── .mcp.json # Profile MCP servers
│ ├── skills/ # Profile-specific skills
│ ├── agents/ # Profile-specific agents
│ ├── commands/ # Profile-specific commands
│ └── rules/ # Profile-specific rules
└── coding/
└── ... # Same structure
_base/settings.base.json
This is the single source of truth for all settings. It contains:
- Hook event wiring (
hooks-> shell commands) - Tool permission allowances
- MCP server definitions
All paths use /app as a placeholder. The install script substitutes /app with the real repo path at render time.
CLAUDE.md (at profile root)
The agent’s system prompt. This file lives at the profile root (not inside .claude/). The install script symlinks ~/.claude/CLAUDE.md to the chosen profile’s CLAUDE.md.
.claude/settings.overrides.json
Per-profile settings overrides that are merged on top of _base/settings.base.json during install. Lives inside the .claude/ subdirectory.
profile.yml
Contains fields for both agentihooks and the agentihooks claude launcher:
agentihooks fields (read by install.py):
name– profile identifierdescription– shown by--list-profilesmcp_categories– comma-separated tool categories to enable (default:all)
claude launch fields (read by agentihooks claude):
claude.model,claude.max_turns,claude.timeout– passed as Claude Code CLI argsclaude.permission_mode– e.g.bypassPermissionsmaps to--dangerously-skip-permissions
# agentihooks fields
name: coding
description: "Autonomous coding agent"
mcp_categories: aws,utilities,observability
# claude launch config
claude:
model: sonnet
max_turns: 80
permission_mode: bypassPermissions
3-layer merge
When agentihooks init runs, skills, agents, commands, rules, and MCP servers are merged from three layers:
- agentihooks built-in –
.claude/in the agentihooks repo - Bundle global –
.claude/in the linked bundle root - Profile-specific –
profiles/<name>/.claude/
Later layers override earlier ones. This lets you start with a shared base, add team customizations via the bundle, and fine-tune per profile.
Listing profiles
agentihooks --list-profiles
Example output:
Available profiles:
default
coding
admin
Profiles from both the agentihooks repo and linked bundle are listed.
Switching profiles
Re-run init with --profile:
agentihooks init --profile coding
Or set the AGENTIHOOKS_PROFILE environment variable so you don’t have to pass --profile every time:
export AGENTIHOOKS_PROFILE=coding
agentihooks init
This is especially useful in CI/Docker automation where the profile is set once in the container environment.
Either way, the command atomically:
- Replaces the
~/.claude/CLAUDE.mdsymlink - Updates
MCP_CATEGORIESin the hook environment - Re-merges settings overrides
- Re-symlinks skills, agents, commands, and rules (3-layer merge)
- Re-merges MCP servers
The switch takes effect on the next Claude Code session.
Querying the active profile
agentihooks --query
Launching Claude with profile flags
The agentihooks claude command (alias: agenti) reads the claude: section from the active profile’s profile.yml and maps it to Claude Code CLI flags:
agentihooks claude # launch with profile settings
agenti # same thing (alias installed by init)
For example, permission_mode: bypassPermissions in profile.yml translates to --dangerously-skip-permissions.
Creating a custom profile
- Copy an existing profile:
cp -r profiles/default profiles/myprofile -
Edit
profiles/myprofile/profile.ymlto set model, turns, and categories. -
Edit
profiles/myprofile/CLAUDE.mdwith your custom system prompt. -
Optionally add profile-specific assets in
profiles/myprofile/.claude/(skills, agents, commands, rules,.mcp.json,settings.overrides.json). - Install the new profile:
agentihooks init --profile myprofile
Profiles affect the agent’s persona, tool access, and asset selection but not the underlying hook behavior. Hooks are always wired from _base/settings.base.json regardless of profile.