feat(opencode): Add support for project-local skills installation#29
Open
Pablo-Lozano-Gil wants to merge 1 commit intoGentleman-Programming:mainfrom
Conversation
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%.
3aab09a to
abdcee7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 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
examples/opencode_local/commandscontaining the necessary.mdfiles tailored for local paths.examples/opencode_local/opencode.jsonwith the localiz paths SDD agent configuration.install.shandinstall.ps1to include a newopencode-localagent option that routes skills and commands to./.opencode.install_test.shto 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.jsonexamples/opencode_local/commands/sdd-apply.mdexamples/opencode_local/commands/sdd-archive.mdexamples/opencode_local/commands/sdd-continue.mdexamples/opencode_local/commands/sdd-explore.mdexamples/opencode_local/commands/sdd-ff.mdexamples/opencode_local/commands/sdd-init.mdexamples/opencode_local/commands/sdd-new.mdexamples/opencode_local/commands/sdd-verify.md📂 Files changed
scripts/install.shscripts/install.ps1scripts/install_test.sh🧪 Testing
install_test.shforopencode-localinstallation, idempotency, command count validation, and content integrity.