converting-slash-commands

Convert Claude Code slash commands to OpenCode command files.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/scottwater/config --skill converting-slash-commands
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: converting-slash-commands
Source: https://github.com/scottwater/config/tree/main/skills/converting-slash-commands
Command: npx skills add https://github.com/scottwater/config --skill converting-slash-commands

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill streamlines migrating Claude Code slash commands to OpenCode command definitions, preserving arguments, shell commands, and file references while updating frontmatter to OpenCode conventions.

Core Features & Use Cases

  • Translates Claude Code frontmatter to OpenCode equivalents (description, agent, model)
  • Converts allowed-tools to agent selection and applies permissions as needed
  • Preserves command content, placeholders ($ARGUMENTS, $1, $2) and syntax for shell commands
  • Supports batch conversion across a project

Quick Start

Copy a Claude Code command into the target OpenCode directory (e.g., .opencode/command/). Run the convert_command.sh script to generate an OpenCode command, then review and test by invoking the command.

Frequently Asked Questions about converting-slash-commands

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Claude Code slash commands to OpenCode format?

Converting Claude Code slash commands to OpenCode format involves running the convert_command.sh script on your command files. The script translates Claude Code frontmatter (description, agent, model) to OpenCode equivalents, converts allowed-tools to agent selection, and preserves command content, placeholders, and shell syntax while outputting OpenCode command files to .opencode/command or ~/.config/opencode/command directories.

What happens to my command arguments and shell commands during migration?

Command arguments and shell commands are fully preserved during migration. Placeholders like $ARGUMENTS, $1, and $2 remain intact, and shell command syntax is maintained. The conversion focuses on updating the frontmatter structure and field mappings while keeping your command logic unchanged.

Can I migrate both project-level and user-level commands at once?

Yes, the conversion script supports batch migration across both project-level commands in .claude/commands and user-level commands in ~/.claude/commands. Both are converted to their respective OpenCode locations (.opencode/command and ~/.config/opencode/command) in a single operation.

Which Claude Code fields are removed during conversion to OpenCode?

Fields unsupported by OpenCode are removed during conversion. The script maps supported fields like description, agent, and model to OpenCode conventions, integrates argument hints into descriptions, and handles allowed-tools by applying them as agent selection and permissions rather than transferring them directly.

Do I need to manually review and test commands after conversion?

Yes, after running the convert_command.sh script, review the generated OpenCode command files and test them by invoking the commands. This ensures the frontmatter mapping, field conversions, and argument handling translated correctly for your OpenCode environment.

What is the difference between Claude Code and OpenCode command formats?

Claude Code and OpenCode use different frontmatter structures and field naming conventions. This migration Skill translates Claude Code's command definition format to OpenCode's requirements, including how tools and permissions are specified, model selection is declared, and agents are configured.