Sanitized single-commit public mirror of recipe-maintainer. - Removed test-ssh/.testenv (live creds); added test-ssh/.testenv.example placeholders. - Removed plans/ and planned-updates/ (deployment-planning docs) so no client/ deployment domains appear in the public repo. - All other secret stores were already gitignored. - docs.coopcloud.tech retained as a submodule (public upstream).
3.4 KiB
description, allowed-tools
| description | allowed-tools | |||||
|---|---|---|---|---|---|---|
| Ensure every Claude skill has a corresponding OpenCode skill alias |
|
Sync Claude skills to OpenCode
Ensure that every Claude command has a corresponding OpenCode skill and command that delegates to it.
Steps
-
List all Claude commands — Glob
.claude/commands/*.md(excludingopencode-sync.mditself) and.claude/commands/includes/*.md. -
List existing OpenCode skills — Glob
.opencode/skills/*/SKILL.mdand.opencode/commands/*.md. -
For each Claude command, determine the OpenCode skill name:
- For
.claude/commands/<name>.md→ skill name is<name> - For
.claude/commands/includes/<name>.md→ skill name isrecipe-<name>(following the existing convention, e.g.guidelines→recipe-guidelines)
- For
-
Read each Claude command's YAML frontmatter to extract:
description— reuse as the OpenCode descriptionargument-hint— use to generate the argument context line
-
For each missing OpenCode skill, create
.opencode/skills/<skill-name>/SKILL.md:
---
name: <skill-name>
description: <description from Claude command>
---
Read and follow the full instructions in `.claude/commands/<path-to-claude-command>.md`.
<argument context line, if the Claude command has an argument-hint>
The argument context line should describe what arguments are expected based on the argument-hint:
- If
argument-hintcontainsrecipe-name→The recipe name will be provided by the user or calling agent. - If
argument-hintcontainsb1cc|t1cc→The instance name will be provided by the user or calling agent. - If there is an
argument-hintbut no specific pattern matched →Arguments will be provided by the user or calling agent. - If there is no
argument-hint→ omit the argument context line entirely
- For each missing OpenCode command, create
.opencode/commands/<skill-name>.md:
---
description: <description from Claude command>
---
Load the `<skill-name>` skill and execute it for $ARGUMENTS.
-
Detect orphaned OpenCode skills — For each existing OpenCode skill/command, check whether it references a Claude command (by reading the
SKILL.mdbody for the.claude/commands/...path). If the referenced Claude command no longer exists:- Check if the content/description closely matches a current Claude command that lacks an OpenCode equivalent (i.e., it was likely renamed).
- If a rename is detected: delete the old OpenCode skill directory and command file, then create new ones under the correct name.
- If no rename match is found: delete the orphaned OpenCode skill directory and command file (it references a dead Claude command).
-
Update stale descriptions — For each existing OpenCode skill/command that maps to a valid Claude command, read the Claude command's current
description. If the OpenCode description differs, update it to match. -
Report results — Print a summary of:
- Skills created (new)
- Skills renamed (old name → new name)
- Skills deleted (orphaned, no rename match)
- Skills updated (description changed)
- Skills unchanged (already in sync)
Important
- Every Claude command must have exactly one corresponding OpenCode skill — no exceptions, including this
opencode-synccommand itself. - The includes (
guidelines.md,logging.md) use therecipe-<name>prefix convention for their OpenCode skill names.