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 skills/znlgis/opengis-skills/opencodenpx skills add znlgis/opengis-skills --skill opencodegit clone --depth 1 https://github.com/znlgis/opengis-skillsWrote 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/skills/znlgis/opengis-skills/opencode)<a href="https://agentmods.dev/skills/znlgis/opengis-skills/opencode"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/opencode.svg" alt="Measured on agentmods" 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.00052 | $0.02667 |
| Opus 5 | $0.00026 | $0.01333 |
| Sonnet 5 | $0.00010 | $0.00533 |
| Haiku 4.5 | $0.00005 | $0.00267 |
Grade D, and why
opencode scanned grade D with 3 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 6d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo pacman -S opencode # Arch Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
curl -fsSL https://opencode.ai/install | bash Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -fsSL https://opencode.ai/install | bash How it starts
The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.
项目地址: https://github.com/anomalyco/opencode
官网 / 文档: https://opencode.ai | 配置 Schema: https://opencode.ai/config.json | TUI Schema: https://opencode.ai/tui.json
许可证: MIT 版本: 迭代快,以本机
opencode --version为准
⚠️ OpenCode 迭代非常快,命令、配置字段与模型名称请以你当前版本的
opencode --help、TUI 内/help及在线 JSON Schema 为准。
概述
OpenCode 是一个以终端为核心的开源 AI 编码智能体(区别于 IDE 内联补全),可读代码、改代码、跑命令、调用工具,自主完成多步开发任务。核心理念是「模型无关 + 配置即代码」:
- 模型无关:基于 AI SDK 与 Models.dev 支持 75+ 提供商,云端(Claude/GPT/Gemini/Qwen)与本地(Ollama/LM Studio/llama.cpp)自由切换。
- 权限系统:每类工具(edit/bash/read/webfetch 等)可设
allow/ask/deny,支持按命令、路径的细粒度规则。 - 上下文与成本可控:自动压缩(compaction)、工具输出裁剪(prune)、小模型分流(
small_model)。 - 配置即代码:
opencode.json、AGENTS.md、自定义命令/Agent/Skill 都是纯文本,可提交进 Git、团队共享。 - 三种形态:TUI(终端交互)、CLI(
opencode run脚本化/CI)、Server/SDK(opencode serve暴露 HTTP API)。 - Git 快照:
/undo、/redo依赖项目为 Git 仓库,可随时撤销 AI 改动。
安装
# 一键安装脚本(最简单)
curl -fsSL https://opencode.ai/install | bash
# 包管理器
npm install -g opencode-ai # Node 生态(npm/bun/pnpm/yarn)
brew install anomalyco/tap/opencode # macOS/Linux 官方 tap(更新最及时)
scoop install opencode # Windows
sudo pacman -S opencode # Arch
mise use -g opencode
nix run nixpkgs#opencode
opencode --version # 验证
Windows 推荐在 WSL 中使用;TUI 在 WezTerm/Alacritty/Ghostty/Kitty 等现代终端渲染更佳。
快速上手
cd your-project # 建议是 Git 仓库(/undo /redo /快照依赖 Git)
opencode # 启动 TUI
TUI 内常用斜杠命令:
/connect # 接入模型提供商(粘贴 API Key;或选 OpenCode Zen 网关)
/models # 选择当前模型
/init # 生成项目级 AGENTS.md(让 OpenCode 了解你的项目)
/undo /redo # 基于 Git 快照撤销/重做 AI 改动
/share # 生成会话分享链接
/help # 查看全部命令
也可用环境变量提供密钥(如 ANTHROPIC_API_KEY、OPENAI_API_KEY),启动时自动识别。
CLI / 无头模式(脚本与 CI)
opencode run "为 utils.ts 补充单元测试并运行" # 单次执行
opencode run -m anthropic/claude-sonnet-4-5 "重构登录模块"
opencode serve --port 4096 # 启动 HTTP Server(配合 SDK)
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.
- 6d ago First seen · 227 lines · 52 tokens per session scan D 13ba0ff2b548
opencode is a skill published in the GitHub repository znlgis/opengis-skills (58 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 2,667 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
senpi-qa
Manual QA harness for the senpi coding agent itself. MUST USE after changing packages/ai, packages/agent, packages/coding-agent, or packages/tui — a green typecheck and npm test are NOT QA. Drives the real CLI from source in an isolated sandbox (never touches /.senpi or real credentials) across four channels: remote…
tmux-manual-qa
Run a single manual tmux-based QA scenario for the todo continuation feature against the real CLI (./pi-test.sh) in an interactive TUI. Captures scrollback, asserts deterministic pass/fail count markers, and cleans up test fixtures. Use only for the manual-qa milestone features.
merge-upstream
Sync a fork branch with an upstream remote using a history-preserving merge. Use this whenever the user says /merge-upstream, merge upstream, sync upstream, sync fork, or wants upstream changes integrated without rebasing or force-pushing.
coding-agent-extension-worker
Implements a single feature in the pi-mono todotools builtin extension work. Use for refactoring, continuation runtime, config resolver, prompt builder, test authoring, golden snapshots, CHANGELOG entries, and harness helpers. Does NOT do manual tmux QA.
release-publish
Release, publish, CalVer tag push, npm publish, 배포, 릴리즈 for senpi. Use for the canonical release flow, GitHub tag/release publication, and npm publishing.
gpt-image-gen
MUST read before generating images. Detailed prompt-crafting guide for gpt-image models, covering tool routing (native imagegeneration server tool vs the generateimage tool), prompt structure from subject to background, verbatim text rendering, anti-patterns, and the revisedprompt feedback loop for iteration.