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

snake

Skill34 starsChanged 6 months agoMITView on GitHub

Use this skill when the user asks to play, show, draw, or animate Snake on the screen. Run the bundled Lua script with lua_run_script_async for normal display use: The script recreates the original Snake app as a local Lua display animation with these rules: If script execution returns an error, report that error directly to the user. Start Snake with defaults: Run Snake for one minute: Override the cell size:

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    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 asks to play, show, draw, or animate Snake on the screen.

    line 17
  2. Very specific:

    Run the bundled Lua script with lua_run_script_async for normal display use:

    line 19
  3. Distinctive:

    If the head bites the tail, the bitten segment and all tail segments after it are removed.

    line 29
  4. Distinctive:

    After eating, the consumed cell remains visible as the head for a complete frame before the next food appears.

    line 30
  5. Distinctive:

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

    line 36
  6. Distinctive:

    Start Snake with defaults:

    line 95
  7. Distinctive:

    Run Snake for one minute:

    line 101
  8. Very specific:

    Use lua_run_script_async with name: "snake", exclusive: "display", and replace: true.

    line 115
  9. Distinctive:

    Use default args unless the user asks for a speed, duration, seed, color, or explicit cell size.

    line 116
  10. Very specific:

    Leave duration_ms as 0 for a Snake animation that keeps running until stopped or replaced.

    line 117

≈ “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

Snake

Use this skill when the user asks to play, show, draw, or animate Snake on the screen.

Run the bundled Lua script with lua_run_script_async for normal display use:

{"path":"{CUR_SKILL_DIR}/scripts/draw_snake.lua","args":{},"name":"snake","exclusive":"display","replace":true,"log_bytes":2048}

The script recreates the original Snake app as a local Lua display animation with these rules:

  • The snake starts at a fixed length of 6.
  • Each food eaten grows the snake by exactly 1 segment.
  • If the head bites the tail, the bitten segment and all tail segments after it are removed.
  • After eating, the consumed cell remains visible as the head for a complete frame before the next food appears.
  • The game runs continuously until stopped, replaced, or an explicit duration_ms is provided.
  • The logical snake board is fixed at 16 x 16 cells. It is scaled to the screen, so a 480 x 480 screen shows each segment as 30 x 30 pixels.
  • Edge wrapping is enabled, and it only happens when the head steps past the logical board boundary.
  • Eating or biting never happens on the same movement as an edge wrap. After an event on an edge cell, the snake leaves that edge before wrapping is allowed again.

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

Script Args Schema

{
  "type": "object",
  "properties": {
    "frame_delay_ms": {
      "type": "integer",
      "default": 140,
      "minimum": 40,
      "maximum": 2000
    },
    "duration_ms": {
      "type": "integer",
      "default": 0,
      "minimum": 0,
      "description": "How long to run. Use 0 to continue until stopped or replaced."
    },
    "cell_size": {
      "type": "integer",
      "default": 0,
      "minimum": 0,
      "description": "Display pixel size for one snake segment. Use 0 to scale the fixed 16 x 16 board to the screen."
    },
    "wrap_edges": {
      "type": "boolean",
      "default": true,
      "description": "Whether the snake appears on the opposite side after crossing the board edge."
    },
    "seed": {
      "type": "integer",
      "default": 0,
      "minimum": 0,
      "description": "Use 0 to seed from local time."
    },
    "background": {
      "type": "string",
      "default": "#000000"
    },
    "snake_color": {
      "type": "string",
      "default": "#ffffff"
    },
    "head_color": {
      "type": "string",
      "default": "#ff8f00"
    },
    "food_color": {
      "type": "string",
      "default": "#00ff00"
    }
  }
}

Tool Call Inputs

Start Snake with defaults:

{"path":"{CUR_SKILL_DIR}/scripts/draw_snake.lua","args":{},"name":"snake","exclusive":"display","replace":true,"log_bytes":2048}

Run Snake for one minute:

{"path":"{CUR_SKILL_DIR}/scripts/draw_snake.lua","args":{"duration_ms":60000},"name":"snake","exclusive":"display","replace":true,"log_bytes":2048}

Override the cell size:

{"path":"{CUR_SKILL_DIR}/scripts/draw_snake.lua","args":{"cell_size":30},"name":"snake","exclusive":"display","replace":true,"log_bytes":2048}

Recommended Flow

  1. Use lua_run_script_async with name: "snake", exclusive: "display", and replace: true.
  2. Use default args unless the user asks for a speed, duration, seed, color, or explicit cell size.
  3. Leave duration_ms as 0 for a Snake animation that keeps running until stopped or replaced.
  4. Report the async job start result or script error directly to the user.

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.