Agent skill

2D Map and Scene Generator

by 0x0funky in 0x0funky/agent-sprite-forge

Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

MITAuto-check passedGame Development

Install 2D Map and Scene Generator

skills CLI
$ npx skills add 0x0funky/agent-sprite-forge --skill generate2dmap -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install 0x0funky/agent-sprite-forge generate2dmap --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/0x0funky/agent-sprite-forge.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/generate2dmap .claude/skills/generate2dmap && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generate2dmap
GitHub stars
4.3k
Token cost
~2.9k tokens
SKILL.md length
1,259 words
Files
42 (incl. scripts, references)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

  • Works in 3 steps: API, when a key is configured: OpenAI… → Local: your own image tool (Codex… → codeart2d (autotiles, layouts, stylized…
  • Building a playable level, room set or tilemap with collision and exits
  • SKILL.md covers Use when, Do not use when, Capability check (once per… and Art source, plus 6 more sections
  • Runs JavaScript scripts from its folder; calls python; needs OPENAI_API_KEY and GEMINI_API_KEY

What it does

The skill builds the smallest scene bundle a request needs, in the game's own art, camera, renderer and data conventions: a background picture needs no game system, while a playable map needs explicit geometry and data. It handles top-down and side-scrolling levels, room sets, terrain and prop kits, parallax layers and battle or story plates, with collision, navigation and reachability checks, environment motion and validation of the map data.

Map art is image generation by default, routed through a sibling media skill: first a configured API key for OpenAI, Gemini, xAI, BytePlus Seedream or fal.ai, then a local Codex or Grok route, with code-drawn art only on request or when no route exists. Layout, collision, exits and spawns are written as data, and each asset records its art source. Characters, items and effects, character animation from video, and bare API calls belong to other skills.

When your agent uses it

  • Building a playable level, room set or tilemap with collision and exits
  • Creating a parallax or battle background for a 2D game
  • Validating a map and previewing it in HTML
  • Exporting a map to Tiled, Godot or LDtk

Example prompts

  • “Design a side-scrolling forest level with a start, an exit and reachable platforms, and export it to Godot.”
  • “Make a three-layer parallax background for a night city and preview it in the browser.”
  • “Check that every room in this dungeon map is reachable from the entrance.”

Requirements

  • An image route for map art, such as an API key or a signed-in local CLI
  • Python to run the capability check script

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. API, when a key is configured: OpenAI (OPENAI_API_KEY), Google Gemini (GEMINI_API_KEY), xAI (XAI_API_KEY), BytePlus Seedream (ARK_API_KEY)…
  2. Local: your own image tool (Codex image_gen, Grok's native tool) when you have one, otherwise the user's signed-in Codex CLI, then Grok CLI.
  3. codeart2d (autotiles, layouts, stylized parallax, ambient loops) only when the user explicitly asks for code-drawn art, or when…

What it can do on your machine

Read from SKILL.md and the folder at commit 5324342. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY
    • GEMINI_API_KEY
    • XAI_API_KEY
    • ARK_API_KEY
    • FAL_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

2D Map and Scene Generator loads about 2.9k tokens when it runs, and up to ~98k if it reads all its reference files. Until then it costs about 215 tokens; SKILL.md has 1,259 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~215
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~98k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from 0x0funky/agent-sprite-forge at commit 5324342, republished under its MIT licence (© 0x0funky). 1,259 words, ~2,948 tokens.

Download SKILL.mdSave it as .claude/skills/generate2dmap/SKILL.md (or your agent's skills folder). This skill also uses 41 other files; get the full folder from GitHub.
name
generate2dmap
description
Plan and build 2D game maps and scenes - top-down and side-scrolling levels, tilemaps, prop packs, parallax backgrounds and HD-2D battle or story plates - with collision, navigation and reachability checks, environment motion, a playable HTML preview and export to Tiled, Godot 4 or LDtk. Map art (terrain, tiles, props, plates, parallax layers) is image generation by default, through generate2dmedia route_media.py (the API when a key is configured, else the local Codex or Grok CLI); map data (layout, collision, exits, spawns) is written as data. Use for any map, level, room, scene, background, terrain or prop-kit request. Not for characters, creatures, items or FX (generate2dsprite), character animation (video2dsprite), code-drawn tiles or maps (codeart2d, only on request) or calling an image or video API by itself (generate2dmedia).

Generate 2D Map

Build the smallest scene bundle the request needs, in the game's art, camera, renderer and data conventions. A background picture needs no game system; a playable map needs explicit geometry and data beyond a painting.

Use when

  • A playable map, level, room set, tilemap, terrain or prop kit, with collision and exits.
  • A parallax background, a battle, title or story backdrop, or an HD-2D plate with lights and motion.
  • Map data must be validated, previewed or exported to Tiled, Godot or LDtk.

Do not use when

Capability check (once per session)

Run python "<skill-dir>/../generate2dmedia/scripts/forge_doctor.py" --host-tools <tools> --save <output>/doctor.json, where <tools> lists the media tools in your own tool list (image_gen, image_edit, image_to_video) or none. Its ROUTES block shows which API keys are configured (yes or no), the local readiness and the resolved order. If encoding.stdout fails, set PYTHONUTF8=1.

Art source

Image generation is the default for map art: terrain and tile sheets, prop kits, HD-2D plates, painted backgrounds and parallax layers. Map data (layout, collision, exits, spawns) is data you write and validate, not art. Record each asset's art_source (api, host_image, existing, or code only on request) and name the route in your reply. A route the user names explicitly wins.

  1. API, when a key is configured: OpenAI (OPENAI_API_KEY), Google Gemini (GEMINI_API_KEY), xAI (XAI_API_KEY), BytePlus Seedream (ARK_API_KEY) or fal.ai (FAL_KEY), in the environment or the user config file (route-media.md). The configured key is the owner's consent, so there is no per-call question.
  2. Local: your own image tool (Codex image_gen, Grok's native tool) when you have one, otherwise the user's signed-in Codex CLI, then Grok CLI.
  3. codeart2d (autotiles, layouts, stylized parallax, ambient loops) only when the user explicitly asks for code-drawn art, or when route_media.py prints no-route (exit 3). Then say "code-drawn, no image model".

Every image goes through one command: python "<skill-dir>/../generate2dmedia/scripts/route_media.py" image --prompt-file <txt> --reference <png> --size 1536x1024 --out-dir <new>; masked plate motion uses route_media.py video. Each prints one JSON line with route, artifact, sha256 and estimateUsd. Existing art the user supplies is always welcome. Never claim a generation that did not happen; keep the prompt and contract and report a missing capability.

Host notes

  • Codex: image_gen is your own image tool; with no configured key use it and look at results with view_image. An image this session made that is not in the project: python "<skill-dir>/../generate2dmedia/scripts/cli_media.py" adopt --codex-thread <thread-id> --output-dir <new>. codeart2d and generate2dmedia are explicit-only: open their SKILL.md when this one routes there.
  • Claude Code: no built-in image generator: route_media.py takes the API or the local CLIs. Look at every PNG you make with Read (debug overlays, previews); run tools with Bash; <skill-dir> is ${CLAUDE_SKILL_DIR}.
  • Grok: its native image and video tools are your own tools; use their real schema.

Commands

Run each tool as one line from the user's project root: python "<skill-dir>/scripts/<tool>.py" .... <skill-dir> is this skill's folder; sibling skills sit beside it (<skill-dir>/../codeart2d). Keep inputs and outputs inside the project. Every tool writes a new --output-dir (or a new --output file): it refuses an existing one, stages beside it and publishes only after its checks (--strict-qc / --strict publish nothing on failure). Success prints one JSON line; errors print error: ... and exit 1; usage errors exit 2. Needs Python 3.10+, numpy and Pillow (scipy recommended); ffmpeg 5.1+ for scene motion; node for the browser runtime. --help lists every flag.

Plan before art

Record viewport and logical resolution, world extent, origin, camera and zoom, actor scale and footprint, routes, landmarks, interactions, exits and render order. Source pixels are not world units: measure returned sizes and declare uniform scale and anchors. Choose by behaviour (map-strategies.md; starting values per genre in map-presets.md):

  • scene_mode: authored area, town or arena; terrain plus props and explicit geometry.
  • tile_mode / grid_mode: repeated or editable terrain or cell rules; tiles plus layer data.
  • room_chunk_mode: connected rooms from a shared kit with door sockets.
  • side_scroll_mode: side-view scenery or a playable platform stage with movement geometry.
  • baked_scene_mode: a complete battle, title or story picture, with optional hotspots or bounded motion.

Split objects only when interaction, depth, reuse, editing or motion needs it. Pixel art needs deliberate logical pixels and nearest scaling; HD-2D pairs pixel actors with painted plates and light.

Show full SKILL.md (532 more words)Show less

Pipeline

Block out navigation, make art and kit, place it, validate the data, preview, then export. A playable map is a map_bundle.v2 (layered-map-contract.md).

NeedRoute
Props from a sheetextract_prop_pack.py --input <sheet> --rows R --cols C --labels a,b --output-dir <new> (--grid-rounding nearest, --auto-boxes, --boxes-file <json> --keep-canvas, --world-scale 3/8, --suggest-footprint ellipse); place by anchor_px (prop-pack-contract.md)
Terrain fills, overlays, iso or hex, Wang rowsextract_terrain_tiles.py --strict-qc (--layer overlay, --shape iso-diamond, --wang NAME=A/B:MASKS; --edge-policy seamless only for art meant to tile)
Platform caps and middlesextract_platform_strip.py --strict-qc (side-scroll-scenes.md)
Code-drawn autotiles, only on requestcodeart2d autotile_build.py (seam-proven tileset manifest), then the exporters
A code-drawn playable map, only on requestcodeart2d layout_build.py (writes map_bundle.v2), then map_nav.py check and the exporters
Draw order, contact anchors, placement auditcompose_layered_preview.py --base <png> --placements <json> --output <png> --report <json>; with --bundle <map_bundle.json> --debug-overlay --audit-out <json> look at both
Validate a playable mapmap_bundle.py validate --bundle <b> (map_bundle.py hash fills sha256), then map_nav.py check --bundle <b> --output-dir <new> (--link each neighbour); review nav-debug.png; map_nav.py query tests one spot or move
Walk the map, check every routebuild_scene_preview.py --bundle <b> --output-dir <new> --verify; attach scene-snapshot.json (scene-preview.md)
Exportexport_tiled.py export --bundle <b> --output-dir <new> (--embedded-variant for Phaser); export_godot.py --bundle <b> --output-dir <new>; export_ldtk.py --bundle <b> --output-dir <new> (engine-maps.md)
Room chunks; side-scroll grammarvalidate_chunks.py --chunks <json> --output-dir <new>; validate_layout.py --layout <json> --output-dir <new>
Parallaxvalidate_parallax.py --spec <plan> --report <qa.json> (declare camera.pivot and the aspects you ship); code-drawn layers on request: codeart2d parallax_build.py (parallax-backgrounds.md)
Fit a painting to the game size or floorconform_background.py conform --mode cover or --mode ground-fit; subjects on every screen aspect: conform_background.py validate-crops
HD-2D platehd2d-plates.md: plan stage.json, scene_layout_guide.py, generate with guide.png attached, then validate_stage.py --stage <json> --output-dir <new>; look at every layout-*.png
Lights, shadows, atmospherehd2d-presentation.md: extract_scene_lights.py extract --stage <json>, curate lights.json
Night, lit or damaged variant of a plateedit_locality_check.py --before <master> --after <variant> --stage <json> --edit-box <box>; regenerate on failure
Water, fire, mist or cloth on a still platebackground-scenes.md: build_motion_mask.py --envelope-from <clip>, scene_motion.py build, then scene_motion.py qa on the decoded file; code-drawn ripples or glow on request: codeart2d ambient_bake.py
Full-frame scene loopgenerate2dsprite assemble_frames.py (--static-regions, --loop-overlap K --ambient)
Collision and paths in a web gamereferences/runtime/map-runtime.mjs (same rules as map_nav.py)

Acceptance

  • A playable map is accepted only after map_bundle.py validate and map_nav.py check pass, and the build_scene_preview.py route check says ok: true for every route. map_nav proves reachability from data, not that collision matches the painted art.
  • Compose with a representative actor at game scale; check spawn clearance, collider versus canopy, reciprocal portal arrivals, joins, repeat seams and camera coverage.
  • With a plate the best stage status is needs-visual-review. Quote scene_motion.py qa numbers (decoded seam, frames, fps, keyint, bytes) before calling a loop seamless.
  • Native alpha must keep purple; an RGB checkerboard is not transparency. Test devices before claiming mobile performance.
  • Deliver originals and prompts with their provenance (route, model, estimateUsd), runtime assets and data, the preview and the checks run, with remaining limits.
  • Report every WARN or FAIL check verbatim (id, value, threshold, files) from each published QA envelope; never say "all checks passed" when any published envelope has a warn.

References

map-strategies.md, map-presets.md, layered-map-contract.md, prop-pack-contract.md, side-scroll-scenes.md, parallax-backgrounds.md, background-scenes.md, hd2d-plates.md, hd2d-presentation.md, scene-preview.md, engine-maps.md; data contracts in references/schemas/map.schema.json.

© 0x0funky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 41 other files (scripts, references) in skills/generate2dmap of 0x0funky/agent-sprite-forge.

  • SKILL.md
  • agents/openai.yaml
  • references/background-scenes.md
  • references/engine-maps.md
  • references/hd2d-plates.md
  • references/hd2d-presentation.md
  • references/layered-map-contract.md
  • references/map-presets.md
  • references/map-strategies.md
  • references/parallax-backgrounds.md
  • references/prop-pack-contract.md
  • references/runtime/map-runtime.mjs
  • references/scene-preview.md
  • references/schemas/common.schema.json
  • references/schemas/map.schema.json
  • references/side-scroll-scenes.md
  • scripts
  • … and 25 more

Open the folder on GitHubat commit 5324342

Compare with similar skills

2D Map and Scene Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

2D Map and Scene Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
2D Map and Scene Generator this skill0x0funky/agent-sprite-forge4.3k—~2.9kAutomated safety check: PassMIT
Godot Asset Generatorjwynia/agent-skills165—~3.8kAutomated safety check: PassMIT
Gemini Interactions APIAyuilos/Miffan182—~4.6kAutomated safety check: PassAGPL-3.0
Fal AI Imageartwist-polyakov/polyakov-claude-skills206—~2.1kAutomated safety check: NotesMIT
Model Routingfal-ai-community/skills249—~1.5kAutomated safety check: PassNone
Create Image Falgooseworks-ai/goose-skills1.2k—~556Automated safety check: PassMIT

Similar skills

  • Godot Asset Generator

    jwynia/agent-skills

    Generate game assets using AI image generation APIs (DALL-E, Replicate, fal.ai) and prepare them for Godot.

    165 GitHub stars~3.8k tokensUpdated 7 mo ago
    Game DevelopmentAuto-check passed
  • A skill your agent uses when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses…

    182 GitHub stars~4.6k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Fal AI Image

    artwist-polyakov/polyakov-claude-skills

    Generate/edit images via fal.ai. An agent skill from artwist-polyakov/polyakov-claude-skills.

    206 GitHub stars~2.1k tokensUpdated 14 days ago
    Media & CreativeAuto-check: notes
  • Model Routing

    fal-ai-community/skills

    Choose default fal.ai endpoint IDs for genmedia production skills.

    249 GitHub stars~1.5k tokensUpdated 8 days ago
    Media & CreativeAuto-check passed
  • Create Image Fal

    gooseworks-ai/goose-skills

    Generate or edit an image via any FAL image model (nano-banana edit, gpt-image, flux, ...), ROUTED THROUGH THE fal-proxy so it bills the Ads agent.

    1.2k GitHub stars~556 tokensUpdated today
    Media & CreativeAuto-check passed
  • Generates images through a 9Router gateway's image endpoint, with model discovery, the request fields and per-provider quirks for OpenAI, Gemini, MiniMax and others.

    30k GitHub stars~830 tokensUpdated 6 days ago
    Media & CreativeAuto-check passed

More from 0x0funky/agent-sprite-forge

  • Code-Drawn 2D Game Art

    0x0funky/agent-sprite-forge

    Draws 2D game art from code with no image model: pixel sprites, SVG props and icons, rigged characters, FX, autotiles and layouts, only when explicitly asked for.

    4.3k GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Forge Media Route Layer

    0x0funky/agent-sprite-forge

    Generates an image or an image-to-video clip through a configured provider API or a signed-in Codex or Grok CLI, and reports the route, file, hash and cost estimate.

    4.3k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • 2D Sprite Generator

    0x0funky/agent-sprite-forge

    Produces game-ready 2D characters, creatures, props, icons and effects as master stills, sheets or clips, and exports frames for common game engines.

    4.3k GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • Video-to-Sprite Animation Generator

    0x0funky/agent-sprite-forge

    Turns one approved master still into a full set of animated action clips for a character, one image-to-video take per action, then packages them for a game engine.

    4.3k GitHub stars~3.8k tokensUpdated yesterday
    Auto-check passed

Questions about 2D Map and Scene Generator

What does 2D Map and Scene Generator do?

Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export. The skill builds the smallest scene bundle a request needs, in the game's own art, camera, renderer and data conventions: a background picture needs no game system, while a playable map needs explicit geometry and data. It handles top-down and side-scrolling levels, room sets, terrain and prop kits, parallax layers and battle or story plates, with collision, navigation and reachability checks, environment motion and validation of the map data.

When should I use 2D Map and Scene Generator?

2D Map and Scene Generator fits situations like: building a playable level, room set or tilemap with collision and exits; creating a parallax or battle background for a 2D game; validating a map and previewing it in HTML; exporting a map to Tiled, Godot or LDtk.

How do I install 2D Map and Scene Generator in Claude Code?

Run `npx skills add 0x0funky/agent-sprite-forge --skill generate2dmap -a claude-code`. Or copy the skill folder (skills/generate2dmap in 0x0funky/agent-sprite-forge) into .claude/skills/generate2dmap in your project. Claude Code loads it when a task matches its description.

How do I install 2D Map and Scene Generator in Codex?

Run `npx skills add 0x0funky/agent-sprite-forge --skill generate2dmap -a codex`. Or copy the skill folder (skills/generate2dmap in 0x0funky/agent-sprite-forge) into .agents/skills/generate2dmap in your project. Codex loads it when a task matches its description.

Can I use 2D Map and Scene Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add 0x0funky/agent-sprite-forge --skill generate2dmap -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate2dmap, .gemini/skills/generate2dmap, .github/skills/generate2dmap and .opencode/skills/generate2dmap in your project.

What does 2D Map and Scene Generator need to run?

Going by SKILL.md and its folder, 2D Map and Scene Generator needs JavaScript for the scripts in its folder, the command-line tools its instructions call (python) and credentials named OPENAI_API_KEY, GEMINI_API_KEY, XAI_API_KEY and ARK_API_KEY. Our summary lists: An image route for map art, such as an API key or a signed-in local CLI; Python to run the capability check script.

Does 2D Map and Scene Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is 2D Map and Scene Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does 2D Map and Scene Generator use?

2D Map and Scene Generator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does 2D Map and Scene Generator use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 95k tokens, read only when the agent opens those files.

What are the alternatives to 2D Map and Scene Generator?

Skills that share tags, products or a category with 2D Map and Scene Generator: Godot Asset Generator (jwynia/agent-skills, 165 stars), Gemini Interactions API (Ayuilos/Miffan, 182 stars), Fal AI Image (artwist-polyakov/polyakov-claude-skills, 206 stars) and Model Routing (fal-ai-community/skills, 249 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains 2D Map and Scene Generator?

0x0funky (a GitHub user) maintains it in 0x0funky/agent-sprite-forge, which has 4,309 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 6, 2026.

Source: 0x0funky/agent-sprite-forge on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.