Skip to content

Support for "Skills" #3235

Closed
Closed

Description

@tobias-walle

Yesterday Claude Code released a new feature called "Skills", that basically allows the user to define prompts, that are lazily loaded by the Agent when needed.

https://www.anthropic.com/news/skills

It would be nice to see a similar feature in OpenCode.

Activity

  1. github-actions commented on Oct 17, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. tobias-walle commented on Oct 17, 2025

    @tobias-walle
    ContributorAuthor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

    1. Not a duplicate, as this issue is refereeing to handling dynamic content in the system prompt (by running scripts), but these are always included. With skills the agent decides then it wants to include a specific "Skill".

    2. Also not a duplicate

  3. rekram1-node commented on Oct 17, 2025

    @rekram1-node
    Collaborator

    Sorry about that @tobias-walle the bot is a little overeager, I think ill make it reword it's comments so that people know they dont need to respond to it.

    Every issue opened is seen by someone on the team but the bot helps find duplicates (sometimes haha)

  4. tobias-walle commented on Oct 17, 2025

    @tobias-walle
    ContributorAuthor

    No worries 😄 As I wasn't entirely sure about the first one, I checked and just wanted to share my findings.

    Overall, I really like the bot, as it gives me some confidence that my issue is actually unique and that I didn't miss a duplicate.

  5. kziemski commented on Oct 17, 2025

    @kziemski

    Adding more to this as this guy has some interesting ideas on extensions to skills:
    https://github.com/obra/superpowers
    https://github.com/obra/superpowers-skills
    https://blog.fsck.com/2025/10/09/superpowers/

  6. rekram1-node commented on Oct 17, 2025

    @rekram1-node
    Collaborator

    I think everything skills offers is already possible right, or at least most of it, just define a custom tool and return markdown from it

    I mean that's like 99% of it I think

  7. kziemski commented on Oct 17, 2025

    @kziemski

    I think everything skills offers is already possible right, or at least most of it, just define a custom tool and return markdown from it

    I mean that's like 99% of it I think

    ya that's not surprising i'm just wondering if it could be the starting point for more in opencode.
    the skill sharing in the superpowers repo could be interesting.

  8. malhashemi commented on Oct 18, 2025

    @malhashemi
    Contributor

    Hey everyone! 👋

    I just published an npm plugin that implements Anthropic's Skills Specification for OpenCode!

    📦 npm package: https://www.npmjs.com/package/opencode-skills
    📄 GitHub repo: https://github.com/malhashemi/opencode-skills

    Installation (super simple!)

    Add one line to your opencode.json or ~/.config/opencode/opencode.json:

    {
      "plugin": ["opencode-skills"]
    }

    That's it! OpenCode will automatically install the plugin from npm on next startup. No npm install needed.

    What it does

    This plugin provides one-to-one parity with Anthropic's Agent Skills Specification (v1.0), with the added bonus of supporting nested skills (e.g., skills/tools/analyzer/SKILL.md → skills_tools_analyzer) - a feature that Anthropic doesn't support yet.

    How it works

    The plugin scans your .opencode/skills/ directory (and ~/.opencode/skills/ for global skills), discovers all SKILL.md files, validates them against the spec, and exposes SKILL.md using its meta data as a callable tool (e.g., skills_my_skill). I'm assuming Claude Code implements this similarly, though I could be wrong here and something fancier is running under the hood

    Quick Start

    1. Add plugin to opencode.json (see above)
    2. Restart OpenCode
    3. Create a skill:
    mkdir -p .opencode/skills/my-skill
    1. Add a SKILL.md file:
    ---
    name: my-skill
    description: A custom skill that helps with specific tasks
    ---
    
    # My Skill
    
    Your skill instructions here...
    1. Restart OpenCode again - your skill is now available as skills_my_skill!

    Integration with OpenCode

    Since skills are just regular OpenCode tools, they benefit from OpenCode's existing tool management:

    • ✅ Can be disabled globally via opencode.json
    • ✅ Can be enabled/disabled per-agent in agent frontmatter
    • ✅ Inherit all of OpenCode's permission system

    Testing

    I've tested this with Anthropic's official skills on Claude Sonnet 4.5 with max thinking, and they work beautifully. You may notice that the tool call return some instructions to the LLM about path management, I found that without it the agent gets lost searching for files mentioned in the SKILLS.md.

    Note on Tool Restrictions

    One difference from Anthropic's implementation: I couldn't find a way to implement skill-level tool restrictions (the allowed-tools field that's available in Claude Code). However, I don't think this is necessary in OpenCode since you'll typically pair skills with specific agents, and agents already have their own fine-grained tool permissions. This actually gives you more control - you can configure which tools are available at the agent level rather than embedding it in the skill itself.


    Hope this helps the community! Let me know if anyone has feedback or suggestions. 🎉

    For full documentation, check out the GitHub repo.

    Feel free to PR if you have some valuable improvements


    @thdxr and @rekram1-node , I believe you mentioned you are going to work on revamping the custom tools in the upcoming TUI. Should I expect a breaking change?

  9. ihabwahbi commented on Oct 18, 2025

    @ihabwahbi

    @malhashemi I'll test your solution seems a very straightforward and easy way to integrate Skills into opencode

  10. rekram1-node commented on Oct 18, 2025

    @rekram1-node
    Collaborator

    @malhashemi I dont think there should be any breaking changes soon, but if you run into any issues just lmk.

    We do version things with specific version bumps if breaking tho

  11. tobias-walle commented on Oct 18, 2025

    @tobias-walle
    ContributorAuthor

    Great idea with the plugin! I think this is already quite a good solution.

    I think an official solution would still be valuable to have a common standard, but this doesn't has much priority (considering the big refactoring you are currently working on)

  12. kziemski commented on Oct 20, 2025

    @kziemski

    @tobias-walle @malhashemi @rekram1-node
    I'm wondering if you guys had taken a look at what this guy had done on the CC side https://blog.fsck.com/2025/10/09/superpowers/

    i'm wondering if opencode taking the approach of public skills repo or taking the approach of openweb-ui's public search for prompts,functions ie for community sharing would be something that could really bring some adoption for an official version of skills support

  13. rekram1-node commented on Oct 20, 2025

    @rekram1-node
    Collaborator

    i think we are going to watch them play out a little more before doing anything major, we have some higher priority items currently to tackle but thanks for the callout

  14. ferdinandyb commented on Oct 24, 2025

    @ferdinandyb
    Contributor

    @malhashemi Can you version-pin the plugin somehow?

  15. 23 remaining items

  16. thdxr commented on Dec 5, 2025

    @thdxr
    Member

    we're probably forced to support it at this point - talking to anthropic

  17. malhashemi commented on Dec 5, 2025

    @malhashemi
    Contributor

    we're probably forced to support it at this point - talking to anthropic

    Great news @thdxr !!!

    Would love/be honoured to share my findings from the time I spent adopting it to be as close to OpenCode style as possible and all the community requests I received for the plugin 🙏. I am sure you will come up with a way better design than I did.

  18. taqtiqa-mark commented on Dec 10, 2025

    @taqtiqa-mark

    @malhashemi,

    A2A is already there in Opencode

    I should have linked, but here A2A refers to the protocol, see #3023

  19. gsemet commented on Dec 14, 2025

    @gsemet

    Hello.

    My custom solution on Vscode copilot:

    • I have a tool that index all skills in a nested structure. This is important because it can becomes really huge especially when sharing with several teams
    • skills has 2 states: activated/unactivated, loaded/unloaded.
    • Unactivated skills are not « kwown » at all by the coding agent
    • once activated (by a CLI tool), the frontmatter description and keywords are forcefully added to the context through a equivalent of AGENTS.md (« always injected » instruction files that explain briefly what a skill is and has a recopy of all the activated skills frontmatter). The context always has this content and I do not see any drift so far
    • the Coding agent can easily load the skill based on user intend. That requires the knowledge base (a git repo) to be in the workspace, but maybe this can be done by MCP server, I tested it but it does not work (I did it wrong probably)
    • the CLI can forcefully « load » a skill to the context (ie recopy the SKILL.md to the instruction files), for a dedicated session for instance. I actually never use this.

    At the end, I can do in my vscode « use the skill creator skill to generate a skill in xxx about project in path yyyy », and I see the progressive disclosure directly happening in the chat.

    Doing this by MCP makes it really hard do see if the agent has understood the intent.

    I want you have your feedback, I would be glad to have a standard solution to write skills (especially shared, hierarchical repositories of skills in a company)

  20. klaudworks commented on Dec 15, 2025

    @klaudworks

    I'd be happy to implement a skill implementation native to opencode:

    I already analyzed the requests to Anthropic: https://x.com/klaudworks/status/1982029102925414477
    and implemented my own MCP based version that mirrors it: https://github.com/klaudworks/universal-skills

  21. taqtiqa-mark commented on Dec 15, 2025

    @taqtiqa-mark

    I'd be happy to implement a skill implementation native to opencode:

    Would you implement support for .hooks the way CC does? The use case is set out here:

    https://scottspence.com/posts/how-to-make-claude-code-skills-activate-reliably:

    ... skills are supposed to activate autonomously based on their descriptions. ... In practice? Nah. ... Forced hook never completely failed a category (most consistent).

    There will always be some degree of mismatch between what an use instructs and the skill description. Nonetheless, opencode-skills has rejected building in this CC compatibility feature. See malhashemi/opencode-skills#38

    This is one of the things where I think CC is sane.

  22. joshuadavidthomas commented on Dec 15, 2025

    @joshuadavidthomas
    Contributor

    I read that blog post and ended up adding something to the skills plugin I've been kicking around for the past couple of weeks, opencode-agent-skills. Basically I generate a local embedding of all the skills via all-MiniLM-L6-v2 and on every user message I do a quick search for any potential relevant skills and inject a small synthetic reminder message:

    <skill-evaluation-required>
    SKILL EVALUATION PROCESS
    
    The following skills may be relevant to your request:
    
    ${skillLines}
    
    Step 1 - EVALUATE: Determine if these skills would genuinely help
    Step 2 - DECIDE: Choose which skills (if any) are actually needed
    Step 3 - ACTIVATE: Call use_skill("name") for each chosen skill
    
    If no skills are needed for this request, proceed without activation.
    </skill-evaluation-required>
    

    https://github.com/joshuadavidthomas/opencode-agent-skills/blob/1b4b97226bd39acdae9c6b4ac1c3a8bb31992130/src/plugin.ts#L44-L56

    It's only been a few days, but LLMs do seem to be a bit more eager to call skills, at least if they are relevant to the conversation. I don't have any hard evals around it, just a gut feeling. And since I dedupe any skills that are loaded in the course of a session, there's not a huge token hit to the context window.

    I should note, the approach I took differs slightly from the one by @malhashemi in opencode-skills -- instead of tools for each skill, my plugin just has 4 tools around listing and reading skills and I do inject messages into the session through the chat.message hook and the session.compacted event.

  23. taqtiqa-mark commented on Dec 15, 2025

    @taqtiqa-mark

    I should note, the approach I took differs slightly from the one by @malhashemi in opencode-skills -- instead of tools for each skill, my plugin just has 4 tools around listing and reading skills and I do inject messages into the session through the chat.message hook and the session.compacted event.

    Thanks for the heads-up about your plugin, and the feedback. I think one of the things opencode-skills gets right is the 1:1 mapping between skills and tools - to the extent that this gives atomic control over what skills are active for each agent, via the tools list.

    Another, is respecting nested skills folders.

  24. rekram1-node commented on Dec 15, 2025

    @rekram1-node
    Collaborator

    Dax said he should be adding this first party v soon

  25. surma commented on Dec 19, 2025

    @surma
    Contributor

    Quick question: I just stumbled over agentskills.io, which seems to be a standardization(-ish) effort around skills, and it lists OpenCode as a tool that supports it. Is this issue out of date, is the website wrong or is there other nuance to this?

    Image
  26. ucirello commented on Dec 19, 2025

    @ucirello
    Contributor

    @surma -- currently is achieved by a plugin. Refer to https://opencode.ai/docs/ecosystem/#plugins

  27. trystan2k commented on Dec 19, 2025

    @trystan2k

    Quick question: I just stumbled over agentskills.io, which seems to be a standardization(-ish) effort around skills, and it lists OpenCode as a tool that supports it. Is this issue out of date, is the website wrong or is there other nuance to this?

    Image

    Dax mentioned in X they are working on it and plan to ship next week

    https://x.com/i/status/2001717794946031740

  28. jensenojs commented on Dec 23, 2025

    @jensenojs
    Contributor

    I'd be happy to implement a skill implementation native to opencode:我很乐意在 opencode 中实现原生的技能功能:

    Would you implement support for .hooks the way CC does? The use case is set out here:您会像 CC 那样实现 .hooks 的支持吗?具体用例说明如下:

    https://scottspence.com/posts/how-to-make-claude-code-skills-activate-reliably:

    ... skills are supposed to activate autonomously based on their descriptions. ... In practice? Nah. ... Forced hook never completely failed a category (most consistent).……技能应能根据其描述自主激活。……实际效果如何?不尽如人意。……强制钩子从未在任何类别中完全失效(表现最为稳定)。

    There will always be some degree of mismatch between what an use instructs and the skill description. Nonetheless, opencode-skills has rejected building in this CC compatibility feature. See malhashemi/opencode-skills#38用户指令与技能描述之间总会存在某种程度的不匹配。尽管如此,开源技能项目已拒绝内置此项 CC 兼容性功能。详情参见 malhashemi/opencode-skills#38

    This is one of the things where I think CC is sane.这正是我认为 CC 设计理念较为合理的方面之一。

    Is there any further discussion on this topic?

  29. taqtiqa-mark commented on Dec 23, 2025

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions