@dlacaille/opencode-copilot-instructions
v0.4.0
Published
OpenCode plugin that loads GitHub Copilot custom instruction files
Maintainers
Readme
@dlacaille/opencode-copilot-instructions
An OpenCode V2 plugin that loads GitHub Copilot custom instruction files into OpenCode's context.
Installation
Add the plugin to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["@dlacaille/opencode-copilot-instructions"]
}OpenCode installs the package from npm on startup.
Usage
Repository-wide instructions
Create .github/copilot-instructions.md. Its content is added to every model request, including compaction.
Path-specific instructions
Create .github/instructions/*.instructions.md files with an applyTo field:
---
applyTo: "**/*.ts,**/*.tsx"
---
Always use explicit return types.When the read, edit, or write tools touch a matching file, the instructions are appended to the tool result. Each file is added once per session, and again after the session is compacted.
applyTo accepts a comma-separated string or a YAML list of picomatch globs, relative to the git root.
Instructions are read from the .github folder at the git root of each session's directory (or the directory itself outside a git repository). They are reloaded on every use, so edits apply without restarting OpenCode.
Development
npm install --legacy-peer-deps
npm test
npm run typecheckTo try a local checkout, point plugins at its path, for example "plugins": ["~/projects/opencode-copilot-instructions"].
Credits
Based on ekroon/opencode-copilot-instructions by @ekroon, ported to the OpenCode V2 plugin API.
License
MIT
