Commands (Prompt Commands)
Commands are reusable prompts defined in commands/<name>/COMMAND.md. They are distinct from CLI routes; commands are run inside supported AI tools.
Structure
Section titled “Structure”my-capability/├── capability.toml└── commands/ └── review-pr/ └── COMMAND.mdCOMMAND.md format
Section titled “COMMAND.md format”---name: review-prdescription: Review a pull requestallowed-tools: Bash(git diff:*), Bash(git status:*)---
Review PR #$1 with priority $2.Frontmatter fields
Section titled “Frontmatter fields”| Field | Required | Description |
|---|---|---|
name | Yes | Command name (used as /command-name) |
description | Yes | Brief description |
allowed-tools / allowedTools | No | Tool allowlist (Bash tool rules) |
Placeholders
Section titled “Placeholders”$ARGUMENTSfor all arguments$1,$2, … for positional arguments
Bash execution
Section titled “Bash execution”Use ! to run commands before the prompt:
- Current status: !`git status`File references
Section titled “File references”Reference files with @:
Review @src/index.ts for correctness.Programmatic commands
Section titled “Programmatic commands”For dynamic commands, export them from index.ts:
import type { CapabilityExport, CommandExport } from "@omnidev-ai/core";
const optimizeCommand: CommandExport = { commandMd: `---name: optimizedescription: Analyze code for performance issuesallowed-tools: Bash(node --prof:*), Bash(python -m cProfile:*)---
Analyze $ARGUMENTS and suggest optimizations.`};
export default { commands: [optimizeCommand]} satisfies CapabilityExport;