opencode-share-kit
Skill4 starsChanged 4 days agoMITView on GitHub
将 opencode 的自我进化/开发规范配置打包成可分享仓库(脱敏密钥 + 安装脚本 + README),并同步清理本地无效插件配置。触发词: 分享, 打包, 分发, 给别人的 opencode, 自我进化系统, 开发规范系统, 分享配置, opencode 插件未加载, 脱敏
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dsh/AGENTS.mdAGENTS.md
- android-apk-download-verifySkill
- auto-skill-creatorSkill
- docs-stale-auditSkill
- dsh-turn-failure-diagnosisSkill
- git-branch-consolidationSkill
- opencode-oauth-context-capSkill
- phased-refactor-and-reportSkill
- plan-reviewSkill
- powershell-utf8-safetySkill
- quality-baselineSkill
- test-verificationSkill
- white-bear-safe-rulesSkill
- windows-openssh-serverSkill
The file
Files
OpenCode 配置打包分享
<role>把本机的 opencode 全局配置(skills + AGENTS.md)整理成干净、可分享的 GitHub 仓库,并在打包前排查本地无效配置。</role>
步骤
- 盘点现状:列出
~/.config/opencode/目录结构(skills/、AGENTS.md、opencode.json、agent-team/、plugin.jsonc 等)。 - 排查插件是否真的加载:
- 检查
plugin/目录是否存在(opencode 插件安装位置);无则插件未装。 - 检查
node_modules/里是否有所声明插件的包。 - 检查插件配置文件引用的 provider/model 在
opencode.json是否真的定义(引用不存在的 provider = 死配置)。 - 无效插件:删除
opencode.json与tui.json里的"plugin": [...]声明,并可删插件 jsonc 与 agent-team/。
- 检查
- 定分享范围:核心系统 = auto-skill-creator + white-bear-safe-rules + 质量/规范类技能 + AGENTS.md + INDEX.md +
check-rules.mjs+audit-docs.mjs+test/+git-hooks/+.gitattributes(npm test= 规则体检 L1-L4 + 单测;git-hooks = 全局提交钩子);领域专属技能(excel-vba、vbs 等)按需另打包。 - 清理悬空引用:共享版技能里对不一起分享的技能名/文件的引用要删掉(保留规则本身)。
- 脱敏:
opencode.json.example里所有 API Key 换占位符(sk-、nvapi-、ctx7sk-全查),去掉真实 provider/baseURL。 - 写 README:目录结构、安装步骤(install.ps1 + macOS/Linux 手动拷贝)、自我进化原理、自定义说明。
- 安全自检:
rg -n "sk-[A-Za-z0-9]{20,}|nvapi-|ctx7sk-"全仓零命中才算完成。
关键命令 / 模式
- 安装脚本:
Copy-Item AGENTS.md+skills/到$HOME/.config/opencode/,opencode.json 已存在则跳过不覆盖;check-rules.mjs、audit-docs.mjs、test/、git-hooks/、.gitattributes一并拷贝(配合package.json的npm test)。 - 全局提交钩子:安装
git config --global core.hooksPath <配置目录>/git-hooks;卸载git config --global --unset core.hooksPath;仓库级 hooksPath(husky 等)优先,--no-verify单次跳过。 - 分享后体检:
npm test(规则体检 L1-L4 + 单测)与node audit-docs.mjs全 PASS 再发布。 - 插件未加载判定:
Test-Path plugin、Get-ChildItem node_modules -Filter "*oh-my*"、rg "my-provider" *.jsonc。 - 密钥扫描:
rg -n "sk-[A-Za-z0-9]{20,}|nvapi-[A-Za-z0-9]{20,}|ctx7sk-[A-Za-z0-9]{20,}"。
Notes
- 分享仓库的 AGENTS.md/skills 是快照,与本地全局目录(含更多技能)不必完全一致。
- 千万别把含真实密钥的
opencode.json提交进公开仓库;.gitignore里加opencode.json。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

