Skip to content

feat(opencode): Add support for project-local skills installation#29

Open
Pablo-Lozano-Gil wants to merge 1 commit intoGentleman-Programming:mainfrom
Pablo-Lozano-Gil:feat/support-for-opencode-local-installation
Open

feat(opencode): Add support for project-local skills installation#29
Pablo-Lozano-Gil wants to merge 1 commit intoGentleman-Programming:mainfrom
Pablo-Lozano-Gil:feat/support-for-opencode-local-installation

Conversation

@Pablo-Lozano-Gil
Copy link

📝 Description

The Problem

Previously, when skills were installed locally in a project and OpenCode was used, the agents attempted to look for the skills in the global directory (~/.config/opencode/...) because the paths were hardcoded in the command definitions. Since the skills were not present globally, this led to immediate errors and caused excessive token consumption as the agents repeatedly searched for the missing skill files or hallucinated their contents.

The Solution

This PR introduces native support for project-local skills installation specifically for OpenCode. When skills are installed project-locally, the command files are now correctly adapted to point to the project's ./.opencode/ directory instead of the global path. This ensures the agents can locate and execute the skills reliably without burning unnecessary tokens.

🛠️ Key Changes

  • Localized Commands: Added examples/opencode_local/commands containing the necessary .md files tailored for local paths.
  • SDD Orchestrator Persona: Added examples/opencode_local/opencode.json with the localiz paths SDD agent configuration.
  • Installation Scripts: Updated install.sh and install.ps1 to include a new opencode-local agent option that routes skills and commands to ./.opencode.
  • Tests: Updated install_test.sh to include comprehensive test cases for the new local installation flow, ensuring test coverage remains at 100%.

📂 New Files (with the local directory)

  • examples/opencode_local/opencode.json
  • examples/opencode_local/commands/sdd-apply.md
  • examples/opencode_local/commands/sdd-archive.md
  • examples/opencode_local/commands/sdd-continue.md
  • examples/opencode_local/commands/sdd-explore.md
  • examples/opencode_local/commands/sdd-ff.md
  • examples/opencode_local/commands/sdd-init.md
  • examples/opencode_local/commands/sdd-new.md
  • examples/opencode_local/commands/sdd-verify.md

📂 Files changed

  • scripts/install.sh
  • scripts/install.ps1
  • scripts/install_test.sh

🧪 Testing

  • Added new test cases in install_test.sh for opencode-local installation, idempotency, command count validation, and content integrity.
  • Verified test coverage remains at 100%.

Previously, skills had a hardcoded global repository config path
(~/.config/opencode/...). With this change, if skills are installed
project-locally for OpenCode, the commands are adapted to the
project's ./.opencode directory.

Installation scripts and the installation test script have been updated,
and the test coverage remains at 100%.
@Pablo-Lozano-Gil Pablo-Lozano-Gil force-pushed the feat/support-for-opencode-local-installation branch from 3aab09a to abdcee7 Compare March 12, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant