Agent skill

Forge Media Route Layer

by 0x0funky in 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.

MITAuto-check passedMedia & Creative

Install Forge Media Route Layer

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

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

GitHub CLI
$ gh skill install 0x0funky/agent-sprite-forge generate2dmedia --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/generate2dmedia .claude/skills/generate2dmedia && 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
generate2dmedia
GitHub stars
4.4k
Token cost
~2.2k tokens
SKILL.md length
957 words
Files
20 (incl. scripts, references)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 3 steps: API, every provider whose key is… → Local: your own image tool if you have… → codeart2d, only when the user explicitly…
  • A Forge skill needs a generated image, reference edit or image-to-video clip
  • SKILL.md covers Use when, Do not use when, Route order (owner decision… and Capability check (once per…, plus 6 more sections
  • Runs Python scripts from its folder; calls python; needs OPENAI_API_KEY and GOOGLE_API_KEY

What it does

`route_media.py` is the one command that produces raw media for the Forge skills. It tries paid APIs for every provider whose key is configured (OpenAI, Google Gemini, xAI, BytePlus ModelArk, fal.ai), your preferred order first, then the user's own signed-in Codex or Grok CLI, and prints a single JSON line with the route, artifact, SHA-256 and a cost estimate. A configured key counts as consent, so there is no per-call question, and the agent always names the route that ran.

If nothing works it answers `no-route` with exit code 3, and code-drawn art from codeart2d is the last resort. `forge_doctor.py` is a capability check to run once per session: it shows which keys are configured (never the key itself), local CLI readiness and the resolved route order. The skill also handles API key configuration, a spend ledger, resuming runs and adopting Codex images. Planning, keying and packaging sprites, frames or maps belong to other skills.

When your agent uses it

  • A Forge skill needs a generated image, reference edit or image-to-video clip
  • Checking once per session which generation routes work on this machine
  • Configuring a provider API key or asking what has been spent

Example prompts

  • “Run the Forge doctor and tell me which image and video routes are available.”
  • “Generate a hero image of a mossy ruin using whichever provider has a key configured.”
  • “Show my spend so far and set the provider order to Gemini first.”

Requirements

  • Python, for `route_media.py` and `forge_doctor.py`
  • An API key for a supported provider, or a signed-in Codex or Grok CLI

Workflow steps

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

  1. API, every provider whose key is configured, in this order (the user's providers.order goes first). Images: OpenAI…
  2. Local: your own image tool if you have one (Codex image_gen, Grok's native tools), otherwise the user's signed-in CLI: Codex (local CLI)…
  3. codeart2d, only when the user explicitly asks for code-drawn art or route_media.py prints no-route (exit 3).

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 4 files in scripts/ (Python, 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
    • GOOGLE_API_KEY
    • FAL_KEY
    • GEMINI_API_KEY
    • XAI_API_KEY
    • ARK_API_KEY

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

Context cost

Forge Media Route Layer loads about 2.2k tokens when it runs, and up to ~43k if it reads all its reference files. Until then it costs about 226 tokens; SKILL.md has 957 words of instructions outside code blocks.

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

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). 957 words, ~2,151 tokens.

Download SKILL.mdSave it as .claude/skills/generate2dmedia/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.
name
generate2dmedia
description
The art-route layer of the Forge skills. route_media.py is the one command that generates an image or an image-to-video clip - through the paid API of any provider whose key is configured (OpenAI, Google Gemini, xAI, BytePlus ModelArk, fal.ai; the configured key is the owner's consent), else through the user's own signed-in Codex or Grok CLI - and prints one JSON line with the route, artifact, sha256 and cost estimate; with no route it answers no-route (codeart2d is then the last resort). Also the capability check (forge_doctor), API key configuration, the spend ledger, resume and Codex image adoption. Use when a Forge skill sends a generation here, for the capability check, or when the user asks about keys, routes or spend. Not for planning, processing or QA of sprites, video frames or maps (generate2dsprite, video2dsprite, generate2dmap) or for code-drawn art (codeart2d).

Generate 2D Media

The route layer. It makes raw media; the owning skill plans the asset before and checks it after.

Use when

  • Any Forge skill (or its pipeline script) needs a generated image, reference edit or image-to-video clip.
  • Once per session, to see which routes work here (forge_doctor.py).
  • The user asks to configure an API key, to use a particular route, or about spend.

Do not use when

Route order (owner decision 2026-10-06)

  1. API, every provider whose key is configured, in this order (the user's providers.order goes first). Images: OpenAI (gpt-image-2.5-sunburst), Google Gemini (gemini-3.1-flash-image; --tier hero takes gemini-3-pro-image for hero masters), xAI (grok-imagine-image-2.0), BytePlus ModelArk (Seedream 5.0), fal.ai (reference edits). Video: xAI (grok-imagine-video-1.5; --tier draft takes 1.5 Lite), BytePlus ModelArk (Seedance 2.0), fal.ai (Kling v3, Veo 3.1, Luma, MiniMax, Wan, Vidu, LTX). A configured key is the owner's consent: no per-call question.
  2. Local: your own image tool if you have one (Codex image_gen, Grok's native tools), otherwise the user's signed-in CLI: Codex (local CLI) image_gen with references attached, then Grok (local CLI) one-shot image or edit; video Grok (local CLI) in ACP mode. An installed CLI is used as is; its first successful run records the VERIFIED proof.
  3. codeart2d, only when the user explicitly asks for code-drawn art or route_media.py prints no-route (exit 3).

Always name the route that ran ("OpenAI API", "Google Gemini API", "xAI API", "BytePlus ModelArk API", "fal.ai API", "Codex (local CLI)", "Grok (local CLI)"). Details: route-media.md.

Capability check (once per session)

Run python "<skill-dir>/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, never a key), the local readiness of each CLI and the resolved order (routeOrder). If encoding.stdout fails, set PYTHONUTF8=1.

Generate (route_media.py)

NeedCommand
Which route would runpython "<skill-dir>/scripts/route_media.py" resolve --kind image (or video; --references N)
One image, still or editpython "<skill-dir>/scripts/route_media.py" image --prompt-file <txt> --reference <png> --size 1024x1024 --out-dir <new> (--reference repeatable, in the order the prompt names them)
Animate an approved stillpython "<skill-dir>/scripts/route_media.py" video --prompt-file <txt> --reference <still.png> --last-frame <still.png> --duration 6 --resolution 720p --out-dir <new>
A route or model of the user's choiceadd --route api, local, openai, gemini, xai, byteplus, fal, fal:<endpoint-id>, codex-cli, grok-cli or grok-acp; --model <id>, --tier draft or hero, --provider-option [PROVIDER:]KEY=VALUE
The plan and estimate firstadd --dry-run (no key is used, nothing is sent or written)

Success prints one ASCII JSON line and exits 0: {"status":"ok","route":"api:openai","artifact":"<out-dir>/generated.png","sha256":...,"estimateUsd":...} plus model, job and, for video, lastFrameUsed, durationRequested and durationUsed (a length is snapped to the nearest one the model renders; Grok (local CLI) renders 6 or 10 s and never pins a last frame) and crop when the frames were padded to 16:9 for a model without 1:1. Every clip is published without audio. No route prints {"status":"no-route","fallback":"codeart2d"} and exits 3. A failure prints one error: <route>: <code>: <message> line and exits 1. A route whose account cannot serve the request (no credit, no access, not signed in) passes it to the next route; a refusal such as moderation stops. Write prompts yourself into UTF-8 files; local routes take the size and every instruction from the prompt.

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

Keys

Each provider reads only its own key: OPENAI_API_KEY, GOOGLE_API_KEY or GEMINI_API_KEY (GOOGLE_API_KEY wins), XAI_API_KEY, ARK_API_KEY (BytePlus ModelArk) and FAL_KEY (fal.ai), from the environment or from the user config file, never from a project: %APPDATA%\agent-sprite-forge\config.json on Windows, ~/.config/agent-sprite-forge/config.json elsewhere ($XDG_CONFIG_HOME when set), as {"OPENAI_API_KEY": "...", "FAL_KEY": "..."} with optional "models" and "providers": {"order": [...]}. Never print, log, commit or paste a key, and never put one in a prompt. A Codex or Grok sign-in is never an API key.

Spend and the ledger

Every call, paid or local, is a line in <project>/.forge/ledger.jsonl with its estimate (estimateUsd is null when no verified price exists; say "price unknown"). There is no cap by default; --budget-usd, --max-calls, FORGE_MAX_PAID_REQUESTS and FORGE_SESSION_IMAGES / FORGE_SESSION_VIDEOS set one when the user asks. python "<skill-dir>/scripts/media_ledger.py" summary shows spend; media_ledger.py settle <id> --status ... closes an unknown outcome.

Lower-level tools

NeedCommand
One API request by hand (dry run until --execute)generate_media.py image or video with --provider, --model, --prompt-file, --out-dir (api-usage.md)
Poll or download a video or fal.ai job without paying againgenerate_media.py resume --job <out>/job.json
One local CLI run by handcli_media.py image --route codex-cli --prompt-file <txt> --output-dir <new> --execute (cli-routes.md)
A local run timed out or was interruptedcli_media.py resume --run <id>, then --adopt (never reruns the CLI)
Codex made an image that is not in the projectcli_media.py adopt --codex-thread <thread-id> --output-dir <new>
Many jobsgenerate_media.py batch or cli_media.py batch
Verify a local route ahead of time (optional)forge_doctor.py --verify-route <route> --execute (one quota call)

Host notes

  • Codex: image_gen is your own tool: with no configured key use it and adopt the result (cli_media.py adopt); scripts reach Codex (local CLI) through route_media.py. This skill is explicit-only in Codex.
  • Claude Code: no media tools; route_media.py takes the API or the local CLIs. <skill-dir> is ${CLAUDE_SKILL_DIR}; look at results with Read.
  • Grok: its native media tools are your own tools; the same grok executable is the "Grok (local CLI)" route for other hosts. Agent setups: agent-profiles/README.md.

Commands and outputs

Run each tool as one line from the user's project root: python "<skill-dir>/scripts/<tool>.py" .... Outputs go to a new --out-dir inside the project. Results are raw media: hand them to the owning skill for identity, size, alpha, motion and seam checks. Keep prompts, input hashes, job ids and result hashes; report the model requested and the model returned separately. Providers: provider-survey.md (last verified 2026-10-06, with the shutdown dates); capabilities: references/capabilities.json (python "<skill-dir>/scripts/media_providers.py" list); prices: references/prices.json; data contracts: references/schemas/media.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 19 other files (scripts, references) in skills/generate2dmedia of 0x0funky/agent-sprite-forge.

  • SKILL.md
  • agents/openai.yaml
  • references/agent-profiles/README.md
  • references/agent-profiles/video-agent.md
  • references/api-usage.md
  • references/capabilities.json
  • references/cli-routes.md
  • references/prices.json
  • references/provider-survey.md
  • references/route-media.md
  • references/schemas/common.schema.json
  • references/schemas/media.schema.json
  • scripts/cli_media.py
  • scripts/forge_doctor.py
  • scripts/generate_media.py
  • scripts/media_config.py
  • … and 4 more

Open the folder on GitHubat commit 5324342

Compare with similar skills

Forge Media Route Layer 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.

Forge Media Route Layer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Forge Media Route Layer this skill0x0funky/agent-sprite-forge4.4k—~2.2kAutomated safety check: PassMIT
Fal AI Mediaaffaan-m/ECC276k4 repos~1.9kAutomated safety check: PassMIT
Fal AI Mediaaffaan-m/ECC276k2 repos~1.2kAutomated safety check: PassMIT
Fal AI Mediaaffaan-m/ECC276k—~1.4kAutomated safety check: PassMIT
Nbcraftjieyefriic/nbcraft155—~2.8kAutomated safety check: PassMIT
AI Media GeneratorHao0321/ai-media-generator258—~5.6kAutomated safety check: PassMIT

Similar skills

  • Fal AI Media

    affaan-m/ECC

    Unified media generation via fal.ai MCP — image, video, and audio.

    276k GitHub starsUsed in 4 repos~1.9k tokens
    Media & CreativeAuto-check passed
  • Fal AI Media

    affaan-m/ECC

    通过 fal.ai MCP 实现统一的媒体生成——图像、视频和音频。涵盖文本到图像(Nano Banana)、文本/图像到视频(Seedance、Kling、Veo 3)、文本到语音(CSM-1B),以及视频到音频(ThinkSound)。当用户想要使用 AI 生成图像、视频或音频时使用。

    276k GitHub starsUsed in 2 repos~1.2k tokens
    Media & CreativeAuto-check passed
  • Fal AI Media

    affaan-m/ECC

    fal.ai MCPによる統合メディア生成(画像、動画、音声)。テキストから画像(Nano Banana)、テキスト/画像から動画(Seedance、Kling、Veo 3)、テキストから音声(CSM-1B)、動画から音声(ThinkSound)をカバーします。ユーザーがAIで画像、動画、音声を生成したい場合に使用します。

    276k GitHub stars~1.4k tokensUpdated 4 days ago
    Media & CreativeAuto-check passed
  • Nbcraft

    jieyefriic/nbcraft

    Multi-backend Image + Video Generation CLI (nb command). An agent skill from jieyefriic/nbcraft.

    155 GitHub stars~2.8k tokensUpdated 5 mo ago
    Media & CreativeAuto-check passed
  • AI Media Generator

    Hao0321/ai-media-generator

    為使用者產生高品質的 AI 生圖、生影片、生音樂提示詞,並在需要時透過瀏覽器自動化實際送到目標平台。涵蓋 OiiOii、Kling 3.0/O-series、Seedance 2.0/2.5、Suno v5.5、Seedream 5.0/4.0、Vidu Q3、Midjourney V8.1、Flux 1.1 Pro / Kontext、Runway Gen-4.5 /…

    258 GitHub stars~5.6k tokensUpdated 2 mo ago
    Media & CreativeAuto-check passed
  • Higgsfield Models

    OSideMedia/higgsfield-ai-prompt-skill

    A skill your agent uses when the user asks which model to use, wants to compare models, or needs guidance on selecting between Kling, Wan (incl.

    707 GitHub stars~7k tokensUpdated 12 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.4k GitHub stars~2.5k tokensUpdated 3 days ago
    Auto-check passed
  • 2D Map and Scene Generator

    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.

    4.4k GitHub stars~2.9k tokensUpdated 3 days ago
    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.4k GitHub stars~3.6k tokensUpdated 3 days ago
    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.4k GitHub stars~3.8k tokensUpdated 3 days ago
    Auto-check passed

Questions about Forge Media Route Layer

What does Forge Media Route Layer do?

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. py` is the one command that produces raw media for the Forge skills.ai), your preferred order first, then the user's own signed-in Codex or Grok CLI, and prints a single JSON line with the route, artifact, SHA-256 and a cost estimate.

When should I use Forge Media Route Layer?

Forge Media Route Layer fits situations like: A Forge skill needs a generated image, reference edit or image-to-video clip; checking once per session which generation routes work on this machine; configuring a provider API key or asking what has been spent.

How do I install Forge Media Route Layer in Claude Code?

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

How do I install Forge Media Route Layer in Codex?

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

Can I use Forge Media Route Layer 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 generate2dmedia -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate2dmedia, .gemini/skills/generate2dmedia, .github/skills/generate2dmedia and .opencode/skills/generate2dmedia in your project.

What does Forge Media Route Layer need to run?

Going by SKILL.md and its folder, Forge Media Route Layer needs Python for the scripts in its folder, the command-line tools its instructions call (python) and credentials named OPENAI_API_KEY, GOOGLE_API_KEY, FAL_KEY and GEMINI_API_KEY. Our summary lists: Python, for `route_media.py` and `forge_doctor.py`; An API key for a supported provider, or a signed-in Codex or Grok CLI.

Does Forge Media Route Layer 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 Forge Media Route Layer 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 Forge Media Route Layer use?

Forge Media Route Layer 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 Forge Media Route Layer use?

About 2.2k tokens (SKILL.md is roughly 8.6k 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 40k tokens, read only when the agent opens those files.

What are the alternatives to Forge Media Route Layer?

Skills that share tags, products or a category with Forge Media Route Layer: Fal AI Media (affaan-m/ECC, 276k stars), Fal AI Media (affaan-m/ECC, 276k stars), Fal AI Media (affaan-m/ECC, 276k stars) and Nbcraft (jieyefriic/nbcraft, 155 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Forge Media Route Layer?

0x0funky (a GitHub user) maintains it in 0x0funky/agent-sprite-forge, which has 4,363 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.