xiaohongshu
xiaohongshu
Atlas skill for converting Claude Code slash commands to OpenCode commands format. USE WHEN migrating from Claude Code to OpenCode or when you have existing slash command definitions to port.
Full skill instructions
This skill helps you convert Claude Code slash command definitions (from .claude/commands/ or ~/.claude/commands/) to OpenCode command format (.opencode/command/ or ~/.config/opencode/command/).
Note: When running from a personal config that symlinks to ~/.config/opencode/, the command files will be available globally.
Source formats:
.claude/commands/*.md or ~/.claude/commands/*.mdTarget formats:
.opencode/command/*.md or ~/.config/opencode/command/*.mdopencode.json config fileKey differences:
$ARGUMENTS, $1, $2, etc.)!command``)@filename)subtask, template (in JSON)Find Claude Code slash commands to convert:
# Project-level commands
ls .claude/commands/
# User-level commands
ls ~/.claude/commands/
Read the command definition to understand its configuration:
cat .claude/commands/review.md
Convert each field from Claude Code format to OpenCode format:
Frontmatter mapping:
| Claude Code | OpenCode | Notes |
|---|---|---|
allowed-tools | agent | Convert tool list to agent name |
argument-hint | N/A | Not supported in OpenCode |
description | description | Keep identical |
model | model | Keep identical |
disable-model-invocation | N/A | Not supported in OpenCode |
| N/A | subtask | New: Force subagent invocation |
| N/A | template | New: Only in JSON format |
Tool conversion:
Claude Code uses allowed-tools to restrict which tools the command can use:
allowed-tools: Bash(git add:*), Bash(git status:*), Read
OpenCode uses agent to specify which agent runs the command:
agent: build
Bash commands with allowed-tools:
Claude Code:
---
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
description: Create a git commit
---
OpenCode - Use agent with appropriate permissions:
---
description: Create a git commit
agent: build
---
Note: OpenCode handles tool permissions at the agent level, not command level.
Model invocation control:
Claude Code:
---
disable-model-invocation: true
---
OpenCode doesn't have a direct equivalent. Commands are always user-invoked in OpenCode.
Option A: Markdown format (recommended for easy editing)
Create file at .opencode/command/<command-name>.md:
---
description: Review code for quality and security
agent: build
model: anthropic/claude-sonnet-4-20250514
---
Review this code for:
- Security vulnerabilities
- Performance issues
- Code style violations
Use !`git diff HEAD` to see current changes.
Option B: JSON format (for programmatic access)
Add to opencode.json:
{
"command": {
"review": {
"description": "Review code for quality and security",
"template": "Review this code for:\n- Security vulnerabilities\n- Performance issues\n- Code style violations\n\nUse !`git diff HEAD` to see current changes.",
"agent": "build",
"model": "anthropic/claude-sonnet-4-20250514"
}
}
}
Check the converted command:
Verify file location:
.opencode/command/ directory exists and file is present~/.config/opencode/command/ directory exists and file is presentVerify frontmatter:
Verify command content:
$ARGUMENTS, $1, etc.) are preserved!command``) are preserved@filename) are preservedTest the command:
/command-name to invoke the commandFor detailed step-by-step examples with before/after comparisons, see:
cat EXAMPLES.md
The EXAMPLES.md file includes:
Quick example snippet:
Claude Code format:
---
description: Review code for quality and security
allowed-tools: Read, Grep, Glob
model: claude-3-5-sonnet-20241022
---
Review this code focusing on security and performance.
OpenCode format:
---
description: Review code for quality and security
agent: plan
model: anthropic/claude-3-5-sonnet-20241022
---
Review this code focusing on security and performance.
Claude Code:
---
description: Review this code
allowed-tools: Read, Grep
---
Review this code for bugs and improvements.
OpenCode:
---
description: Review this code
agent: plan
---
Review this code for bugs and improvements.
Claude Code:
---
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)
description: Create a git commit
---
Current status: !`git status`
Current diff: !`git diff HEAD`
Create a commit based on these changes.
OpenCode:
---
description: Create a git commit
agent: build
---
Current status: !`git status`
Current diff: !`git diff HEAD`
Create a commit based on these changes.
Claude Code:
---
argument-hint: [pr-number] [priority]
description: Review pull request
---
Review PR #$1 with priority $2.
OpenCode:
---
description: Review pull request
---
Review PR #$1 with priority $2.
Note: argument-hint is not supported in OpenCode, but the argument placeholders work the same.
Claude Code: No direct equivalent - commands run in main conversation.
OpenCode:
---
description: Analyze performance
agent: plan
subtask: true
---
Analyze performance issues in this codebase.
The subtask: true forces this to run as a subagent invocation.
Claude Code supports argument-hint to show expected arguments:
argument-hint: [message]
OpenCode doesn't have this field. Document expected arguments in the command description instead:
description: Create git commit [message]
Claude Code controls tools at the command level with allowed-tools.
OpenCode controls tools at the agent level. Choose the appropriate agent for your command:
build - Full access to all toolsplan - Restricted tools for analysisBoth systems use similar model strings, but ensure you use the correct provider prefix:
Claude Code:
model: claude-3-5-sonnet-20241022
OpenCode:
model: anthropic/claude-3-5-sonnet-20241022
Both systems support organizing commands in subdirectories:
Claude Code:
.claude/commands/frontend/component.md → /component with description showing "(project:frontend)"
OpenCode:
.opencode/command/frontend/component.md → /frontend/component
Note: OpenCode includes the subdirectory in the command name, while Claude Code shows it in the description only.
Both systems use the same @ syntax for file references:
Review the component in @src/components/Button.tsx
This works identically in both systems.
Both systems use the same !`command` syntax:
Current git status: !`git status`
This works identically in both systems.
Claude Code supports extended thinking via keywords in command content.
OpenCode doesn't have a specific thinking mode configuration for commands. Extended thinking is model-dependent.
After conversion, verify:
.opencode/command/ or ~/.config/opencode/command/)description (optional but recommended)$ARGUMENTS, $1, etc.) are preserved!`command`) are preserved@filename) are preserved/command-nameIssue: Command not appearing in OpenCode
.opencode/command/ or ~/.config/opencode/command/)Issue: Arguments not working
$ARGUMENTS, $1, $2, etc. (not {arg1} or other syntax)Issue: Shell commands not executing
!`command` (backticks inside the ! markers)Issue: File references not working
@path/to/file.extIssue: Model errors
provider/model-namemodel: inherit or omit the fieldIssue: Command runs in wrong context
subtask: true to force subagent invocationagent for the commandplan for analysis, build for modificationsargument-hint isn't supported, document in description.opencode/command/ for team sharing.opencode/command/ or ~/.config/opencode/command//command-name in OpenCode TUI/help, /init, /undo, /redo, /sharexiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience