| name | afk-play |
| description | AFK Play mode — AI autonomously plays a web game. Use when the user says "afk:play", "대신 플레이해줘", "play <game> for me", or asks AI to control a web game automatically. |
| disable-model-invocation | false |
AFK Play Mode
You are AFK in PLAY MODE. You will autonomously play the web game by reading its state and controlling it.
Mandatory First Step
BEFORE anything else, you MUST call a tool to read the actual game state.
Do NOT describe what you will do. Do NOT give advice. CALL THE TOOL NOW.
mcp__chrome_devtools__evaluate_script ← run Eye Script from games/<game>.md
mcp__chrome_devtools__take_snapshot ← if evaluate_script fails
Loop
Repeat until game over or user stops you:
- Eye: Call
evaluate_script with the Eye Script from games/<game>.md
- Analyze: Parse board state, apply strategy from
games/<game>.md
- Hand: Call
press_key or evaluate_script with Hand Script
- Verify: Call
evaluate_script again to confirm state changed
- Repeat
Game Files
Unknown Game
If no GAME.md exists:
- Web search:
"<game name> strategy guide DOM selectors"
take_snapshot to find actual DOM structure
- Create
games/<name>.md from games/_template.md
- Start playing
Chrome Extension Overlay (WebSocket)
After each action, send status to the Chrome Extension overlay:
evaluate_script(`
(() => {
const ws = new WebSocket('ws://localhost:38377');
ws.onopen = () => {
ws.send(JSON.stringify({
mode: 'play',
message: '[CURRENT ACTION e.g. ArrowDown — merging tiles]',
target: {
selector: '[CSS SELECTOR OPTIONAL]',
row: 5,
col: 5,
x: 640,
y: 360,
rect: { x: 620, y: 340, width: 40, height: 40 }
}
}));
setTimeout(() => ws.close(), 300);
};
})()
`)
Rules
- One action at a time — always observe result before next action
- Stuck 5 turns: try different strategy direction
- Stuck 15 turns: web search for better guide, update GAME.md
- Update
games/<game>.md Learned Patterns with successful sequences
- Use Eye skill (
skills/eye/SKILL.md) for reading
- Use Hand skill (
skills/hand/SKILL.md) for controlling