Agent skill

Opencode Plugin Development

by sandgardenhq in sandgardenhq/sgai

Guide for creating and implementing plugins to extend OpenCode functionality, including hooks, custom tools, and event handling.

Custom licenceAuto-check: notesAgent Workflows

Install Opencode Plugin Development

skills CLI
$ npx skills add sandgardenhq/sgai --skill opencode-plugin-development -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sandgardenhq/sgai opencode-plugin-development --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sandgardenhq/sgai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cmd/sgai/skel/.sgai/skills/opencode-plugin-development .claude/skills/opencode-plugin-development && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
opencode-plugin-development
GitHub stars
137
Token cost
~1.2k tokens
SKILL.md length
289 words
Files
1
Skills in repo
55
Repo updated
First seen
Licence
Custom licence

At a glance

Guide for creating and implementing plugins to extend OpenCode functionality, including hooks, custom tools, and event handling.

  • Works in 2 steps: .sgai/plugin directory in your project → Or globally in ~/.config/opencode/plugin
  • Tasks that involve Hooks and plugins
  • SKILL.md covers Overview, When to Use, Plugin Structure and Plugin Location, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Opencode Plugin Development is an agent skill from sandgardenhq/sgai. Guide for creating and implementing plugins to extend OpenCode functionality, including hooks, custom tools, and event handling. When you need to add custom functionality to OpenCode, such as notifications, custom tools, or modifying behavior.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Hooks and plugins. It works with TypeScript. The repository describes itself as: Sandgarden AI Software Factory.

When your agent uses it

  • Tasks that involve Hooks and plugins

Example prompts

  • “/opencode-plugin-development”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. .sgai/plugin directory in your project
  2. Or globally in ~/.config/opencode/plugin

What it can do on your machine

