Create and manage OpenCode slash commands. Use for defining /command shortcuts, template syntax, argument interpolation, and workflow composition. Use proactively when user says "create a command", "slash command", "/command", "shortcut for", or asks about command frontmatter options. Examples: - user: "Create a /review command" → design command with description, optional agent routing - user: "How do I pass arguments to commands?" → explain $ARGUMENTS, $1, $2, `!shell`, @file - user: "Make a command that runs tests" → create command with shell interpolation
Create user-accessible slash commands that streamline workflows.
</overview> <rules>| Scope | Path |
|-------|------|
| Project | .opencode/command/<name>.md |
| Global | ~/.config/opencode/command/<name>.md |
Commands MAY also be defined inline in opencode.json:
{
"command": {
"my-command": {
"template": "Do the thing with $ARGUMENTS",
"description": "One-line description"
}
}
}
| Field | Type | Description |
|-------|------|-------------|
| description | string | REQUIRED. Brief description shown in command list |
| agent | string | Route to specific agent (e.g., plan for read-only research) |
| model | string | Override model for this command |
| subtask | boolean | If true, runs as background task via task tool |
| Placeholder | Expansion |
|-------------|-----------|
| $ARGUMENTS | All arguments after the command |
| $1, $2... | Positional arguments (space-separated) |
| `!cmd` | Output of shell command (e.g., `!git status`) |
| @filename | Contents of file (e.g., @src/main.ts) |
---
description: Run all tests with coverage
---
Run tests with coverage reporting:
\`!npm run test:coverage\`
---
description: Research a topic without modifying files
agent: explore
---
Research the following topic thoroughly, gathering context from the codebase and web:
$ARGUMENTS
---
description: Create a new component with tests
---
Create a new React component named "$1" in the $2 directory.
Requirements:
1. Component file with TypeScript
2. Test file with basic render test
3. Index export
Use the existing patterns from @src/components/Button/index.tsx
---
description: Deep research task (runs in background)
subtask: true
agent: explore
---
Perform comprehensive research on: $ARGUMENTS
Return findings in a structured report.
</examples>
<constraints>
agent: explore or agent: plan for read-only operationssubtask: true for long-running operations@file to inject context from existing codeopencode run "test" after changesCommands are USER shortcuts. Use them when:
For one-off tasks, just ask Claude directly.
</guidelines> <examples>After creating a command:
opencode run "test"
Then test with:
/your-command test arguments
</examples>npx skills add justinlevinedotme/opencode-commands下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer