Skip to content

Specialized Agents

claude-ops bot edited this page Apr 26, 2026 · 1 revision

Specialized Agents

v2.0 — Pre-installed subagent personas + the auto-suggestion hook that routes general-purpose calls to the right specialist.

Repo deep-dive: docs/agents.md.

What changed in v2

In v1.x, every Agent tool call defaulted to subagent_type: general-purpose. v2 ships four pre-installed specialist agents and a PreToolUse hook on Agent that silently swaps general-purpose → matching specialist via updatedInput. If no match exists, a Haiku drafter proposes a new agent file under ~/.claude/agents/.

Pre-installed specialists

Agent Purpose Used by
general-purpose Local override — restricted to research and read-only investigation. Fallback.
deploy-fixer Single-shot SRE persona — diagnoses one failed deploy, opens one PR. Auto-Fix Subsystem.
build-fixer TypeScript/bundler error fixer for local build failures. Auto-Fix Subsystem.
dependency-auditor Runs npm audit / pip-audit / SCA equivalents. Manual + future scheduled cron.

The full v1 agent roster (scanners, fixers, C-suite analysts, daemon brain) is unchanged — see Agents Reference.

How the auto-suggestion hook works

Claude calls Task with subagent_type=general-purpose
                    │
                    ▼
hooks/hooks.json PreToolUse:Agent
                    │
                    ▼
bin/ops-suggest-specialized-agent
                    │
       ┌────────────┴────────────┐
       ▼                         ▼
  prompt matches              no match
  config/specialist-          ┌────────────────────┐
  keywords.example.json       │ fire Haiku drafter │
       │                      │ → propose new      │
       ▼                      │ agent file under   │
  rewrite updatedInput        │ ~/.claude/agents/  │
  with subagent_type =        └────────────────────┘
  matched specialist

Silent by design. No warning, no UI noise — Claude just transparently uses the better agent.

Keyword map

Default at config/specialist-keywords.example.json:

{
  "deploy-fixer": ["deploy", "deployment", "ECS", "Vercel", "Render", "GitHub Actions", "workflow failed", "rollback"],
  "build-fixer": ["npm run build", "tsc", "TypeScript error", "webpack", "vite", "esbuild", "module not found"],
  "dependency-auditor": ["npm audit", "vulnerable", "CVE", "security advisory", "outdated dependency", "pip-audit"]
}

User-extensible at ~/.claude/config/specialist-keywords.json (overrides plugin default).

Adding your own specialist

  1. Drop a <name>.md file under ~/.claude/agents/ with valid frontmatter (name, description, model, tools).
  2. Add an entry to ~/.claude/config/specialist-keywords.json mapping keywords → agent name.
  3. Done. Next time Claude calls Task with a matching prompt, the hook will route to your specialist.

Configuration

Key Type Default Purpose
suggest_specialized_agents boolean true Master switch.

See also

Clone this wiki locally