eye

Extract real-time web game state via Chrome DevTools Protocol with DOM fallbacks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the need for manual, error-prone DOM parsing to extract web game state for AFK's AI agent play and coach modes, ensuring consistent, accurate state detection for browser-based games.

Core Features & Use Cases

  • Prioritized Tool Chain: Uses fast Chrome DevTools script evaluation first, falls back to accessibility tree snapshots, and only uses visual screenshots for canvas/WebGL games with no accessible DOM state.
  • Error Resilience: Automatically checks for page loading states and updates game selectors when DOM structures change.
  • Use Case: When an AI agent is playing 2048 via AFK, this Skill automatically pulls the current board state from the page's DOM to inform the next move without manual intervention.

Quick Start

The eye skill is automatically invoked when you run AFK's afk:play or afk:coach commands to read the current state of any supported web game.

Frequently Asked Questions about eye

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

FAQPage Schema
How do I extract real-time web game state for an AI agent?

To extract real-time web game state, use a prioritized tool chain that evaluates Chrome DevTools scripts first, falls back to accessibility tree snapshots, and uses visual screenshots for canvas or WebGL games lacking accessible DOM elements.

How does browser automation handle canvas and WebGL games with no accessible DOM?

For canvas and WebGL games with no accessible DOM, browser automation falls back to taking visual screenshots to capture the game state when fast Chrome DevTools script evaluation and accessibility tree snapshots are not applicable.

Why does my DOM parsing for web game automation keep breaking?

DOM parsing for web game automation breaks when page loading states change or DOM structures update. Error resilience mechanisms automatically check page loading states and update game selectors to maintain accurate state extraction.

Can I use Chrome DevTools Protocol to read game state for AFK play and coach modes?

Yes, you can use Chrome DevTools Protocol to read game state for AFK play and coach modes. The extraction process is automatically invoked during afk:play or afk:coach commands to inform AI agent gameplay without manual intervention.

What is the best way to automate state extraction for browser-based games?

The best way to automate state extraction for browser-based games is using a prioritized approach: fast Chrome DevTools script evaluation first, accessibility tree snapshots as a fallback, and visual screenshots for canvas or WebGL games without accessible DOM.

Do I need to manually write selectors to extract game state from the DOM?

No, you do not need to manually write selectors to extract game state from the DOM. The Skill automatically updates game selectors when DOM structures change, eliminating error-prone manual DOM parsing for AI agent workflows.