opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: add .claude/commands/ compatibility for command discovery

Open SeanZoR opened this issue 1 week ago • 4 comments

Summary

Adds support for Claude Code compatible command paths, enabling seamless migration for users coming from Claude Code.

  • .claude/commands/ (project-level)
  • ~/.claude/commands/ (global)

OpenCode native paths take precedence over Claude-compatible paths.

Fixes #6985

Changes

  • config.ts: Added getClaudeDirectories() helper and integrated Claude command loading before OpenCode directories
  • config.test.ts: Added 3 tests for Claude command discovery, precedence, and nested paths
  • commands.mdx: Updated docs to list Claude-compatible paths with precedence note

SeanZoR avatar Jan 05 '26 20:01 SeanZoR