# Set up a browser game with any coding agent, from one link

Give your coding agent this, and it sets up a debuff game from nothing:

```text
Set up debuff for me by following https://debuff.jp/skill.md
```

The link is an [Agent Skill](https://agentskills.io/specification), plain Markdown with a short header, and it works the same in Claude Code, Codex, Cursor, Gemini CLI, VS Code Copilot and Windsurf. The agent checks Node, scaffolds a game, connects the debuff MCP server for whichever agent it is, and runs `debuff doctor` when something fails. At the end it can run the game, see the frames and drive the input, rather than guessing from code.

## What the agent does

1. Checks for Node 22 or newer. If it's missing, the agent asks you to install it rather than installing it for you.
2. Asks what you want to make, if you haven't said, and picks a template: a moving character, a top-down world, an isometric grid, a side-scroller or a point-and-click room, or one of three finished small games to learn from.
3. Runs `npm create debuff@latest my-game`, `npm install` and `npx debuff doctor --fix`, which checks the setup and applies the safe fixes.
4. Connects the MCP server for its own app, then calls the `doctor` tool and `inspect_project` to check that it worked.

## Connecting the MCP server is the fiddly part

The server is the same everywhere, `npx -y @debuffjp/mcp`, run from the project folder. Every agent wants it added differently:

| Agent | How |
| --- | --- |
| Claude Code | Reads `.mcp.json`, which every template ships, or `claude mcp add debuff -- npx -y @debuffjp/mcp` |
| Codex CLI | `codex mcp add debuff -- npx -y @debuffjp/mcp` |
| Gemini CLI | `gemini mcp add debuff npx -y @debuffjp/mcp` |
| Cursor | `.cursor/mcp.json`, under `mcpServers` |
| VS Code (Copilot) | `.vscode/mcp.json`, under `servers` (not `mcpServers`), with `"type": "stdio"` |
| Windsurf | Its MCP settings, with command `npx` and args `-y @debuffjp/mcp` |

The skill carries this table, so the agent looks up its own row instead of you finding the right docs page. On Windows, where some agents can't start `npx` directly, it knows to use `cmd /c npx -y @debuffjp/mcp`.

## Three ways to use the link

- **Paste it into a chat**, as above. The agent reads the page once and follows it.
- **Install it as a skill**, so the agent has it in every session, with the open [skills](https://github.com/vercel-labs/skills) installer (command below).
- **Install the plugin** in Claude Code or Codex, which adds the MCP server and every debuff skill at once: see [Working with AI agents](/docs/agents).

To install it as a skill:

```bash
npx skills add https://debuff.jp/skill.md
```

Agents that look for skills on their own can find this one too: debuff.jp lists its skills at `/.well-known/agent-skills/index.json`, the discovery path in the Agent Skills spec.

## After setup, the project keeps its own instructions

Every new project carries skills written for its own debuff version, in `.claude/skills/` for Claude Code and `.agents/skills/` for Codex, Gemini CLI, Cursor and Copilot. They describe the debuff the project installed, not the newest one. After you upgrade, `npx debuff doctor --fix` notices they're stale and rewrites them, and `npx debuff upgrade` does the whole upgrade in one step (from 0.21).

When a command fails later, the skill tells the agent how to read it. The exit code says what to do next: 1 means a run failed, 2 means the setup needs fixing (run `doctor`, don't retry), and 3 means the command line was wrong. With `--json`, a failure comes back as one JSON error with a stable code and a fix. We measured how other CLIs handle this in [What a coding agent needs from a CLI failure](/research/what-agents-need-from-cli-failures).

## Creative calls stay with you

The skill ends the same way every debuff guide for agents does: art, feel, difficulty and names are the human's call, so the agent proposes options and lets you choose.

Try it in whichever agent you use:

```text
Set up debuff for me by following https://debuff.jp/skill.md
```