# OpenCode’s Build agent, making a desert bazaar’s art

> OpenCode can make your game’s art from the terminal: plan the assets with its Plan agent, let Build call the asset tool, and keep the notes in AGENTS.md.

- URL: https://tyrbo.ai/ai-game-assets-for-opencode
- Title: AI Game Assets for OpenCode: Plan and Build Agents
- Language: English (en)
- Updated: 2026-11-26

OpenCode comes with two main agents you switch between: Plan, which looks and suggests without changing files, and Build, which edits and runs commands. Add the asset server with its own `mcp add` command, or let Build reach `asset` through its shell tool, and the same session that writes your game can draw it. Here that means a cel shaded bazaar, a hooded rogue with idle and walk clips, a stone well as a turning sprite stack, and a title screen to close.

Send this to your agent

```
Set up Tyrbo asset gen for me so I can make my game's art, sprite sheets, animated characters, 3D models, UI and sound from here, all in one look.
1. Install the CLI: run `npm install -g @tyrbo/asset` (Node 20.11 or later).
2. Add the skill: in Claude Code, run `claude plugin marketplace add https://cdn.jsdelivr.net/npm/@tyrbo/asset/.claude-plugin/marketplace.json`, then `claude plugin install tyrbo-asset@tyrbo`. In another MCP client, add the MCP server `npx -y @tyrbo/asset mcp`. In any other agent, read `asset --help` before the first call.
3. Check it, free: in an empty scratch folder, not my game's, run `asset look grove "hand-painted fantasy forest, soft dappled light" --view top-down --mock`. It needs no key and writes stand-in files there.
4. Authenticate: ask me to make an asset key at https://app.tyrbo.ai/?from=/asset-generator#/settings/assets (Settings, Asset gen) and to run `asset login` in my own terminal, pasting the key there. Never ask me for the key in chat, and never run `asset login` yourself. Once I have, run `asset spend` to see it works.
Once that's done, let me know when it's ready.
```

[Get an asset key](https://app.tyrbo.ai/?from=/asset-generator#/settings/assets)[Read the docs](https://tyrbo.ai/asset-generator/docs)

## Set it up in OpenCode

1. **Install the CLI** Install the asset command (Node 20.11 or later). `npm install -g @tyrbo/asset`
2. **Add the MCP server to OpenCode** Run its own command, which writes the server into opencode.json in the project (the command below writes it). `opencode mcp add tyrbo-asset -- npx -y @tyrbo/asset mcp`
3. **Try it free** In an empty scratch folder, a mock call checks the setup with no key: it writes stand-in files and spends nothing. `asset look grove "hand-painted fantasy forest, soft dappled light" --view top-down --mock`
4. **Log in in your own terminal** Make an asset key in the Tyrbo app (Settings, Asset gen) and paste it into asset login yourself. The agent never asks for the key and never runs the login. `asset login`

OpenCode’s own docs, read November 25, 2026:

- [https://opencode.ai/docs/mcp-servers/](https://opencode.ai/docs/mcp-servers/)
- [https://opencode.ai/docs/tools/](https://opencode.ai/docs/tools/)

## The commands

```
asset look bazaar "cel-shaded desert bazaar, bold outlines, flat bright colours" --view isometric
asset character rogue "a nimble rogue in a fitted hooded tunic and leather boots" --view isometric --clips idle,walk
asset stack well "a round stone well with a little wooden roof and a bucket" --view top-down
asset startscreen "the bazaar at dusk, lanterns lit" --title "Sandmarket"
```

## Made by the CLI, not drawn for this page

Real files the asset CLI wrote, each under the command that made it.

![An isometric cel-shaded desert bazaar: awnings, a camel, a fountain and stalls](https://tyrbo.ai/asset-gen/bazaar/bazaar.webp)

### See prompt

`asset look bazaar "cel-shaded desert bazaar, bold outlines, flat bright colours" --view isometric`

![A rogue in a red hood and a fitted tunic, seen isometric](https://tyrbo.ai/asset-gen/bazaar/rogue.webp)

### See prompt

`asset character rogue "a nimble rogue in a fitted hooded tunic and leather boots, twin daggers sheathed" --view isometric --clips idle,walk --facings down --takes 3`

![The stone well’s 26 pixel slices spread apart, coming together into the well, then turning round](https://tyrbo.ai/asset-gen/yard/well-slices.webp)

### See prompt

`asset stack well "a round stone well with a little wooden roof and a bucket" --view top-down`

## Let Plan write the shopping list

Switch to Plan and ask it what art the game needs and in what order. Because Plan cannot run anything, it is a cheap place to argue about camera, palette and names. Its answer should open with the look, since everything after is asked in it, and close with `asset startscreen`, which reads the finished art and interface to design the title. Then switch to Build and say “go”.

## AGENTS.md and permissions

OpenCode reads `AGENTS.md` for project instructions, and `/init` can start one for you. Add the agent block from the [docs](https://tyrbo.ai/asset-generator/docs) to it so Build knows the tool and checks `asset --help` for flags rather than guessing.

OpenCode’s shell tool is permission gated, so you choose whether a command waits for you. A comfortable setup lets `--mock` calls through and keeps real ones asking. The MCP tool takes the words after `asset` plus the game’s folder and will not run `asset login`; that one is yours, typed into your own terminal with the key pasted there.

## Reading what Build gets back

One JSON line per call lists every file written, so Build can load `bazaar.png`, the rogue’s sheet and `rogue.anim.json`, and the well’s `well-sheet.png` with its slices, without searching. The stack can be drawn turning in place, and it also writes `well.glb` should the game go 3D later. When a call is refused, stderr says why and the exit code is 1, which Build treats like any failed command.

Credits are guarded the same way on both paths: a quote before each paid call, a refusal if the balance is short, the cache for repeats at no charge, and `asset spend` for the figure.

## Questions people ask

### Why use OpenCode’s mcp add command and not edit the file?

Its config shape changed between versions. The command writes the entry in whatever shape your installed version reads.

### Can the Plan agent make assets?

It is meant for looking and proposing, so leave the calls to Build. Plan is where you agree on the list and the names first.

### What does the sprite stack cost?

From words, a cheap model writes its recipe for about a tenth of a cent. Editing that recipe and building it again is free.

## For your coding agent

- [Game assets for Claude Code](https://tyrbo.ai/ai-game-assets-for-claude-code)
- [Game assets for Cursor](https://tyrbo.ai/ai-game-assets-for-cursor)
- [Game assets for Codex](https://tyrbo.ai/ai-game-assets-for-codex)
- [Game assets for Gemini CLI](https://tyrbo.ai/ai-game-assets-for-gemini-cli)
- [Game assets for Cline](https://tyrbo.ai/ai-game-assets-for-cline)
- [Game assets for Kilo Code](https://tyrbo.ai/ai-game-assets-for-kilo-code)
- [Game assets for Roo Code](https://tyrbo.ai/ai-game-assets-for-roo-code)
- [Game assets for Windsurf](https://tyrbo.ai/ai-game-assets-for-windsurf)
- [Game assets for GitHub Copilot](https://tyrbo.ai/ai-game-assets-for-github-copilot)
- [Game assets for Zed](https://tyrbo.ai/ai-game-assets-for-zed)
- [Game assets for Aider](https://tyrbo.ai/ai-game-assets-for-aider)
- [Game assets with Ollama](https://tyrbo.ai/ai-game-assets-with-ollama)

## More from the asset generator

- [Asset generator](https://tyrbo.ai/asset-generator)
- [Docs](https://tyrbo.ai/asset-generator/docs)
- [Top-down RPG character sprite sheet](https://tyrbo.ai/top-down-rpg-character-sprite-sheet)
- [AI 3D model generator for games](https://tyrbo.ai/ai-3d-model-generator-for-games)
- [Auto-rig a 3D model for games](https://tyrbo.ai/auto-rig-3d-model-for-games)
- [Game UI generator](https://tyrbo.ai/game-ui-generator)
- [AI sprites for Godot](https://tyrbo.ai/ai-sprites-for-godot)
- [Pixel art asset generator](https://tyrbo.ai/pixel-art-asset-generator)

## Install it, then ask for the look.

[Get an asset key](https://app.tyrbo.ai/?from=/asset-generator#/settings/assets)

Make a key in the Tyrbo app, then run asset login. Add --mock to try any command free first.

---

This is the Markdown version of https://tyrbo.ai/ai-game-assets-for-opencode, from Tyrbo (The AI game engine). Cite and link the page itself. Every page: https://tyrbo.ai/llms.txt