Skip to content

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.

my-capability/
├── capability.toml
└── commands/
└── review-pr/
└── COMMAND.md
---
name: review-pr
description: Review a pull request
allowed-tools: Bash(git diff:*), Bash(git status:*)
---
Review PR #$1 with priority $2.
FieldRequiredDescription
nameYesCommand name (used as /command-name)
descriptionYesBrief description
allowed-tools / allowedToolsNoTool allowlist (Bash tool rules)
  • $ARGUMENTS for all arguments
  • $1, $2, … for positional arguments

Use ! to run commands before the prompt:

- Current status: !`git status`

Reference files with @:

Review @src/index.ts for correctness.

For dynamic commands, export them from index.ts:

import type { CapabilityExport, CommandExport } from "@omnidev-ai/core";
const optimizeCommand: CommandExport = {
commandMd: `---
name: optimize
description: Analyze code for performance issues
allowed-tools: Bash(node --prof:*), Bash(python -m cProfile:*)
---
Analyze $ARGUMENTS and suggest optimizations.
`
};
export default {
commands: [optimizeCommand]
} satisfies CapabilityExport;