Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/gzb1128/opencode-plugin/agents-mdgit clone --depth 1 https://github.com/gzb1128/opencode-pluginWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01823 | $0.01823 |
| Opus 5 | $0.00911 | $0.00911 |
| Sonnet 5 | $0.00365 | $0.00365 |
| Haiku 4.5 | $0.00182 | $0.00182 |
Grade A, and why
opencode-plugin AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — opencode-plugin
本文档供 AI Agent 阅读,记录项目背景、技术决策和隐式知识。
项目概述
opencode-plugin 是一个 Claude Code 插件生态兼容层。它的核心目标是让 Claude Code 的 plugin marketplace 生态能在 opencode 上无缝运行——用户可以用和 Claude Code 相同的 marketplace.json 格式、相同的 plugin 目录结构、相同的 CLI 命令来安装和管理插件。
设计原则
- 兼容而非替代:我们不重新实现 Claude Code 已有的能力(如
plugin init、plugin validate),让 AI agent 自己完成这些操作更原生 - 只做搬运层:CLI 负责 marketplace 发现、plugin 下载/缓存、symlink 管理、MCP 配置注入;不负责 plugin 内容的创建或校验
- 对齐 Claude Code 数据格式:
marketplace.json、plugin.json、.mcp.json等文件格式完全兼容 Claude Code 规范 - 渐进式实现:Hooks、LSP、Monitors、Themes 等组件先解析存储,等 opencode runtime 支持后激活
导航
| 主题 | 文档 |
|---|---|
| 架构设计 | docs/design/ARCHITECTURE.md |
| Plugin 模块 | docs/design/PLUGIN.md |
| Marketplace 模块 | docs/design/MARKETPLACE.md |
| CLI 命令设计 | docs/design/CLI.md |
| 配置管理 | docs/design/CONFIGURATION.md |
| OpenCode 集成 | docs/design/OPENCODE.md |
| MCP 实现(用户指南) | docs/MCP.md |
| MCP 模块设计 | docs/design/MCP.md |
| 使用指南 | docs/USAGE.md |
关键隐式知识
Plugin Source 的类型与 update 行为
marketplace.json 中每个 plugin 的 source 字段决定 plugin update 从哪里取代码。
parsePluginSource(internal/marketplace/parser.go)支持 7 种类型,按行为分成两组:
Local Source(相对路径字符串) — plugin 代码在 marketplace 仓库内
{ "source": "./plugins/my-plugin" }
plugin update从 marketplace 缓存目录 读取(即market update克隆下来的那份)- 必须先
market update再plugin update,否则拿到旧代码
Remote Source(对象形式) — plugin 代码在独立仓库/包,不依赖 marketplace 缓存
{ "source": { "source": "github", "repo": "owner/my-plugin" } }
取代码的方式由 source 字段决定(见 internal/plugin/version.go 的 IsRemoteSource /
clonePluginSource):
source 值 |
必填字段 | 取代码方式 |
|---|---|---|
github |
repo |
git clone https://github.com/<repo>.git |
git |
url |
git clone <url> |
git-subdir |
url/repo+path |
git clone 后取子目录 |
url |
url |
当作 git 仓库 clone(同 git,非任意 URL 下载) |
npm |
package |
npm install |
pip |
package |
⚠️ 解析已支持,安装尚未实现(version.go:186 返回 not implemented) |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 150 lines · 1,823 tokens per session scan A 6eddf354c39c
opencode-plugin AGENTS.md is an instructions file published in the GitHub repository gzb1128/opencode-plugin (1 stars, last pushed 2mo ago), licensed MIT. It adds 1,823 tokens to every session, about $0.0091 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
claude-code-marketplace CLAUDE.md
Claude Code instructions for NikiforovAll/claude-code-marketplace, covering project, commands, architecture, key concepts and linting.
agent-universe AGENTS.md
AGENTS.md instructions for SunrisesIllNeverSee/agent-universe, covering project state, original goal, architecture at a glance, what is built and functional and what is stubbed.
Devkit-AI CLAUDE.md
Instructions for pau-vega/Devkit-AI, covering project notes, project overview, repository structure, how to test locally and architecture.
avoid-overkill AGENTS.md
Instructions for 6Kmfi6HP/avoid-overkill: This repository packages a reusable Agent Skill and plugin manifests.
marketplace-mcp AGENTS.md
AGENTS.md instructions for YegorMy/marketplace-mcp, covering agent notes, rules and verification.
knowmint AGENTS.md
Instructions for Sou0327/knowmint, covering agents.md - 開発運用ガイド, 1. 参照ドキュメントと優先順位, 2. 標準ワークフロー (solo), 3. タスク管理ルール (plans.md) and 3.1 マーカー.