GitHubLoslegen

Diese Seite ist noch nicht auf Deutsch übersetzt und wird daher auf Englisch angezeigt.

Leitfäden

Agent Skill

The repository publishes an Agent Skill at skills/nsgo-game so coding agents know how to scaffold, build, test, inspect and drive NSGo games using the go tool game CLI, plain-text YAML formats and the game/mcp tool suite.

Install

Claude Code and Codex install the skill, an onboarding skill (skills/nsgo-game-onboarding) and both local MCP servers in one step from this repository's plugin: nsgo-game-editor runs go tool game mcp (the editor) and nsgo-game runs go tool nsgo mcp (the running game), both in the project directory. In Claude Code:

/plugin marketplace add nsgo-dev/game
/plugin install nsgo-game@nsgo-dev

In Codex, add the nsgo-dev/game repository as a plugin marketplace (.agents/plugins/marketplace.json) and install nsgo-game from it. The manifests are .claude-plugin/plugin.json and .codex-plugin/plugin.json.

The onboarding skill keeps unrelated MCP servers, installs only what is missing, and proves the editor connection with a read-only selection_get call instead of reporting success because a configuration file exists. For an agent without the plugin, go tool game mcp prompt -host claude|codex|other prints a setup prompt with the same steps to paste into it (game mcp), and the Connect dialog's Copy setup prompt button copies the host-neutral prompt directly.

Manual install

Install the skill with bunx skills add:

bunx skills add nsgo-dev/game

Pair it with NSGo's own nsgo skill for core UI primitives, signals, nsgotest and go tool nsgo:

bunx skills add nsgo-dev/nsgo

To let an agent inspect and drive a running game live, register both project MCP servers:

go tool game mcp install

What the skill covers

  • SKILL.md: project rules (Go only, plain-text versioned YAML formats, go tool nsgo check/test, stability tiers), quick-start CLI workflow, minimal game.Loop + mcp.Attach wiring, and the deterministic MCP verification loop.
  • references/packages.md: complete grouped catalog of every package in github.com/nsgo-dev/game, with import paths and stability status matching API Stability.
  • references/cli-and-formats.md: all go tool game subcommands (Command Reference), companion module tools, the YAML format contract (File Formats), JSON Schemas (Schemas) and native external formats (Tiled, LDtk, Aseprite, TexturePacker, BMFont, glTF, Yarn).
  • references/mcp-tools.md: mcp.Bridge setup (mcp) and the full tool catalog covering scene/entity inspection, fixed-step loop control, game-coordinate input, live spawning and component editing, screenshots with diagnostic overlays, debug console tunables, input recording/replay, performance telemetry and live asset hot reload.

Typical agent workflow

  1. Scaffold with go run github.com/nsgo-dev/game/cmd/game@latest new and add building blocks with go tool game generate, go tool game assets and go tool game check.
  2. Before building or releasing, run go tool game doctor -json and fix every error finding. The JSON finding objects are suitable for an agent or editor to parse.
  3. Attach mcp.Bridge on the game's *core.Scope and run go tool nsgo dev -automation (or nsgotest.Start in tests).
  4. Drive reproducible checks through MCP: pause with game_loop_pause, seed with game_loop_seed, inject inputs or spawn entities, advance synchronously with game_loop_step, inspect entities with game_entities_list / game_entity_inspect / game_component_get, and capture overlays with game_screenshot.

New project agent files

Every starter template includes AGENTS.md with the project rules and commands an agent should run, plus CLAUDE.md importing it for Claude Code. After creating a project, use go tool game mcp install to configure the editor and game MCP connections, then run the relevant go tool nsgo check and go tool nsgo test commands before changing code.

Diese Seite bearbeiten