Skip to content

Custom Agents

Custom agents let you capture the way your team works. You can override a built-in, create a brand-new specialist, or fork an existing agent and tune its prompt for a specific project.

Custom agent editor

Every custom agent is a Markdown file in:

<workspace-root>/.claude/agents/

Workspace agents take precedence over bundled built-ins with the same name. Commit this folder to source control so your whole team inherits the same roster.

---
name: api-contract-reviewer
description: Reviews OpenAPI specs for consistency, versioning, and breaking changes.
tools: [read, write, ptah_search_files]
model: claude-opus-4-7
---
# API Contract Reviewer
You are a senior API designer. Your job is to audit OpenAPI / JSON Schema files
for backwards compatibility, naming consistency, and pagination patterns.
## Rules
- Flag any removed fields or enum values as BREAKING.
- Require `x-ptah-owner` on every path.
- Suggest cursor pagination for collections > 100.
## Output format
Always return a markdown table with: path, issue, severity, suggested fix.
FieldRequiredDescription
nameYesUnique ID within the workspace. Used in @mentions and the picker.
descriptionYesOne-line summary shown in the picker tooltip.
toolsNoAllowed tool names. Omit to inherit the default tool set.
modelNoOverride the model for this agent (e.g., claude-opus-4-7).
colorNoHex accent color for the picker badge.
  1. Open the Agents panel from the sidebar.
  2. Click New agent.
  3. Fill in name, description, and prompt. A live preview shows how it will appear in the picker.
  4. Save. The file is written to .claude/agents/<name>.md and the registry reloads immediately.

Create the Markdown file directly with any editor. Ptah watches .claude/agents/ and hot-reloads on save.

Create a file with the same name as the built-in (e.g., backend-developer.md). Your workspace version wins. To revert, delete the file — the bundled default is automatically restored.

Agents inherit a safe default tool set. To grant or restrict tools, list them explicitly in tools:

tools:
- read
- write
- bash
- ptah_search_files
- ptah_git_worktree_add
  • Per-project — commit .claude/agents/ to the repo.
  • Per-user — copy files into your personal templates folder (see Templates).
  • Per-team — publish an internal plugin pack (see Plugins) that installs agents on install.

After editing a prompt, start a fresh chat with that agent and ask a representative question. Look for:

  • The agent stays in role (doesn’t drift into general chat)
  • Tool usage matches expectations
  • Output format matches your instructions

If drift happens, tighten the system prompt with explicit “Always” / “Never” rules and a worked example in the prompt body.