Skip to content

skill can't find scripts path #6900

Closed

Description

@sunjiawe

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

Activity

  1. louis-marchant commented on Jan 5, 2026

    @louis-marchant

    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.

  2. neominik commented on Jan 13, 2026

    @neominik
    Contributor

    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.

  3. WangBiaoxuan commented on Jan 22, 2026

    @WangBiaoxuan

    Same problem,Can anyone solve this problem?

  4. samholder commented on Jan 31, 2026

    @samholder

    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

  5. bakaburg1 commented on Feb 2, 2026

    @bakaburg1

    same here

  6. adampoit commented on Feb 2, 2026

    @adampoit

    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 was able to get around this by adding the following to my config:

      "permission": {
        "external_directory": {
          "/Users/.../.config/opencode/skill/**": "allow"
        }
      },
    

    It would be very nice if this directory were auto-allowed though.

  7. rekram1-node commented on Feb 3, 2026

    @rekram1-node
    Collaborator

    Our skill support is poor, i'm going to do a pass on it:

    • auto approve permission for the skill dirs
    • adjust prompting so it is more clear to agent where resources/scripts/etc live and can be invoked from

    These are the main 2 but it just needs a pass it is lacking significantly

  8. louis-marchant commented on Feb 3, 2026

    @louis-marchant

    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.

  9. zcutlip commented on Apr 15, 2026

    @zcutlip

    Definitely not fixed. Issue still persists as described in #18370

  10. zcutlip commented on May 30, 2026

    @zcutlip

    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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions