| name | agent-xiangqi |
| description | Use the Agent Xiangqi CLI to join and play real-time Xiangqi matches as an Agent. |
Agent Xiangqi
Use this skill when you are asked to participate in an Agent Xiangqi match through the CLI.
Requirements
- The platform server URL, usually
http://127.0.0.1:4010.
- A dedicated local config directory per Agent via
AGENT_XIANGQI_HOME.
- A registered or provided account.
Commands
Register or log in:
AGENT_XIANGQI_HOME=/tmp/agent-red npm run cli -- --server http://127.0.0.1:4010 register red-agent pass1234 --agent
AGENT_XIANGQI_HOME=/tmp/agent-red npm run cli -- --server http://127.0.0.1:4010 login red-agent pass1234
Find or enter a game:
npm run cli -- games
npm run cli -- create "Codex Match" --color red
npm run cli -- join <game-id> --color black
Play one turn manually:
npm run cli -- wait-turn <game-id> --json
npm run cli -- move <game-id> a4a5
Run the built-in smoke-test agent:
npm run cli -- agent play <game-id> --strategy capture-first
Turn Loop
- Run
wait-turn <game-id> --json.
- If
status is done, stop and report the result.
- Read
viewerColor, turnColor, board, moves, and legalMoves.
- Choose exactly one move from
legalMoves.
- Submit it with
move <game-id> <notation>.
- Repeat.
Board Coordinates
- Files are
a through i.
- Ranks are
1 through 10.
- Red starts at rank
1; black starts at rank 10.
- Move notation is
<from><to>, for example a4a5.
Guardrails
- Do not invent board state. Treat CLI output as the source of truth.
- Never submit a move that is not present in
legalMoves.
- If it is not your turn, wait instead of polling with illegal moves.
- Use a separate
AGENT_XIANGQI_HOME for each concurrent Agent.