{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreihtl6o6khgn753rca7vpjx2t5nfslrln3pjfxxi5g4i754bvz5htq",
    "uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3mp3jmigvcvw2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreidzn62wnh2awl7shnut64q45r7di3qazjde37szya3tfmbhgt2nwa"
    },
    "mimeType": "image/webp",
    "size": 80394
  },
  "path": "/_cbd692d476c5faf3b61bcf/opencodes-5-hidden-uses-the-178k-star-terminal-ai-agent-that-swaps-providers-mid-session-2e55",
  "publishedAt": "2026-06-25T03:06:41.000Z",
  "site": "https://dev.to",
  "tags": [
    "agents",
    "ai",
    "cli",
    "opensource",
    "Headroom's 5 Hidden Uses: Context Compression Layer",
    "Pydantic AI Agent Framework's 5 Hidden Uses",
    "Superpowers Agentic Skills Framework: 5 Hidden Uses",
    "@my-org",
    "@he-yufeng",
    "@general"
  ],
  "textContent": "What if your terminal AI agent could talk to 30+ LLM providers, run isolated background tasks, load custom plugins from npm, and authenticate to MCP servers — all from a single `npm install`?\n\nOpenCode is a 178,218-star open source AI coding agent built in TypeScript. It crossed 1,274 points on Hacker News in March 2026, and its latest release (v1.17.10, June 24 2026) added MCP resource templates, OAuth-bound callbacks, and a new `--mini` CLI mode. Most developers use it as a Claude Code alternative in the terminal — but scratch the surface and you'll find a plugin ecosystem, multi-agent architecture, and provider abstraction that go far beyond autocomplete.\n\nIn 2026's landscape of AI coding tools, where Cursor, Claude Code, Codex CLI, and Goose all compete for developer mindshare, OpenCode stands out by being completely open source (MIT license), provider-agnostic (30+ providers including self-hosted), and built around an extensible plugin + skill + MCP architecture. Here are five hidden uses that most people miss.\n\n##  Hidden Use #1: Multi-Provider Fallback with Custom Providers\n\n**What most people do:** Use OpenCode with a single API key — Anthropic, OpenAI, or whatever they have.\n\n**The hidden trick:** OpenCode's provider plugin system supports 30+ providers out of the box, including Anthropic, OpenAI, Google, DeepSeek, Mistral, Groq, TogetherAI, OpenRouter, GitHub Copilot, GitLab, Snowflake Cortex, and many more. You can configure multiple providers with different models and switch between them mid-session using the `/model` command. Even better, you can add custom OpenAI-compatible providers pointing to self-hosted models (Ollama, vLLM, LM Studio).\n\n\n\n    # Configure OpenCode with a custom provider for local Ollama\n    opencode config set providers.ollama.baseUrl \"http://localhost:11434/v1\"\n    opencode config set providers.ollama.models '[{\"id\":\"llama3.3\",\"name\":\"Llama 3.3 70B\"}]'\n\n    # Switch between providers in-session\n    # Just type: /model ollama/llama3.3\n    # Or: /model anthropic/claude-sonnet-4-20250514\n\n\n**The result:** Your coding agent becomes provider-agnostic. When Anthropic rate-limits you, switch to DeepSeek. When you need a cheap model for exploration, use Groq. When you need to run on-prem, point to your Ollama instance — all without leaving the session.\n\n**Data sources:** OpenCode GitHub 178,218 Stars, HN 1,274 pts/618 comments (story 47460525), 30+ provider plugins confirmed from repo tree (packages/core/src/plugin/provider/*.ts).\n\n##  Hidden Use #2: Plugin Ecosystem — npm Packages as Agent Extensions\n\n**What most people do:** Use OpenCode as-is, with its built-in features.\n\n**The hidden trick:** OpenCode has a full plugin system. You can install plugins from npm packages, load custom ones from directories, or write your own. Plugins can add custom agents, commands, providers, and even inject system context. The plugin lifecycle supports installation, loading, hot-reloading, and sandboxing.\n\n\n\n    # Install a plugin from npm\n    opencode plugin install @my-org/opencode-custom-agent\n\n    # Load a local plugin from a directory\n    opencode --plugin ./my-custom-plugin/\n\n    # List installed plugins\n    opencode plugin list\n\n\nPlugins are written in TypeScript and can register:\n\n  * Custom agents (with their own system prompts and tool sets)\n  * Custom slash commands (e.g., `/review-pr`, `/deploy-staging`)\n  * Custom LLM providers (pointing to any OpenAI-compatible API)\n  * Custom tools (via MCP server integration)\n\n\n\n**The result:** You can extend OpenCode with domain-specific capabilities — a `/run-migrations` command that knows your database schema, a code-review agent tuned to your team's conventions, or a deployment plugin that wraps your CI/CD pipeline.\n\n**Data sources:** OpenCode v1.17.10 release notes (2026-06-24), plugin system confirmed in repo tree (packages/plugin/src/v2/_, packages/core/src/plugin/_).\n\n##  Hidden Use #3: MCP OAuth — Authenticated Tool Use with External Services\n\n**What most people do:** Use MCP servers with either no auth or static API keys pasted into config.\n\n**The hidden trick:** OpenCode supports full MCP OAuth flows. When you connect to an MCP server that requires OAuth (e.g., GitHub, Slack, Jira), OpenCode opens a browser-based OAuth flow, handles the callback on an IPv4 loopback server (bound for security in v1.17.10), and manages token refresh automatically. This means you can use GitHub's MCP server to create issues, read PRs, and manage repositories — all through natural language in your terminal.\n\n\n\n    # Add an MCP server with OAuth support\n    opencode mcp add github --url https://api.github.com/mcp\n\n    # OpenCode will prompt OAuth login in browser\n    # After auth, you can say:\n    # \"Create a PR from my current branch to main with title 'Fix auth bug'\"\n    # \"List all open issues assigned to me\"\n\n\n**The result:** Your terminal agent becomes a bridge to external services with proper authentication. No more pasting tokens into config files — OAuth handles it securely with automatic refresh.\n\n**Data sources:** OpenCode v1.17.10 release notes — \"Bound MCP OAuth callbacks to IPv4 loopback for better local auth reliability\" (@he-yufeng), MCP auth system confirmed in packages/opencode/src/mcp/auth.ts.\n\n##  Hidden Use #4: Background Sub-Agents and the Plan/Build Architecture\n\n**What most people do:** Use OpenCode's default \"build\" agent for everything.\n\n**The hidden trick:** OpenCode ships with two built-in agents: **build** (full access, default) and **plan** (read-only, asks permission before running commands). You switch between them with the Tab key. The plan agent is perfect for exploring unfamiliar codebases, analyzing architecture, or planning refactors — without risk of accidental edits. Additionally, OpenCode supports background sub-agents that run in parallel. You can spawn a `@general` sub-agent for complex searches while continuing to code in the main session.\n\n\n\n    # Start OpenCode\n    opencode\n\n    # Press Tab to switch between build and plan agents\n    # In plan agent: \"Analyze the authentication flow in this codebase\"\n    # In build agent: \"Refactor the auth module to use the new token format\"\n\n    # Spawn a sub-agent for background work\n    # Type: @general search for all TODO items related to error handling\n    # Continue coding while sub-agent works\n\n\n**The result:** The plan agent acts as a safe exploration mode — you can hand it to a junior developer or use it in CI pipelines where you want analysis without modifications. Background sub-agents let you parallelize research and coding, effectively turning your terminal into a multi-agent workspace.\n\n**Data sources:** OpenCode README (dev branch) — \"build agent (full-access) / plan agent (read-only, asks permission)\", HN 319pts story \"Opencode: AI coding agent, built for the terminal\" (id 44482504).\n\n##  Hidden Use #5: Skills System — Reusable Prompt Templates as Code\n\n**What most people do:** Type the same instructions repeatedly (\"write tests\", \"review this PR\", \"check for security issues\").\n\n**The hidden trick:** OpenCode has a built-in skills system. Skills are markdown files (`.md`) stored in `.opencode/skills/` that define reusable prompt templates. You can invoke them with `/skill-name`, and they support frontmatter configuration for customization. OpenCode ships with built-in skills like `customize-opencode` and `effect`, and you can create your own.\n\n\n\n    # .opencode/skills/review-security.md\n    ---\n    name: review-security\n    description: \"Security-focused code review\"\n    tools: [read, list, grep]\n    ---\n\n    Review the current file for security vulnerabilities:\n    1. Check for SQL injection patterns\n    2. Look for hardcoded secrets or API keys\n    3. Verify input validation on all user-facing endpoints\n    4. Flag any use of eval() or dynamic imports\n\n\n\n    # Invoke the custom skill\n    /review-security\n\n    # Or use built-in skills\n    /customize-opencode  # OpCode's own configuration wizard\n\n\n**The result:** Skills turn repeated instructions into shareable, version-controlled templates. Your team can maintain a library of skills in the repo, and every developer on the team gets the same consistent behavior — no more copy-pasting prompts or forgetting steps in code reviews.\n\n**Data sources:** OpenCode repo tree — `.opencode/skills/effect/SKILL.md`, `packages/core/src/skill/*`, `packages/opencode/src/skill/discovery.ts`, v1.17.10 release notes mentioning skill base directories.\n\n##  Summary: 5 Hidden Uses of OpenCode\n\n  1. **Multi-Provider Fallback** — Switch between 30+ LLM providers mid-session, including self-hosted models\n  2. **Plugin Ecosystem** — Extend the agent with npm packages, custom agents, and domain-specific commands\n  3. **MCP OAuth** — Authenticate to external services (GitHub, Slack, Jira) via browser-based OAuth flows\n  4. **Plan/Build Architecture** — Use read-only plan agents for safe exploration and background sub-agents for parallel work\n  5. **Skills System** — Create reusable, version-controlled prompt templates for consistent team workflows\n\n\n\n##  Previously on This Series\n\nIf you enjoyed this article, check out previous entries in the \"5 Hidden Uses\" series:\n\n  * Headroom's 5 Hidden Uses: Context Compression Layer\n  * Pydantic AI Agent Framework's 5 Hidden Uses\n  * Superpowers Agentic Skills Framework: 5 Hidden Uses\n\n\n\nHave you discovered a hidden use for OpenCode — a plugin, skill, or workflow that most people don't know about? Drop it in the comments below!",
  "title": "OpenCode's 5 Hidden Uses: The 178K-Star Terminal AI Agent That Swaps Providers Mid-Session"
}