You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I only use the following relative paths relative to the skill's directory in the Claude code skill declaration, and Claude skills can execute scripts correctly.
uv run scripts/tasks.py list
However, using opencode does not execute the command correctly; it thinks the script does not exist.
I have a solution: change the relative path to be relative to the project root directory, but I think this is not friendly for skill portability.
It seems to me that references made in the SKILL.md confuse the agent, and often the agent 'expects' that the references (in your case scripts/tasks.py) is relative to the repo, not to where the SKILL.md is.
On top of that, the agent by default has to ask to access files that are outside the workspace (which ~/.config/opencode/skill/* is). I'm not sure if that makes the model less inclined to pick it up, or what, but for me the model basically 'never' reads referenced information, only the skill itself, unless I explicitly ask it to read all referenced files.
The specification actually specifies quite clearly that files should be referenced with paths relative to the skill root. However, I'm not sure if it is the task of the harness (opencode) or the skills system prompt to enable this.
A similar problem in that files found in the references folder for the skill are not always loaded when the skill is in the global config folders.
In my skill I try to be explicit to say that the agent should load the references from the same directory as the skill, which helps, but its doesn't always load the referenced files
Would you add read permission or write as well? I can see both pros and cons on being able to always create/edit a skill without permission checks regardless of where you are using opencode.
For those still struggling with this issue, #18370 is the issue to follow. I’ve added a ton of context there about how skills work internally, and what you can do to help the agent. We still need proper macro expansion or some other deterministic way of resolving resources bundled in skills, but until then, hopefully this helps.
Activity
louis-marchant commentedon Jan 5, 2026
It seems to me that references made in the
SKILL.mdconfuse the agent, and often the agent 'expects' that the references (in your casescripts/tasks.py) is relative to the repo, not to where the SKILL.md is.On top of that, the agent by default has to ask to access files that are outside the workspace (which
~/.config/opencode/skill/*is). I'm not sure if that makes the model less inclined to pick it up, or what, but for me the model basically 'never' reads referenced information, only the skill itself, unless I explicitly ask it to read all referenced files.neominik commentedon Jan 13, 2026
The specification actually specifies quite clearly that files should be referenced with paths relative to the skill root. However, I'm not sure if it is the task of the harness (opencode) or the skills system prompt to enable this.
WangBiaoxuan commentedon Jan 22, 2026
Same problem,Can anyone solve this problem?
samholder commentedon Jan 31, 2026
A similar problem in that files found in the references folder for the skill are not always loaded when the skill is in the global config folders.
In my skill I try to be explicit to say that the agent should load the references from the same directory as the skill, which helps, but its doesn't always load the referenced files
bakaburg1 commentedon Feb 2, 2026
same here
adampoit commentedon Feb 2, 2026
I was able to get around this by adding the following to my config:
It would be very nice if this directory were auto-allowed though.
rekram1-node commentedon Feb 3, 2026
Our skill support is poor, i'm going to do a pass on it:
These are the main 2 but it just needs a pass it is lacking significantly
louis-marchant commentedon Feb 3, 2026
Would you add read permission or write as well? I can see both pros and cons on being able to always create/edit a skill without permission checks regardless of where you are using opencode.
zcutlip commentedon Apr 15, 2026
Definitely not fixed. Issue still persists as described in #18370
zcutlip commentedon May 30, 2026
For those still struggling with this issue, #18370 is the issue to follow. I’ve added a ton of context there about how skills work internally, and what you can do to help the agent. We still need proper macro expansion or some other deterministic way of resolving resources bundled in skills, but until then, hopefully this helps.
#18370 (comment)