Skip to main content

Adapting Claude Code skills for OpenCode

Why Claude Code skills don't translate verbatim to OpenCode, and how I adapted a popular skills collection.

Agent Skills, which first originated in Anthropic’s Claude Code, are now widespread to all major coding agents including OpenCode and are even somewhat standardized. This allows various skill aggregation platforms to provide agent-agnostic skills, which is great for sharing knowledge and avoiding unnecessary fragmentation. There is, however, one subtle distinction between Claude Code and OpenCode which makes verbatim-copied skills not fully equivalent between them.

Why skills don’t translate verbatim

OpenCode makes the explicit distinction between visible and callable by agents skills - actual Agent Skills, and skills that are intended only for manual triggering by users - what they call Commands. In Claude Code a similar behavior is controlled by the disable-model-invocation and user-invocable flags, which have no effect in OpenCode. Moreover, Claude Code supports some additional flags such as effort, allowed-tools, etc. that tweak skill behavior even further and make interoperability even less smooth. In practice, however, it is rare that any of these distinctions are truly decisive and skill sharing in general works pretty well.

Decisive or not, I am still not comfortable with blindly installing third-party skills and hoping they will do what I want (and perhaps more importantly won’t do what I don’t want). I believe in personalizing development tools and with coding agents this is literally as easy as writing plain English. Or maybe I just want everything to work my way and am ready to invest time into that.

Adapting Matt Pocock’s skills

In the rest of this post I will explain how I adapted a popular collection of skills from Matt Pocock (author of /grill-me) for OpenCode and personally for me. From reading through his skills it was immediately clear that:

There were, however, several ideas and principles I really liked there:

Interestingly, the last two points were not independent, but instead just sub-files of the /grill-with-docs skill, even though other skills often referenced them. After that I decided that /grill-me and /zoom-out should never be called by an agent and therefore should go into Commands. For the rest of the skills the agent should be able to decide itself when it is time to add a new term to the vocabulary, add a new ADR, or bring the big guns to bug fixing.

In the end I converted several of Matt’s multi-file skills into 2 single-file Commands and 3 single-file Skills. I am glad I took time to simplify them and decide when and how they should trigger - hopefully, this will make OpenCode’s behavior more predictable. Note, however, that I don’t think all skills need this explicit treatment - if a skill just describes how to do some specific action (like converting a PDF) then it is perfectly fine to leave it as is.