AFK: Skill for Claude Code

.cursor/skills/afk-play/SKILL.md

afk-play is a skill for Claude Code, Cursor from LilMGenius/AFK. It costs 53 tokens per session (678 once invoked), scanned A, original, MIT.

A skill that makes an AI agent play a web game by repeatedly reading the board, choosing a move, performing it in the browser, and checking the result.

In plain words
What is it for?
Use it with 2048 or Minesweeper, or with another game after its strategy and browser controls have been documented.
Why use it?
It ensures every move is based on the current game state instead of guesswork or general advice.

Skill for Claude CodeCursor

Written for Claude Code and Cursor: disable-model-invocation in frontmatter, but also installed under .cursor/.

This is LilMGenius/AFK's own configuration. It tells Claude Code and Cursor how to work on AFK itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AFK configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LilMGenius/AFK. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LilMGenius/AFK/main/.cursor/skills/afk-play/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/LilMGenius/AFK

Made for: Claude Code, Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for afk-play

README.md
[![agentmods](https://agentmods.dev/badge/skills/lilmgenius/afk/afk-play.svg)](https://agentmods.dev/skills/lilmgenius/afk/afk-play)
Your own site
<a href="https://agentmods.dev/skills/lilmgenius/afk/afk-play"><img src="https://agentmods.dev/badge/skills/lilmgenius/afk/afk-play.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 678 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.00678
Opus 5 $0.00026 $0.00339
Sonnet 5 $0.00011 $0.00136
Haiku 4.5 $0.00005 $0.00068

Measured 8d ago against content hash d05af02c714a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

afk-play scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/afk-play/SKILL.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

  1. Eye: Call evaluate_script with the Eye Script from games/<game>.md
  2. Analyze: Parse board state, apply strategy from games/<game>.md
  3. Hand: Call press_key or evaluate_script with Hand Script
  4. Verify: Call evaluate_script again to confirm state changed
  5. Repeat

Game Files

Unknown Game

If no GAME.md exists:

  1. Web search: "<game name> strategy guide DOM selectors"
  2. take_snapshot to find actual DOM structure
  3. Create games/<name>.md from games/_template.md
  4. Start playing

Chrome Extension Overlay (WebSocket)

After each action, send status to the Chrome Extension overlay:

// Run via evaluate_script to update Play badge
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

Read the full file on GitHub · 81 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 81 lines · 53 tokens per session scan A d05af02c714a

Subscribe to this mod's changes

afk-play is a skill published in the GitHub repository LilMGenius/AFK (5 stars, last pushed 5mo ago), licensed MIT. It adds 53 tokens to every session and 678 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

host-computer-use-windows

Backend-specific Windows guidance for computeruseremote. Load after status or startsession reports backendfamily/backendid windows or Windows UI Automation features. Covers UIA structural targeting, Windows session caveats, and screenshot verification.

agent0ai/agent-zero · 56 tokens

browser-automation

Use for complex Agent Zero browser automation, including multi-tab browsing, screenshots, forms, uploads, raw pointer/keyboard actions, host-vs-container browser mode, and visual verification workflows.

agent0ai/agent-zero · 41 tokens

browser-extension-control

Create, inspect, install, and safely maintain Chrome extensions for Agent Zero's built-in Browser plugin. Use when the user asks to build a browser extension, modify an existing extension, install a Chrome Web Store extension, or review extension permissions.

agent0ai/agent-zero · 52 tokens

browser-form-workflows

Use for complex Agent Zero Browser form workflows involving selects, checkboxes, radios, file uploads, contenteditable fields, multi-step validation, or visually verified submission.

agent0ai/agent-zero · 37 tokens

web-game-development

Implement and optimize browser games using Phaser, Three.js, React Three Fiber, Babylon.js, or PlayCanvas with responsive input, asset loading, rendering, and browser playtests. Use for JavaScript or TypeScript game projects.

metaspartan/cybara · 49 tokens

blender-motion-state-inspection

Use this skill when inspecting Blender characters, rigs, poses, animation retargeting, ground contact, facing direction, or model-vs-motion alignment where screenshots alone are not enough.

DekaPrayoga/AurixAgent · 43 tokens