Credentials. Any model or provider credentials you configure for OpenCode are used by the agent, so keep them out of shared project files.
Who it is forA developer who just joined a project or inherited a repo and needs to understand it before changing anything.
The problemPointing a coding agent at unknown code is risky when it can edit files or run commands right away.
The outcomeA written summary of how the codebase is structured and a short change plan, with no files edited.
What you need first
- A terminal on macOS, Linux, or Windows, or the desktop app installer for your platform
- One package manager available: npm, bun, pnpm, yarn, or brew
- A local project folder you want the agent to work in
- Configuration for OpenCode as described in the docs at opencode.ai/docs (the README only links to them)
Steps
- Run
npm i -g @opencode/cli@latest(or usebrew install anomalyco/tap/opencode-v2on macOS and Linux). - Change into the project folder and start OpenCode with
opencode. (inferred, check the README) - Press the
Tabkey until the plan agent is selected. - Ask it to map the main modules, entry points, and how the tests are run.
- Ask for a step-by-step plan for your change and review it before switching to the build agent.
Prompt for your agent
Using the OpenCode repo at anomalyco/opencode, start the plan agent in <project-path> and ask it to summarize the code structure and list the files that would need changes for <task>. Expected output: a structured summary plus a numbered change plan. Verify that no files were edited, since the plan agent denies file edits by default.
Caveat. The README names the plan and build agents but does not say which models or providers they use, so check Opencode.ai/docs before relying on a specific setup.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for anomalyco/opencode and "Explore an unfamiliar codebase without risking edits"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer