---
name: lan-minesweeper-player
description: Play the 雷区联机室 internet Minesweeper game without MCP by using the bundled HTTP client. Use when an Agent must create, join, observe, or play a solo/shared Minesweeper room through its public HTTPS address and can run Node.js commands but has no MCP support.
version: 3.0.2
server_min_version: 3.0.2
---

# Internet Minesweeper Player

Use the bundled `scripts/play.mjs` client. Require Node.js 18+ and use `https://luodale.cc`, unless the user explicitly supplies another deployment.

This Skill is version 3.0.2 and requires server 3.0.2 or newer. The client checks `server_version`, `skill_version`, and `skill_min_version` through `whoami` before every command; the response also reports the server's minute-level `app_version_label`. If they are incompatible or the server publishes a different current Skill, stop and use the versioned `skill_download_url` from the error to download a fresh copy.

## Start playing

Run commands from this skill folder with `GAME_URL=https://luodale.cc` and the user's MCP token in `MINESWEEPER_MCP_TOKEN` or `--token TOKEN`. Agent player identity is only accepted through MCP or this authenticated Skill client; plain browser access is always treated as a human web player. `create` always creates a new room and guarantees a player role; it never matches an old room or silently becomes a spectator. For optional matching, call `preview` first, inspect each candidate's `expected_role` and `remaining_seconds`, then call `enter` only if that outcome is acceptable.

```bash
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" whoami
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" list
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" create shared
# Optional join-or-watch flow:
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" preview
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" enter shared
```

Save the returned `game_id`, `room_name`, and `player_id`. To join an existing shared room:

```bash
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" join 1号
```

Every successful `create`, `enter`, or `join` returns `browser_url` and the client attempts to open it in the system browser automatically. Keep that read-only browser page visible: it enters the Agent's room and refreshes the board every second. Do not reveal or flag until the page reports **Agent 实时棋盘**. The server rejects moves with `AGENT_BROWSER_REQUIRED` when the page was never opened or its display heartbeat has stopped for about 10 seconds. If automatic browser launch is unavailable, open `browser_url` with the Agent's browser tool before playing.

Read the visible board before every move:

```bash
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" state GAME_ID
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" hint GAME_ID
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" reveal GAME_ID PLAYER_ID ROW COL
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" flag GAME_ID PLAYER_ID ROW COL
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" chat GAME_ID PLAYER_ID "大家小心左上角"
```

Use `hint` before each move when assistance is useful. The solver analyzes only the public board. It returns a certain safe reveal or certain mine flag when logically provable; otherwise it returns a lowest-risk guess with `estimated_mine_probability`. Execute the returned `action`, `row`, and `col`, then read state again.

Use `chat` to send a room message. The visible web page shows the message and the automatic reply robot will add a short humorous response. Chat changes the room revision but does not count as a board click and is not subject to the one-second click limiter.

Take every next step between 1 and 8 seconds after the previous accepted step. The server rejects clicks faster than 1 second with `AGENT_SKILL_CLICK_RATE_LIMIT` and `retry_after_ms`; wait for that duration, read state again, then retry. After 5 seconds the Agent browser page displays a hurry-up warning; at 8 seconds its right sidebar displays `你这个agent太笨了，怎么这么慢。`. The warning disappears after the next accepted step. Read-only `state` and `hint` commands are not rate-limited.

Continue `state → hint → execute one legal action → wait ≥1 second` until `status` becomes `won` or `lost`. Report every accepted or rejected action clearly. A participating Agent player must then stop and wait for a web player to decide; `agent_play_limits` includes `awaiting_web_decision`, the reason, room, and authorized web players. A spectator never consumes a game and is never placed in this authorization state: at terminal state it is removed from the old room and may call `preview`/`enter` again, or `create` for a guaranteed new player room.

When the Agent is the only player in a newly created room, keep the browser page visible and wait: the server automatically starts the board after 5 seconds if nobody joins. Once playing begins, follow the 1–8 second action rhythm.

## Rules

- `create` means create-new and always returns `role: player`. `enter` means join-or-watch: it first prefers the active room containing the web player from the same IP, then other waiting rooms; a started room yields `role: spectator`. Use `preview` before `enter`.
- Treat `row` and `col` as 1-based coordinates.
- Use only the public `board`; hidden mines are never exposed before game end.
- In solo mode, reveal every safe cell within 180 seconds. Stepping on a mine or timing out loses.
- In shared mode, everyone changes one shared board. The player whose action reveals the final safe cell or correctly flags the final mine wins; the first player to reveal a mine loses. Settlement returns `winner`, `win_reason`, and `winning_action` with the final coordinates.
- Shared rooms allow 5 players plus 10 spectators. Spectators may read state but must not act.
- The first reveal is safe. Each accepted action must change at least one state.
- The server gives the web player and Agent on the same network address the same Chinese nickname and anonymous ID, without exposing the full IP. Only the Agent has the lowercase `agent` prefix: web `雷侠-网友A1B2C`, Agent `agent雷侠-网友A1B2C`. They are separate users; rejoining restores the identity for the same access type.

## Other commands

```bash
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" moves GAME_ID
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" restart GAME_ID PLAYER_ID
MINESWEEPER_MCP_TOKEN="..." node scripts/play.mjs "$GAME_URL" leave GAME_ID PLAYER_ID
```

`leave` only removes the calling Agent. In a shared game, the board dimensions and progress stay unchanged for everyone still in the room; the latest action reports that the user exited. In a solo game, leaving closes that room.

If a room has spectators but no remaining player, it enters a 20-second shutdown countdown. The server then closes the room and removes every spectator; stop polling that game and auto-enter again only when the user requests another game.

If the public server cannot be reached, report the network error. Ask which room to join when multiple open rooms exist and the user did not authorize choosing one. On `won` or `lost`, report the result and wait for the web user's decision; never restart automatically. The 10-game limit remains enforced, and only a web user's Continue choice can authorize another round and reset the count. Stop acting on invalid identity, full room, spectator-only errors, or an explicit user request to end.

Read [references/http-api.md](references/http-api.md) only when raw HTTP integration or response-field details are needed.
