feat: add `--skills` support to `opencode` integration
Description
Adds opt-in --skills support to OpencodeIntegration, mirroring the pattern used by ClaudeIntegration. When the flag
is passed, commands are scaffolded as speckit-<name>/SKILL.md files under .opencode/skills/ instead of flat .md
files under .opencode/command/.
Opencode natively supports the agentskills.io SKILL.md format at .opencode/skills/<name>/SKILL.md (see
https://opencode.ai/docs/skills/), with the same frontmatter (name, description, compatibility, metadata) that
CommandRegistrar.build_skill_frontmatter() already produces — so no custom post-processing was needed.
Activate via:
specify init --integration opencode --integration-options="--skills"
Testing
- [x] Tested locally with
uv run specify --help - [x] Ran existing tests with
uv sync --extra test && uv run pytest - [x] Tested with a sample project (if applicable)
All 28 opencode integration tests pass, including 5 new tests in TestOpencodeSkillsMode covering:
--skillsoption declaration (is_flag=True,default=False)- SKILL.md file creation under
.opencode/skills/ - No
.mdcommand files created in skills mode - Correct SKILL.md frontmatter (
name,description,compatibility,metadata.author) - Regression guard confirming default markdown mode is unchanged
Agent config consistency check (tests/test_agent_config_consistency.py) also passes (26/26).
Manual smoke test:
specify init /tmp/speckit-test --integration opencode --integration-options="--skills"
# ✅ .opencode/skills/speckit-specify/SKILL.md created
specify init /tmp/speckit-test2 --integration opencode
# ✅ .opencode/command/speckit.specify.md created (default mode unchanged)
AI Disclosure
- [x] I did use AI assistance (describe below)
This PR was written with Claude Code (claude-sonnet-4-6). The implementation approach, code, and tests were generated
with AI assistance and reviewed and validated by the author.
Please address Copilot feedback
Please address Copilot feedback. If not applicable, please explain why
I adressed the changes and aligned the skill integration with how it was done for Copilot
Please address Copilot feedback. Note if opencode is only a skills based integration you do not have to make it accept --integration-options="--skills". Some of the other coding agents initially had commands and added skills support later so they needed a way to express that they want skills vs commands.
Thanks for your feedback @mnriem . Will be addressed. Opencode does support both (skills and commands), similarly to Copilot. That's why i left the option to choose which mode to use.
Please resolve conflicts
Please address Copilot feedback
conflicts resolved @mnriem
@tinesoft Does not look like it? Am I missing something?
Please address Copilot feedback and resolve conflicts