Borrowing it
Nothing to install: this file belongs to gzb1128/opencode-plugin. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/gzb1128/opencode-plugin/main/AGENTS.mdgit clone --depth 1 https://github.com/gzb1128/opencode-pluginWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/gzb1128/opencode-plugin/agents-md)<a href="https://agentmods.dev/instructions/gzb1128/opencode-plugin/agents-md"><img src="https://agentmods.dev/badge/instructions/gzb1128/opencode-plugin/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/gzb1128/opencode-plugin/agents-md"><img src="https://agentmods.dev/badge/instructions/gzb1128/opencode-plugin/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.01775 | $0.01775 |
| Opus 5.5 | $0.00710 | $0.00710 |
| Sonnet 5.5 | $0.00355 | $0.00355 |
| Haiku 4.5 | $0.00178 | $0.00178 |
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 1mo ago.
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 — 148 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 管理;不负责 plugin 内容的创建或校验
- 对齐 Claude Code 数据格式:
marketplace.json、plugin.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 |
| 使用指南 | 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.
- 1mo ago Changed · -2 lines · -48 tokens per session d0a77bb94d28
- 2mo ago 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 (2 stars, last pushed 1mo ago), licensed MIT. It adds 1,775 tokens to every session, about $0.0071 per session on Opus 5.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
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.