Skip to Content
DocsCustom Commands

Custom Commands – Prompt Templates

Custom commands are Markdown files where you define reusable prompt shortcuts for your project. Type /name in the chat to invoke a command, where name is the filename without .md. Each command expands into a full prompt, saving you from repeating common instructions.

Where Ziva looks

Ziva reads custom commands from the following locations. All files that exist are loaded; project files take priority over home-directory files.

LocationScope
<project>/.ziva/commands/This project (highest priority)
<project>/.agents/commands/This project, alternative location
~/.ziva/commands/All projects on this machine
~/.agents/commands/All projects on this machine, alternative location

<project> is the root folder of your project.

What to write

Good candidates for custom commands:

  • Code review workflows/review for a standard code review checklist
  • Project-specific tasks/gdscript-check for GDScript-specific linting
  • Multi-step procedures/setup-player for initializing player nodes with standard properties
  • Multi-step procedures/setup-gut-test to setup a basic GUT test

Each command can accept arguments to customize the prompt at runtime.

Format

--- description: Review the current diff for bugs and security issues --- Review the staged changes with focus on: - Logic errors and off-by-one bugs - Security vulnerabilities - Missing error handling
  • The filename becomes the command name. review.md becomes /review.
  • description is optional. If missing, the first non-empty line is used.
  • Argument hints are not yet supported in Ziva but may be added in the future.

Example

--- description: Set up a new player character with standard properties --- Create a Player scene with: - CharacterBody2D as root node - AnimatedSprite2D for animations - CollisionShape2D with CapsuleShape2D - \_ready() that initializes movement speed and direction

To use it: type /setup-player in the chat.

Arguments

Custom commands can accept positional arguments to make them more flexible:

  • $1, $2, … are replaced with arguments 1, 2, etc.
  • $@ or $ARGUMENTS expands to all arguments joined together
  • ${1:-default} uses argument 1 if present, otherwise default

Example command (setup-ui.md):

--- description: Create a new UI scene with a Control node argument-hint: <name> <type> --- Create a new scene with a Control node named $1 of type $2. Set up basic properties and add it to the project.

Usage: /setup-ui "MainMenu" "PanelContainer"

See also

  • AGENTS.md — Define project-wide coding conventions and rules
  • Skills — Reusable capability packs the agent loads automatically
  • Slash Commands — On-demand prompt shortcuts
Last updated on