Skip to content

Commands

Commands are reusable prompts that map to slash commands in tools that support them (Claude Code, Cursor, Copilot, Gemini CLI). For tools without native command support (Codex CLI, Windsurf, Continue, Junie), they are projected as invokable skills with embedded metadata for lossless round-trip.

File format

Commands live in .agentsmesh/commands/ as Markdown files with YAML frontmatter.

---
description: Create a conventional commit from current changes
allowed-tools:
- Read
- Bash(git status)
- Bash(git diff)
- Bash(git add)
- Bash(git commit)
---
Review the current git changes. Analyze what was modified and why.
Draft a conventional commit message (feat/fix/refactor/test/docs/chore scope).
Stage the relevant files and commit.

The filename (without .md) becomes the slash command name. The above file at commands/commit.md becomes /commit in Claude Code, /commit in Cursor, etc.

Frontmatter reference

FieldTypeDescription
descriptionstringShort description shown in command menus.
allowed-toolsstring[]Tools the command is allowed to use when invoked. Uses the same tool name format as permissions.

Tool-specific behavior

ToolSupportFormat
Claude CodeNative.claude/commands/*.md
CursorNative.cursor/commands/*.md
CopilotNative.github/copilot-instructions.md (embedded)
Gemini CLINative.gemini/commands/*.md
ClineNative.cline/commands/*.md
Codex CLIEmbeddedProjected as a skill in AGENTS.md with round-trip metadata
WindsurfNative.windsurf/commands/*.md
ContinueEmbeddedProjected as a skill with metadata
JunieEmbeddedProjected as a skill with metadata

Example commands

Code review

---
description: Review the current diff for code quality, security, and correctness
allowed-tools:
- Read
- Grep
- Glob
- Bash(git diff)
- Bash(git log)
---
Review the current git diff. Check for:
1. Logic errors and edge cases
2. Security vulnerabilities (injection, XSS, auth bypasses)
3. Missing tests
4. Naming and readability issues
5. Performance concerns
Provide a structured review with severity levels: Critical, Major, Minor.

Documentation update

---
description: Update README and inline docs to reflect recent changes
allowed-tools:
- Read
- Edit
- Bash(git diff HEAD~1)
---
Review the recent changes in git. Identify what new features, config options,
or CLI flags were added. Update README.md and any affected inline documentation
to reflect these changes. Keep language concise and developer-focused.

Disabling projection for a target

To prevent commands from being projected as skills on a specific target, use the conversions section in agentsmesh.yaml:

conversions:
commands_to_skills:
codex-cli: false # skip codex-cli instead of embedding