opencode-plugin: Instructions file for Codex

AGENTS.md

opencode-plugin AGENTS.md is an instructions file for Codex, OpenCode from gzb1128/opencode-plugin. It costs 1,775 tokens per session, scanned A, original, MIT.

Project guidance for an AI coding agent working on opencode-plugin, a compatibility layer that lets OpenCode use Claude Code plugins and marketplaces.

In plain words
What is it for?
Finding architecture notes, understanding plugin and marketplace behavior, and following the project's intended conventions.
Why use it?
It gives the agent the project's background, design rules, file locations, and important implementation details.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions .claude-plugin; mentions Claude Code; mentions AGENTS.md.

This is gzb1128/opencode-plugin's own configuration. It tells Codex and OpenCode how to work on opencode-plugin itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything opencode-plugin configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/gzb1128/opencode-plugin/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/gzb1128/opencode-plugin

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for opencode-plugin AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gzb1128/opencode-plugin/agents-md/github.svg)](https://agentmods.dev/instructions/gzb1128/opencode-plugin/agents-md)
Your own site
<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.

agentmods 80×15 button for opencode-plugin AGENTS.md

Your own site · 80×15
<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>
Per session 1,775 This file is loaded in full into every session.
When invoked 1,775 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash d0a77bb94d28, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

AGENTS.md · 148 lines

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 命令来安装和管理插件。

设计原则

  1. 兼容而非替代:我们不重新实现 Claude Code 已有的能力(如 plugin init、plugin validate),让 AI agent 自己完成这些操作更原生
  2. 只做搬运层:CLI 负责 marketplace 发现、plugin 下载/缓存、symlink 管理;不负责 plugin 内容的创建或校验
  3. 对齐 Claude Code 数据格式:marketplace.json、plugin.json 等文件格式兼容 Claude Code 规范
  4. 渐进式实现: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)

Read the full file on GitHub · 148 lines

Changes

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.

  1. 1mo ago Changed · -2 lines · -48 tokens per session d0a77bb94d28
  2. 2mo ago First seen · 150 lines · 1,823 tokens per session scan A 6eddf354c39c

Subscribe to this mod's changes

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.

Related

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).

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,461 tokens

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).

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

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).

microsoft/vscode · 2,750 tokens

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.

denoland/deno · 3,077 tokens