@manuelvanrijn/opencode-copilot-instructions
v0.1.2
Published
OpenCode plugin that loads .github/instructions/ files with applyTo: frontmatter into the system prompt — like GitHub Copilot instructions
Maintainers
Readme
@manuelvanrijn/opencode-copilot-instructions
An OpenCode plugin that loads .github/instructions/ files into the AI agent's system prompt — following the same applyTo: convention as GitHub Copilot custom instructions.
How it works
- Files with
applyTo:are injected on-demand when the agent reads, edits, or writes a file matching the glob pattern - Files without
applyTo:are always injected at the start of every session
This means you can keep your existing .github/instructions/ setup and it works in both Copilot and OpenCode without any duplication.
Installation
opencode plugin @manuelvanrijn/[email protected] --globalOr add it to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@manuelvanrijn/[email protected]"]
}Instruction file format
Same format as GitHub Copilot — YAML frontmatter with applyTo::
---
applyTo: "app/controllers/**"
---
# Controllers Guide
Your instructions here...Multiple globs (comma-separated):
---
applyTo: "app/models/**, test/**"
---
# ModelsNo frontmatter = always active:
# General Rails Guidelines
Always use...Debugging
Enable verbose logging:
COPILOT_INSTRUCTIONS_DEBUG=1 opencodeTool: list_injected_copilot_instructions
The plugin exposes a tool the agent can call to report the current injection status:
list_injected_copilot_instructionsOutput shows which files are injected, which are pending, and which file paths have been seen in the session.
Releasing
Publishing to npm is fully automated via .github/workflows/publish.yml, triggered by pushing a v*.*.* tag.
Use the release script from a clean main:
git switch main && git pull
./scripts/release.sh patch # or: minor | majorThe script:
- Verifies the working tree is clean.
- Bumps the version in
package.json(npm version --no-git-tag-version). - Updates
CHANGELOG.md: renames## Unreleasedto## vX.Y.Z — YYYY-MM-DDand adds a fresh## Unreleasedsection at the top. - Commits (
chore: release vX.Y.Z), creates tagvX.Y.Z, and pushes both toorigin/main.
The tag push then triggers the GitHub Actions workflow, which:
- Verifies the tag matches
package.jsonversion. - Creates a GitHub Release with auto-generated notes.
- Publishes to npm with
--provenance(OIDC / sigstore).
License
MIT
