agentleFS
espressifespressif/esp-claw-skills-lab/skills/game_of_life/SKILL.md

game_of_life

Skill34 starsChanged 6 months agoMITView on GitHub

Use this skill when the user wants to play Conway's Game of Life, Rainbow Life, a Mosaico life demo, paint living tiles on the LCD, or launch an interactive mosaic / cellular automata game. Requires a display. Tuned for Mosaico QSPI AMOLED (command-mode GRAM): each frame uses begin_frame, draw, present, end_frame; avoid present_full and clear=false partial paths on current firmware. Chrome-less full-screen ink canvas — no HUD buttons and no generation/status text. Uses LCD touch gestures when available; otherwise falls…

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user wants to play Conway's Game of Life, Rainbow Life, a Mosaico life demo, paint living tiles on the LCD, or …

    line 49
  2. Very specific:

    Run exactly one script with lua_run_script unless the user explicitly asks to run another application.

    line 53
  3. Very specific:

    If lua_run_script returns an error, report that error directly to the user.

    line 55
  4. Very specific:

    Use lua_run_script_async for the async form when available.

    line 78
  5. Very specific:

    Run {CUR_SKILL_DIR}/scripts/mosaico_life.lua with an empty args object unless a non-default IMU device name is required.

    line 97
  6. Distinctive:

    If the display is missing, say so and do not run the script.

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Game of Life

Use this skill when the user wants to play Conway's Game of Life, Rainbow Life, a Mosaico life demo, paint living tiles on the LCD, or launch an interactive mosaic / cellular automata game.

Requires a display. Tuned for Mosaico QSPI AMOLED (command-mode GRAM): each frame uses begin_frame, draw, present, end_frame; avoid present_full and clear=false partial paths on current firmware. Chrome-less full-screen ink canvas — no HUD buttons and no generation/status text. Uses LCD touch gestures when available; otherwise falls back to a button. IMU shake is optional and soft-required via pcall(require, "imu"). On current Mosaico firmware the Lua imu module is not registered, so shake-to-scatter is temporarily unavailable even though the board has a hardware IMU. When imu is present and the board declares imu_sensor (or args.imu_device is set), shaking still scatters life. Audio is not required.

Run exactly one script with lua_run_script unless the user explicitly asks to run another application.

If lua_run_script returns an error, report that error directly to the user. Do not retry with changed arguments unless the user asks.

Launch

Tool call:

{"path":"{CUR_SKILL_DIR}/scripts/mosaico_life.lua","args":{}}

Mosaico / QSPI notes

  • Target panel: 480x480 QSPI AMOLED (CO5300-class GRAM). A full RGB565 frame is about 450 KB, so refresh uses paced full-frame present rather than RGB-style continuous scanout.
  • Safe Lua display path on current Mosaico image: begin_frame({ clear = true }) then draw then present() then end_frame().
  • Shake/IMU: code keeps optional IMU support, but without the Lua imu module shake does nothing until firmware enables it.

Optional long-running launch (preferred for interactive play so the agent stays responsive):

{"path":"{CUR_SKILL_DIR}/scripts/mosaico_life.lua","args":{},"exclusive":"display","replace":true,"name":"game_of_life"}

Use lua_run_script_async for the async form when available.

Optional args:

{"path":"{CUR_SKILL_DIR}/scripts/mosaico_life.lua","args":{"imu_device":"imu_sensor","shake_sensitivity":1.0,"touch_ms":4,"display_ms":36,"step_ms":110,"target_cells":240,"cell_px":16}}
  • imu_device: board_manager device name for the IMU (default imu_sensor). Use this only when the board YAML uses a non-default device id — never hard-code a board product name.
  • shake_sensitivity: number > 0 (default 1.0). Higher = easier to trigger physical shake.
  • touch_ms: touch/button poll interval in ms (default 4, ~250 Hz). Lower = snappier strokes.
  • display_ms: visual refresh interval in ms (default 25 on RGB framebuffer panels, 80 on SPI/QSPI panels).
  • step_ms: Life generation interval (default 90 on RGB framebuffer panels, 150 on SPI/QSPI panels).
  • target_cells: soft budget for grid tiles (default 900 on RGB framebuffer panels, 240 on SPI/QSPI panels). Larger panels grow cell pixels instead of denser grids.
  • cell_px: force tile pixel size (overrides target_cells sizing). Use only for manual tuning.

Recommended flow

  1. Activate the board_hardware_info skill and confirm a display is declared. LCD touch is preferred; a button is enough for pause / reset / shake. If an IMU is declared (commonly imu_sensor), physical shake is available automatically.
  2. Run {CUR_SKILL_DIR}/scripts/mosaico_life.lua with an empty args object unless a non-default IMU device name is required.
  3. Tell the user the chrome-less controls:
    • Drag: paint living cells (drag over a live cell to erase).
    • Tap: place the next seed pattern.
    • Long-press ≈ 700 ms: reset and reseed.
    • Physically shake the board when IMU is present.
    • Button-only boards: hold ≈ 700 ms to reset and reseed; physical shake requires an IMU.
  4. If the display is missing, say so and do not run the script. Missing IMU is not fatal — shake still works via button hold on button-only boards.
  5. On script error, report the error text and stop.

Gameplay notes

  • Rule: classic B3/S23 Conway Life with Rainbow hue inheritance.
  • Shake moves life in 3×3 blocks (1–3 steps) and plants viable sparks so the board does not die instantly.
  • Physical shake detection is relative to resting acceleration (scale-free), so it works across IMU backends without per-chip thresholds.
  • A restrained colored background and edge feedback add atmosphere without particle halos or on-screen chrome.
  • Tile density is panel-aware: about 900 cells on RGB framebuffer panels and about 240 on SPI/QSPI panels.
  • SPI/QSPI panels automatically use horizontal dirty-band presents, final-state transitions, and a lower default cadence; RGB framebuffer panels retain the richer high-frame-rate path.
  • Single-device port of the original web demo; multi-tile linking is out of scope for this Lua skill.

References

  • Play and control details: read_file("{CUR_SKILL_DIR}/references/gameplay.md")

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.