Read from SKILL.md and the folder at commit 9efbb7b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Opencode Plugin Development loads about 1.2k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 289 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:105
    "read" && output.args.filePath.includes(".env")) {
  • NoteMentions a .env fileSKILL.md:106
    throw new Error("Do not read .env files")

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 289 words (~1,196 tokens).

“Plugins allow you to extend OpenCode by hooking into various events, adding custom tools, and customizing behavior. This skill guides you through creating plugins using JavaScript/TypeScript modules that export plugin functions.”

— opening of SKILL.md by sandgardenhq, Custom licence
name
opencode-plugin-development

Read the full SKILL.md on GitHub

Files

Just SKILL.md in cmd/sgai/skel/.sgai/skills/opencode-plugin-development of sandgardenhq/sgai.

Open the folder on GitHubat commit 9efbb7b

Compare with similar skills

Opencode Plugin Development next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Opencode Plugin Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Opencode Plugin Development this skillsandgardenhq/sgai137—~1.2kAutomated safety check: NotesCustom licence
OpenpetsOpenPetsHQ/openpets1.3k—~2.1kAutomated safety check: PassMIT
OpenCode Plugin CreatorDevin-AXIS/iPolloWork6.7k1 repos~1.3kAutomated safety check: PassCustom licence
Build Pluginopentabs-dev/opentabs967—~190Automated safety check: PassMIT
Create Modruvnet/ruflo74k—~984Automated safety check: NotesMIT
Typescript Hook Writerpr-pm/prpm122—~8.6kAutomated safety check: NotesMIT

Similar skills

  • Openpets

    OpenPetsHQ/openpets

    A skill your agent uses whenever the user wants to build, extend, debug, test, validate, locally load, package, or publish an OpenPets plugin; work with the OpenPets Plugin SDK v3, plugin manifest…

    1.3k GitHub stars~2.1k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • OpenCode Plugin Creator

    Devin-AXIS/iPolloWork

    Scaffolds an OpenCode plugin for iPolloWork with the right async factory shape, zod-based tool definitions and hook registration, and explains where to place and register it.

    6.7k GitHub starsUsed in 1 repo~1.3k tokens
    Agent WorkflowsAuto-check passed
  • Build Plugin

    opentabs-dev/opentabs

    Complete plugin development workflow: build, test, icon, troubleshoot, and setup.

    967 GitHub stars~190 tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed
  • Create Mod

    ruvnet/ruflo

    Scaffold a Claude Code mod (a plugin with a function-hooks module) from ruflo's governed template — hybrid hooks.json with a classic fallback, a host adapter over literal $ calls, userConfig…

    74k GitHub stars~984 tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Expert guidance for developing Claude Code hooks in TypeScript with shared utilities, esbuild compilation, and Vitest testing - distributes compiled JS while maintaining TypeScript development…

    122 GitHub stars~8.6k tokensUpdated today
    Testing & QAAuto-check: notes
  • Logseq Plugin SDK

    logseq/logseq

    Build, debug, or review Logseq plugins with the @logseq/libs SDK (TypeScript/JavaScript, iframe/shadow sandboxed).

    45k GitHub stars~2.3k tokensUpdated today
    Knowledge ManagementAuto-check passed

More from sandgardenhq/sgai

All 55 skills in this repo
  • Condition Based Waiting

    sandgardenhq/sgai

    A skill your agent uses when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state…

    137 GitHub starsUsed in 3 repos~933 tokens
    Auto-check passed
  • Defense In Depth

    sandgardenhq/sgai

    A skill your agent uses when invalid data causes failures deep in execution, requiring validation at multiple system layers - validates at every layer data passes through to make bugs structurally…

    137 GitHub starsUsed in 3 repos~970 tokens
    Auto-check passed
  • Root Cause Tracing

    sandgardenhq/sgai

    A skill your agent uses when errors occur deep in execution and you need to trace back to find the original trigger - systematically traces bugs backward through call stack, adding instrumentation…

    137 GitHub starsUsed in 3 repos~1.4k tokens
    Auto-check passed
  • Agent Native Architecture

    sandgardenhq/sgai

    Build AI agents using prompt-native architecture where features are defined in prompts, not code.

    137 GitHub stars~2k tokensUpdated 16 days ago
    Auto-check passed
  • Adhoc

    sandgardenhq/sgai

    Run and manage ad-hoc AI prompts in sgai workspaces without starting a full agentic session.

    137 GitHub stars~1.2k tokensUpdated 16 days ago
    Auto-check passed
  • You must use this skill when debugging web UI bugs or testing interactive components that require multi-step browser interactions.

    137 GitHub stars~3.7k tokensUpdated 16 days ago
    Auto-check passed

Works with

Categories

Questions about Opencode Plugin Development

What does Opencode Plugin Development do?

Guide for creating and implementing plugins to extend OpenCode functionality, including hooks, custom tools, and event handling. Opencode Plugin Development is an agent skill from sandgardenhq/sgai. Guide for creating and implementing plugins to extend OpenCode functionality, including hooks, custom tools, and event handling.

When should I use Opencode Plugin Development?

Opencode Plugin Development fits situations like: tasks that involve Hooks and plugins.

How do I install Opencode Plugin Development in Claude Code?

Run `npx skills add sandgardenhq/sgai --skill opencode-plugin-development -a claude-code`. Or copy the skill folder (cmd/sgai/skel/.sgai/skills/opencode-plugin-development in sandgardenhq/sgai) into .claude/skills/opencode-plugin-development in your project. Claude Code loads it when a task matches its description.

How do I install Opencode Plugin Development in Codex?

Run `npx skills add sandgardenhq/sgai --skill opencode-plugin-development -a codex`. Or copy the skill folder (cmd/sgai/skel/.sgai/skills/opencode-plugin-development in sandgardenhq/sgai) into .agents/skills/opencode-plugin-development in your project. Codex loads it when a task matches its description.

Can I use Opencode Plugin Development in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sandgardenhq/sgai --skill opencode-plugin-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/opencode-plugin-development, .gemini/skills/opencode-plugin-development, .github/skills/opencode-plugin-development and .opencode/skills/opencode-plugin-development in your project.

What does Opencode Plugin Development need to run?

SKILL.md names no scripts, command-line tools or credentials: Opencode Plugin Development is instructions for the agent only.

Does Opencode Plugin Development access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Opencode Plugin Development safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Opencode Plugin Development use?

Opencode Plugin Development has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Opencode Plugin Development use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Opencode Plugin Development?

Skills that share tags, products or a category with Opencode Plugin Development: Openpets (OpenPetsHQ/openpets, 1.3k stars), OpenCode Plugin Creator (Devin-AXIS/iPolloWork, 6.7k stars), Build Plugin (opentabs-dev/opentabs, 967 stars) and Create Mod (ruvnet/ruflo, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Opencode Plugin Development?

sandgardenhq (a GitHub organization) maintains it in sandgardenhq/sgai, which has 137 GitHub stars. The repository holds 55 skills in this directory. The repository was last updated on September 21, 2026.

Source: sandgardenhq/sgai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.