By Patrick McCurley

Subagents

By Patrick McCurley · Created Mar 21, 2026 public

Custom agents that run automatically in response to events. These are configured in .claude/agents/ and triggered by the AI when conditions match.

test-runner

Trigger: After code changes are written by the AI

Runs the project's test suite and reports results. Knows which tests are relevant based on the files changed.

✓ 14 tests passed
✗ 1 test failed: src/checkout/__tests__/inventory.test.ts
  Expected: 200, Received: 422 — stock check now validates quantity > 0

deploy-checker

Trigger: After a deploy to staging

Hits the staging health endpoint, verifies key pages render, checks for console errors. Reports back with a pass/fail summary.

✓ Health endpoint: 200 OK (43ms)
✓ Homepage renders: no console errors
✓ Checkout flow: 3/3 steps pass
✗ API docs: 404 on /docs/webhooks (missing route?)

docs-updater

Trigger: When API endpoint files are modified

Detects changes to route handlers and automatically updates the corresponding API documentation. Publishes the updated docs to the team's Emberflow space.

Updated 2 endpoint docs:
  POST /api/orders — added qty validation param
  GET /api/orders/:id — added include_items query param
Published to: emberflow.ai/s/team/api-docs

security-scanner

Trigger: On PR creation

Runs OWASP dependency check and static analysis on the diff. Flags vulnerabilities, hardcoded secrets, and SQL injection risks.

✓ No hardcoded secrets detected
✓ No SQL injection patterns
⚠ Dependency: lodash@4.17.20 has known prototype pollution (CVE-2021-23337)
  Recommendation: upgrade to lodash@4.17.21

Adding a new agent: Create a markdown file in .claude/agents/ describing the agent's purpose, trigger conditions, and behavior. See the Claude Code docs for the full spec.