by wesammustafa
Master OpenCode, the open-source AI coding agent — setup, agents, skills, plugins, MCP, Zen & headless CI.
# Add to your Claude Code skills
git clone https://github.com/wesammustafa/opencode-primerGuides for using ai agents skills like opencode-primer.
Last scanned: 7/6/2026
{
"issues": [
{
"file": "README.md",
"line": 14,
"type": "remote-install",
"message": "Install command (remote install script piped to a shell — review the source before running): \"curl -fsSL https://opencode.ai/install | bash\"",
"severity": "low"
}
],
"status": "PASSED",
"scannedAt": "2026-07-06T08:19:23.087Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}opencode-primer is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by wesammustafa. Master OpenCode, the open-source AI coding agent — setup, agents, skills, plugins, MCP, Zen & headless CI. It has 336 GitHub stars.
Yes. opencode-primer passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/wesammustafa/opencode-primer" and add it to your Claude Code skills directory (see the Installation section above).
opencode-primer is primarily written in JavaScript. It is open-source under wesammustafa on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh opencode-primer against similar tools.
No comments yet. Be the first to share your thoughts!
Everything you need to know about OpenCode — from your first prompt to custom agents, skills, plugins, and MCP integrations. Clear mental models, real examples, every fact verified against the current release.
curl -fsSL https://opencode.ai/install | bash
Who this is for: Developers using (or about to use) OpenCode. Beginners get a guided path; power users get depth on Custom Commands, Skills, Plugins, MCP, and Agents.
⚖️ Not affiliated with the OpenCode team. This is a community-maintained guide. For canonical sources, check opencode.ai/docs and github.com/anomalyco/opencode.
💡 Pro Tip: If this guide saves you an afternoon, a ⭐ helps other developers find it.
| You are… | Start with | Time |
|---|---|---|
| 🚀 New to OpenCode | What is it → Setup → Prompt Engineering | ~15 min |
| ⚡ Already using it | Custom Commands · Skills · Plugins · MCP | ~20 min each |
| 🧠 Configuring or headless | Agents · Headless & CI · Models & Providers | varies |
OpenCode is an open-source AI coding agent — a terminal app (TUI), desktop app, and IDE extension that reads your repo, runs commands, edits files, and talks to any LLM you point it at. Maintained by Anomaly, MIT-licensed — and as of July 2026 the most-starred coding agent on GitHub (182K+ stars), with 8M monthly users by the founder's count.
Three things it does that a chat UI can't:
read/grep/glob tools.edit/write/apply_patch, then bash to run your tests, linter, or build on the spot.Three interfaces:
| Surface | Command | When |
|---|---|---|
| TUI (default) | opencode |
Interactive day-to-day work in your terminal |
| CLI / headless | opencode run "<prompt>" |
Scripts, CI jobs, one-shot prompts |
| Server | opencode serve or opencode web |
Headless API, web UI, or remote attach |
opencode # start TUI in the current repo
opencode run "fix the failing test in src/api.test.ts"
opencode serve --port 4096 # headless server
OpenCode sits in the same space as Claude Code, Codex CLI, and Cursor — same problem, different trade-offs. None is universally better; pick the one whose model, surface, and ecosystem fit your workflow. (The field consolidated hard in 2026: Gemini CLI was retired in June in favor of the closed-source Antigravity CLI, and Roo Code shut down in May.)
⚠️ AI-coding caveat: OpenCode (like every coding agent) can produce wrong code, miss edge cases, hallucinate APIs, and over-apply patterns. You're still the reviewer. Read diffs before accepting, run tests, and don't auto-approve destructive operations on code you care about.
| Limitation | Detail |
|---|---|
| No inline editor completion | OpenCode is a conversational agent, not Copilot-style autocomplete. For ghost-text-while-you-type, reach for Copilot, Cursor Tab, Windsurf (formerly Codeium), or Supermaven — or alongside. |
| Quality depends on the underlying model | OpenCode doesn't replace the LLM's reasoning. If your task fails on Sonnet, switching to OpenCode won't fix it. |
| Provider-agnostic ≠ provider-equivalent | Some models tool-call better than others. A slug swap isn't free. |
| TUI on slow SSH / minimal terminals | The TUI uses truecolor and complex layouts. Degrades over slow connections. opencode serve + attach or opencode run are better for those cases. |
| Plugins run arbitrary code | Any plugin — local or npm — has full user permissions. Audit before installing. |
| Free Zen models are time-limited | The Zen docs call them "available for a limited time." Don't build production on them. |
| Docs lag shipping | OpenCode moves fast. This guide and even the official docs occasionally trail the actual binary. |
| Not a substitute for code review | Diff-aware edits + passing tests don't guarantee correct, secure, or maintainable code. Treat AI output as a junior teammate's PR. |
When something else fits better:
OpenCode's trade-off: flexibility and openness over polish and single-vendor integration. Worth it for many use cases; not all.
⏱️ 5 minutes from zero to first AI-assisted commit.
curl -fsSL https://opencode.ai/install | bash
Other supported installers (pick whichever you already use):
npm i -g opencode-ai@latest # npm / pnpm / yarn / bun all work
brew install anomalyco/tap/opencode # macOS / Linux
scoop install opencode # Windows
choco install opencode # Windows
sudo pacman -S opencode # Arch
paru -S opencode-bin # Arch (AUR)
mise use -g github:anomalyco/opencode # mise users
docker run -it --rm ghcr.io/anomalyco/opencode # Docker
A desktop app for macOS / Windows / Linux is in beta at opencode.ai/download.
opencode auth login # interactive provider picker
opencode auth list # see who you're signed in to
Or from inside the TUI: /connect. Provider options covered in the next section.
cd ~/your-project
opencode
Try one of these:
explain what this codebase doesadd a README section about installationfind and fix the failing test in src/api.test.tsAGENTS.md/init
/init generates an AGENTS.md — your project's "house rules" that OpenCode reads every session. Commit it. More in Prompt Engineering.
📝 Coming from Claude Code? OpenCode reads
CLAUDE.mdas a fallback if noAGENTS.mdexists. Disable withOPENCODE_DISABLE_CLAUDE_CODE=1once migrated.
This repo's own .opencode/ directory is a working example:
| Path | What it does |
|---|---|
.opencode/agents/ |
Custom agent definitions (markdown + YAML) |
.opencode/commands/ |
Custom slash commands |
.opencode/plugins/ |
Working JS plugins (audit log, secret blocker) |
.opencode/skills/ |
Agent skills with SKILL.md files |
AGENTS.md |
Project instructions OpenCode reads every session |
opencode.json |
Project config with safe defaults |
OpenCode is provider-agnostic. Four ways to plug in a model — pick whichever fits your accounts, budget, and privacy posture:
| Best for | Trade-off | |
|---|---|---|
| Direct providers (Anthropic, OpenAI, Google, Groq, OpenRouter, AWS Bedrock, Azure) | You already have credits with a provider | Manage one key per provider |
| OpenCode Zen — pay-as-you-go gateway | One key, curated lineup, no commitment | Pricier per token than going direct in some cases |
| OpenCode Go — flat-rate subscription | Predictable $10/month, zero key management | Curated open models only, usage limits |
| Local models (Ollam |