一键导入
pokemon-player
Play Pokémon games via headless emulation. Start a game server, read game state, make strategic decisions, and send actions — all from the terminal.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Play Pokémon games via headless emulation. Start a game server, read game state, make strategic decisions, and send actions — all from the terminal.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | pokemon-player |
| description | Play Pokémon games via headless emulation. Start a game server, read game state, make strategic decisions, and send actions — all from the terminal. |
| tags | ["gaming","pokemon","emulator","pyboy","gameplay"] |
| triggers | ["play pokemon","pokemon game","start pokemon","play pokemon red","play pokemon firered","pokemon firered","pokemon red","play gameboy"] |
Play Pokémon games autonomously via headless emulation. Uses the pokemon-agent
package to run a game server, then interacts via HTTP API.
# Install the package + emulator + dashboard
pip install pokemon-agent[dashboard] pyboy
# User must provide their own ROM file
# The agent CANNOT download or distribute ROMs
Ask the user for the ROM file path if not provided. Common locations:
~/roms/pokemon_red.gb~/pokemon_red.gb# Start the game server as a background process
pokemon-agent serve --rom <ROM_PATH> --port 8765 &
# Verify it's running
curl -s http://localhost:8765/health
Tell the user: "Dashboard available at http://localhost:8765/dashboard"
The single biggest mistake an agent makes is guessing walkability from raw pixels and getting lost. Don't. The server reads the game's own collision data from RAM and hands you a ground-truth map.
# ASCII walkability map of the current screen (text — cheap + exact)
curl -s http://localhost:8765/map/ascii
A B C D E F G H I J
1 # # # # . . . . . .
2 # # # # # . # # # .
3 . . . . . . . . . .
4 . . . . . . . . . .
5 . . . . @ . . . . . <- you are ALWAYS at E5
6 # # # # # # # # # #
7 . . . # . . . . . #
@ you (E5) . walkable # blocked
up=row-1 down=row+1 left=col-1 right=col+1
. = you can step there, # = blocked (tree/fence/wall/water/sign).../state under collision (walkable grid +
ascii string + player_cell).Use the ASCII map to decide WHERE to walk; use a screenshot to identify WHAT things are (NPCs, signs, doors, the Mart's blue roof, the Center's red roof). They complement each other — RAM gives geometry, vision gives meaning.
# Screenshot WITH the labelled grid + green/red walkability tint drawn on it
curl -s "http://localhost:8765/screenshot/grid?scale=4" -o /tmp/pkm_grid.png
# then: vision_analyze on /tmp/pkm_grid.png, referencing cells like "what is at H4?"
Push your reasoning so viewers (and you) can follow the run. Display-only — these are NOT stored in conversation history, so they're free to use often.
B=http://localhost:8765
curl -s -X POST $B/event -d '{"type":"reasoning","text":"At E5, fence blocks south; gap at G6. Heading there."}'
curl -s -X POST $B/event -d '{"type":"decision","text":"Walk right 2 to G5, then down through G6."}'
curl -s -X POST $B/event -d '{"type":"key_moment","description":"Reached Pewter City","category":"milestone"}'
# categories: milestone | badge | catch | alert
A good rhythm each turn: post a short reasoning (what the map/screen shows),
then a decision (the move you'll make), then send the action.
Each turn, follow this cycle:
curl -s http://localhost:8765/state | python3 -m json.tool
curl -s http://localhost:8765/map/ascii # walkability — read this every turn
Parse the JSON to understand:
collision.player_cell = always E5)collision.ascii / /map/ascii — . walkable, # blocked)Priority order:
a_until_dialog_end)Use Hermes memory to track:
PKM:OBJECTIVE: Defeat Brock in Pewter CityPKM:MAP: Viridian Forest has bug catchers, exit north to PewterPKM:STRATEGY: Brock's Onix is weak to Water — use Bubble# Single action
curl -s -X POST http://localhost:8765/action \
-H "Content-Type: application/json" \
-d '{"actions": ["press_a"]}'
# Movement sequence
curl -s -X POST http://localhost:8765/action \
-H "Content-Type: application/json" \
-d '{"actions": ["walk_up", "walk_up", "walk_right", "press_a"]}'
# Advance dialog
curl -s -X POST http://localhost:8765/action \
-H "Content-Type: application/json" \
-d '{"actions": ["a_until_dialog_end"]}'
After each action, the response includes state_after. Check:
If stuck (same state after 3+ actions), try:
| Action | What It Does |
|---|---|
press_a | Press A (confirm, talk, interact) |
press_b | Press B (cancel, run from battle) |
press_start | Open menu |
press_select | Select button |
walk_up/down/left/right | Walk one tile |
wait_60 | Wait ~1 second |
a_until_dialog_end | Mash A until dialog finishes |
hold_a_30 | Hold A for 30 frames |
# Save before important battles
curl -s -X POST http://localhost:8765/save \
-d '{"name": "before_brock"}'
# Load if things go wrong
curl -s -X POST http://localhost:8765/load \
-d '{"name": "before_brock"}'
# List available saves
curl -s http://localhost:8765/saves
Save before: Gym battles, catching rare Pokémon, entering dungeons.
Track these in memory as you complete them:
Use these prefixes in Hermes memory for Pokémon-related entries:
PKM:OBJECTIVE: — Current goalPKM:MAP: — Map/navigation knowledgePKM:STRATEGY: — Battle/team strategy notesPKM:PROGRESS: — Milestone completionPKM:STUCK: — Notes about stuck situations and how they were resolved# Plain frame
curl -s http://localhost:8765/screenshot -o /tmp/pokemon_screen.png
# Frame with the labelled A1..J9 grid + green/red walkability tint (preferred)
curl -s "http://localhost:8765/screenshot/grid?scale=4" -o /tmp/pokemon_grid.png
Use vision_analyze on the grid screenshot when:
Remember: for where can I move, the ASCII collision map (/map/ascii) is
faster and exact. Reserve vision for what things are.
When done playing:
curl -X POST localhost:8765/save -d '{"name": "session_end"}'