Skip to main content

Custom Slash Commands

Trellis ships a deliberately small set of slash commands. On agent-capable platforms (Claude Code, OpenCode, Cursor, Codex, Pi Agent, etc.), only finish-work and continue are installed. start is usually not user-facing because startup context is loaded through a SessionStart hook, extension, AGENTS.md, or prompt-hook bootstrap at the top of the session. Agent-less platforms (Kilo, Antigravity, Devin) have no hook, so start is shipped there as a slash command. Everything else that used to be a command has moved to auto-trigger skills (see Custom Skills). Add your own slash command when you have a specific entry point you want the user to invoke on demand.

Command File Format and Location

Trellis groups the 14 configured platforms into three delivery models: Explicit slash commands — the user types /trellis:<name>; the platform injects the command file’s content as a prompt. Command files are Markdown; Gemini uses TOML (with a prompt = """...""" field). Workflow files — platforms without a dedicated slash-command primitive; the user runs a “workflow” by name. Skill-only — platforms that do not expose a slash-command primitive at all; start / finish-work / continue are shipped as auto-trigger skills.

When to use a command vs. a skill

If the answer is “both”, ship a skill and expose a command that manually triggers the skill.

Writing a command

A good command file:
  1. Starts with a one-line description of what will happen.
  2. Lists the steps the AI should take, in order.
  3. Specifies files the AI should read before acting.
  4. Defines the expected output format (report, checklist, diff, etc.).
Template:

Example: a /trellis:deploy-check command

.claude/commands/trellis/deploy-check.md:
To ship the same command on other platforms, create parallel files in the platform-specific locations from the table above. If you want Trellis to distribute the command as part of its update flow, place a canonical copy under packages/cli/src/templates/common/commands/ and add platform adapters in packages/cli/src/configurators/.