Commands
Slash commands are markdown files an agent can invoke mid-session — /commit, /review, /deploy. They package a repeatable workflow without modifying the agent CLI itself: perfect for team patterns, project conventions, or personal shortcuts.
Write a command
A command is a markdown file in ~/.agents/commands/. The body is the instruction the agent runs when you type its slash name.
# ~/.agents/commands/commit.md
---
description: Split changes into small logical commits and push
---
Review the working tree, group the changes into the smallest
sensible commits, write a clear message for each, and push.Now /commit is available in every synced agent's session.
Target specific agents
Frontmatter narrows which agents (and versions) a command syncs to — useful when a command depends on a capability only some agents have.
---
description: Run the browser smoke test
agents: [claude, codex]
---Manage commands
agents commands list # installed commands + sync status
agents commands add gh:you/commands --agents claude,codex
agents commands view commit # read a command's markdown
agents commands remove commitRelated
- Rules — always-on instructions vs. a command you invoke on demand.
- Skills — larger knowledge packs that can bundle their own rules.
- Config layers — where commands live and how they merge.