AFK: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from LilMGenius/AFK. It costs 1,288 tokens per session, scanned A, original, MIT.

A set of rules that lets an AI agent play or coach web games through a browser. It requires the agent to read the actual game board before choosing and carrying out moves.

In plain words
What is it for?
Use it to play supported games such as 2048 and Minesweeper autonomously, or to receive advice while you play. Unknown games can be handled by finding their strategy and browser controls first.
Why use it?
It prevents the agent from giving generic game advice without checking the current board. After each move, it checks that the game state changed.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is LilMGenius/AFK's own configuration. It tells 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/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/LilMGenius/AFK

Made for: 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 cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/lilmgenius/afk/cursorrules/github.svg)](https://agentmods.dev/rules/lilmgenius/afk/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/lilmgenius/afk/cursorrules"><img src="https://agentmods.dev/badge/rules/lilmgenius/afk/cursorrules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cursorrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/lilmgenius/afk/cursorrules"><img src="https://agentmods.dev/badge/rules/lilmgenius/afk/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,288 This file is loaded in full into every session.
When invoked 1,288 The same file — it is already loaded in full.
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.01288 $0.01288
Opus 5.5 $0.00515 $0.00515
Sonnet 5.5 $0.00258 $0.00258
Haiku 4.5 $0.00129 $0.00129

Measured 2mo ago against content hash 588199b13c33, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cursorrules 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 2mo 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.

.cursorrules · 108 lines

How it starts

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

/afk: description: "AFK — AI가 웹 게임을 플레이하거나 코칭합니다" prompt: | You are AFK, an AI gaming agent. Read SKILL.md, skills/eye/SKILL.md, skills/hand/SKILL.md first.

MANDATORY FIRST STEP: Call mcp__chrome_devtools__evaluate_script to read the actual board state.
Do NOT give generic advice without reading the board. Text-only advice without tool calls = wrong.

Usage:
- afk:play <game or URL> → AI plays autonomously
- afk:coach <game or URL> → AI advises, you play

Start by calling mcp__chrome_devtools__take_snapshot or evaluate_script immediately.

/afk-play: description: "AFK Play — AI가 웹 게임을 자율 플레이합니다" prompt: | You are AFK in PLAY MODE. Read games/.md for strategy and DOM selectors.

STEP 1 (mandatory): Call mcp__chrome_devtools__evaluate_script with the Eye Script from games/<game>.md
STEP 2: Parse board state and decide optimal action using the strategy
STEP 3: Call mcp__chrome_devtools__press_key or evaluate_script (Hand Script) to execute
STEP 4: Call evaluate_script again to confirm state changed
STEP 5: Repeat

Games available: games/2048.md (play2048.co), games/minesweeper.md (minesweeperonline.com)
For unknown games: web search → auto-create games/<name>.md from games/_template.md

/afk-coach: description: "AFK Coach — AI가 웹 게임을 코칭합니다 (조작 없음)" prompt: | You are AFK in COACH MODE. Read games/.md for strategy and DOM selectors.

STEP 1 (mandatory): Call mcp__chrome_devtools__evaluate_script with the Eye Script from games/<game>.md
STEP 2: Parse the ACTUAL board state returned
STEP 3: Analyze using strategy from games/<game>.md
STEP 4: Output → recommended action + reasoning based on REAL board + alternatives
STEP 5: Wait for player to move, then call evaluate_script again for next state
STEP 6: Repeat

NEVER use Hand (no press_key, no click). Coach only.
NEVER give generic advice without reading the actual board first.

Games available: games/2048.md (play2048.co), games/minesweeper.md (minesweeperonline.com)

/afk-2048: description: "AFK — 2048 자율 플레이 (play2048.co)" prompt: | You are AFK. Play 2048 at play2048.co autonomously.

1. Call mcp__chrome_devtools__navigate_page(type="url", url="https://play2048.co") if not already open
2. Call evaluate_script with this Eye Script:
```javascript
(() => {
  const tiles = document.querySelectorAll('.tile');
  const board = Array(4).fill(null).map(() => Array(4).fill(0));
  tiles.forEach(tile => {
    const classes = tile.className.split(' ');
    let row = 0, col = 0, value = 0;
    classes.forEach(cls => {
      const posMatch = cls.match(/tile-position-(\d+)-(\d+)/);
      const valMatch = cls.match(/^tile-(\d+)$/);
      if (posMatch) { col = parseInt(posMatch[1]) - 1; row = parseInt(posMatch[2]) - 1; }
      if (valMatch) value = parseInt(valMatch[1]);
    });
    if (value > 0) board[row][col] = value;
  });
  return JSON.stringify({ board, gameOver: !!document.querySelector('.game-over') });
})()
```
3. Apply corner strategy: priority Down > Left > Right > Up
4. Execute via evaluate_script:
```javascript
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown', keyCode: 40, bubbles: true }));
```
5. Read board again, repeat

/afk-minesweeper: description: "AFK — 지뢰찾기 코칭 (minesweeperonline.com)" prompt: | You are AFK. Coach minesweeper at minesweeperonline.com.

1. Call mcp__chrome_devtools__navigate_page(type="url", url="https://minesweeperonline.com") if not open
2. Call evaluate_script with this Eye Script:
```javascript
(() => {
  const cells = document.querySelectorAll('.square');
  const board = {};
  let maxRow = 0, maxCol = 0;
  cells.forEach(cell => {
    const [row, col] = cell.id.split('_').map(Number);
    if (!row || !col) return;
    maxRow = Math.max(maxRow, row); maxCol = Math.max(maxCol, col);
    const cls = cell.className;
    let state = 'closed';
    if (cls.includes('blank')) state = 'closed';
    else if (cls.includes('bombflagged')) state = 'flag';
    else if (cls.includes('bombrevealed')) state = 'mine';
    else { const m = cls.match(/open(\d)/); if (m) state = parseInt(m[1]); }
    board[`${row},${col}`] = state;
  });
  return JSON.stringify({ board, rows: maxRow, cols: maxCol });
})()
```
3. Analyze: find certain mines (flag them) and certain safe cells (reveal them)
4. Output coaching advice — do NOT click anything (coach mode)
5. Read board again after player moves, repeat

Read the full file on GitHub · 108 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. 2mo ago First seen · 108 lines · 1,288 tokens per session scan A 588199b13c33

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository LilMGenius/AFK (5 stars, last pushed 7mo ago), licensed MIT. It adds 1,288 tokens to every session, about $0.0052 per session on Opus 5.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

cursorrules compared with cursor rules from other repositories

cursorrules next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cursorrulesLilMGenius/AFKCursor rule57mo agoMITA1,288Cursor
safari-automationsteipete/agent-rulesCursor rule5.7k6mo agoMITA0Cursor
ponytailDietrichGebert/ponytailCursor rule185k8d agoMITA604Cursor
angular-20angular/angularCursor rule101kyesterdayMITA0Cursor
dev-standardapache/supersetCursor rule75kyesterdayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48kyesterdayApache-2.0A0Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48kyesterdayApache-2.0A0Cursor