Package Exports
- opencode-core-rules-injector
- opencode-core-rules-injector/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (opencode-core-rules-injector) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
opencode-core-rules-injector
原理: 在每次 LLM 调用前,把 ~/.config/opencode/core-rules.md 的内容注入到 system prompt 里。
你改那个文件,它就生效,无需重启,无需改 AGENTS.md。
安装
npm install -g opencode-core-rules-injector然后在 opencode.json 里启用:
{
"plugin": ["opencode-core-rules-injector"]
}使用
编辑 ~/.config/opencode/core-rules.md,填入你最看重的规则(语言、工具偏好等)。
每次 LLM 调用会自动注入,修改后立刻生效。