opencode icon indicating copy to clipboard operation
opencode copied to clipboard

skill can't find scripts path

Open sunjiawe opened this issue 1 month ago • 1 comments

Description

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.

Plugins

No response

OpenCode version

1.1.1

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

sunjiawe avatar Jan 05 '26 02:01 sunjiawe

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.

louis-marchant avatar Jan 05 '26 13:01 louis-marchant

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.

neominik avatar Jan 13 '26 08:01 neominik