afk-play

Autonomously plays browser web games via Chrome DevTools Protocol using DOM analysis and keyboard/mouse input actions.

4|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/LilMGenius/AFK --skill afk-play
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: afk-play
Source: https://github.com/LilMGenius/AFK/tree/main
Command: npx skills add https://github.com/LilMGenius/AFK --skill afk-play

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the tedious manual effort of playing browser-based web games by enabling your AI CLI agent to take over controls and play autonomously using real-time game state analysis.

Core Features & Use Cases

  • Autonomous Game Control: AI reads the game board directly from the DOM, selects optimal moves using built-in strategies, and executes keyboard or mouse actions without user input.
  • Auto-Discovery for New Games: For unsupported web games, the Skill automatically searches for strategy guides, generates a game configuration file, and begins playing immediately without code changes.
  • Optional Visual Overlay: A companion Chrome Extension displays real-time feedback of the AI's actions and highlights target positions on the game screen for transparency.

Quick Start

Instruct your CLI agent to run "afk:play 2048" to start autonomous play of 2048 on play2048.co.

Frequently Asked Questions about afk-play

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate web game playing with an AI CLI agent?

You can automate web game playing by instructing your AI CLI agent to use a Skill that reads the game state from the DOM and executes keyboard or mouse inputs autonomously via Chrome DevTools Protocol.

Can AI autonomously play browser games like 2048 and Minesweeper?

Yes, AI can autonomously play browser games like 2048 and Minesweeper by extracting game state from the DOM and executing optimal moves using built-in strategies without manual user intervention.

Do I need a remote debugging port to control web games with AI?

Yes, you need a running Chrome instance on remote debugging port 9222 to enable the AI CLI agent to connect and control web games using Chrome DevTools Protocol tools.

What is the best way to automate playing unsupported web games with AI?

The best way to automate unsupported web games is using auto-discovery, which searches for strategy guides, generates a game configuration file, and begins playing immediately without code changes.

How does AI read web game state to execute actions?

AI reads web game state by leveraging Chrome DevTools Protocol tools to extract game board data directly from the DOM structure, then selecting and executing keyboard or mouse input actions.

Are there limitations to using DOM reading for web game automation?

DOM reading for web game automation requires the game state to be accessible in the DOM structure, limiting its use with browser games that rely on canvas rendering without exposing internal state elements.