🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

opencode-copilot-plugin

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-copilot-plugin

OpenCode plugin that brings GitHub Copilot's custom instructions and skills system to OpenCode

Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
86
681.82%
Maintainers
1
Weekly downloads
 
Created
Source

opencode-copilot-plugin

npm version license

An OpenCode plugin that brings GitHub Copilot's custom instruction and skill system into OpenCode. If you already have Copilot instruction or skill files set up, they work in OpenCode with no changes.

Install

Add the plugin to your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-copilot-plugin"]
}

OpenCode installs npm plugins automatically at startup — no separate install step needed.

Supported features

Custom instructions

  • Repo-wide.github/copilot-instructions.md is injected into every session automatically.
  • Path-specific.github/instructions/**/*.instructions.md files are injected when the LLM accesses files matching their applyTo glob frontmatter field.
  • Global path-specific~/.copilot/instructions/**/*.instructions.md works the same as project path-specific instructions but applies across all workspaces.

Skills

  • Project-local.github/skills/<name>/SKILL.md
  • User-global~/.copilot/skills/<name>/SKILL.md
  • When at least one skill exists at startup, a copilot_skill tool is registered so the LLM can load skills on demand.
  • Local skills shadow global skills of the same name.

Hooks

Executes Copilot hook scripts at key lifecycle points in each agent session. Hook scripts receive JSON on stdin and can approve, deny, or request confirmation for tool calls.

  • Project-local.github/hooks/*.json
  • User-global~/.copilot/hooks/*.json
  • Project hooks run before global hooks for each hook type.

Supported hook types:

Hook typeWhen it fires
sessionStartWhen a new session is created
sessionEndWhen a session is deleted
userPromptSubmittedWhen a new user message is received
preToolUseBefore each tool call — can block execution
postToolUseAfter each successful tool call
agentStopWhen the agent finishes responding (session goes idle)
errorOccurredWhen a session error occurs

Hook configuration files use the same format as GitHub Copilot hooks:

{
  "version": 1,
  "hooks": {
    "preToolUse": [
      {
        "type": "command",
        "bash": "./scripts/security-check.sh",
        "cwd": ".",
        "timeoutSec": 15
      }
    ]
  }
}

preToolUse permission decisions: If a hook script outputs {"permissionDecision":"deny","permissionDecisionReason":"..."}, the tool call is blocked. If it outputs {"permissionDecision":"ask","permissionDecisionReason":"..."}, the agent is instructed to confirm with the user before retrying — on the next identical tool call (same tool and arguments), that specific hook is bypassed.

Tool name mapping: Hook scripts receive Copilot-equivalent tool names (view instead of read, create instead of write) so existing scripts work unmodified.

Platform note: Only bash commands are executed. powershell commands are silently skipped on macOS/Linux.

No hot-reload: Hook files are loaded once when the plugin initialises. Changes to hook files require an OpenCode restart to take effect.

Hot-reload

Instruction files and skill directories are re-parsed automatically when they change on disk — no OpenCode restart required. Hook files are the exception — see note above.

License

MIT © Brandon Burrus

Keywords

opencode

FAQs

Package last updated on 26 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts