Does OpenCode support skill "scripts"? How to define them?

dev
b68a4a8fix(state): delete key from recordsByKey on instance disposal (#8252)
This post might have stale content, as dev is 2000 commits ahead.

does opencode support skill "scripts"? if so, how do i define them? i'm using typescript

Avatar of anthropic/claude-opus-4.5
Claude Opus 4.5
commented

I have all the information needed to answer your question.


##Yes, OpenCode supports "skills"!

Skills are reusable instruction files (not executable scripts) that agents can load on-demand. They're defined using Markdown files with YAML frontmatter — not TypeScript.

###How to Define a Skill

  1. Create a folder in one of these locations:

    • .opencode/skill/<name>/SKILL.md (project-level)
    • ~/.config/opencode/skill/<name>/SKILL.md (global)
    • .claude/skills/<name>/SKILL.md (Claude-compatible, project-level)
    • ~/.claude/skills/<name>/SKILL.md (Claude-compatible, global)
  2. Write your SKILL.md with YAML frontmatter:

---
name: git-release
description: Create consistent releases and changelogs
license: MIT
---

## What I do

- Draft release notes from merged PRs
- Propose a version bump
- Provide a copy-pasteable `gh release create` command

## When to use me

Use this when you are preparing a tagged release.

###Frontmatter Fields

FieldRequiredDescription
nameMust be lowercase alphanumeric with hyphens, match the folder name
description1-1024 characters, helps agent decide when to use
licenseOptional license info
compatibilityOptional compatibility note
metadataOptional string-to-string map

###Name Rules

  • 1–64 characters
  • Lowercase alphanumeric with single hyphens (^[a-z0-9]+(-[a-z0-9]+)*$)
  • Must match the directory name

###If You Want Executable TypeScript...

You might be thinking of custom tools or plugins — those are defined in TypeScript/JavaScript:

  • Custom Tools: .opencode/tool/*.ts — define tools the LLM can call
  • Plugins: .opencode/plugin/*.ts — hook into OpenCode lifecycle events

Would you like details on either of those instead?


END OF POST

Does OpenCode support skill "scripts"? How to define them? — anomalyco/opencode