spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

feat: add `--skills` support to `opencode` integration

Open tinesoft opened this issue 6 months ago • 10 comments

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:

  • --skills option declaration (is_flag=True, default=False)
  • SKILL.md file creation under .opencode/skills/
  • No .md command 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.

tinesoft avatar May 08 '26 05:05 tinesoft

Please address Copilot feedback

mnriem avatar May 12 '26 16:05 mnriem

Please address Copilot feedback. If not applicable, please explain why

mnriem avatar May 14 '26 19:05 mnriem

I adressed the changes and aligned the skill integration with how it was done for Copilot

tinesoft avatar May 15 '26 11:05 tinesoft

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.

mnriem avatar May 20 '26 12:05 mnriem

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.

tinesoft avatar May 20 '26 20:05 tinesoft

Please resolve conflicts

mnriem avatar May 27 '26 12:05 mnriem

Please address Copilot feedback

mnriem avatar May 28 '26 16:05 mnriem

conflicts resolved @mnriem

tinesoft avatar May 29 '26 11:05 tinesoft

@tinesoft Does not look like it? Am I missing something?

mnriem avatar May 30 '26 12:05 mnriem

Please address Copilot feedback and resolve conflicts

mnriem avatar Jun 09 '26 13:06 mnriem