Skip to content

Subagents

Subagents are specialized AI agents that can be invoked for focused tasks. Define them in subagents/<name>/SUBAGENT.md.

my-capability/
├── capability.toml
└── subagents/
└── code-reviewer/
└── SUBAGENT.md
---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep, Bash
model: inherit
permissionMode: default
---
You are a senior code reviewer ensuring high standards.
FieldRequiredDescription
nameYesUnique identifier (lowercase, hyphenated)
descriptionYesWhen to invoke this subagent
toolsNoAllowlist of tools
disallowedToolsNoTools to remove from allowlist
modelNosonnet, opus, haiku, or inherit
permissionModeNodefault, acceptEdits, dontAsk, bypassPermissions, plan
skillsNoSkills to preload for this agent
hooksNoLifecycle hooks scoped to this subagent
import type { CapabilityExport, SubagentExport } from "@omnidev-ai/core";
const reviewer: SubagentExport = {
subagentMd: `---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep
model: sonnet
---
You are a specialized reviewer...`
};
export default {
subagents: [reviewer]
} satisfies CapabilityExport;