.claude/skills/fal-ai-image/SKILL.md
Use fal.ai for text-to-image and image-edit generation, model comparison, queue-based image workflows, and cost-aware experiment tracking with Nano Banana and GPT Image endpoints.
npx skillsauth add dschonholtz/MultiMagicDungeonWeb fal-ai-imageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the user wants to generate or edit images through fal.ai, compare multiple marketplace image models, or build repeatable experiment workflows with prompts, references, outputs, and costs tracked in a consistent way.
fal gives one platform surface for many image models, but the useful controls still differ by model family. The right abstraction is:
Before generating, ask:
Core principles:
grok-imagine-image-t2igrok-imagine-image-editnano-banana-2-t2inano-banana-2-editnano-banana-pro-t2inano-banana-pro-editgpt-image-1.5-t2igpt-image-1.5-editFor tracked image jobs, this skill uses fal's queue API:
POST https://queue.fal.run/{endpoint_id}GET https://queue.fal.run/{endpoint_id}/requests/{request_id}/statusGET https://queue.fal.run/{endpoint_id}/requests/{request_id}Authentication uses:
Authorization: Key $FAL_KEYImportant platform headers for repeatable comparison runs:
X-Fal-Store-IO: 1x-app-fal-disable-fallback: trueThe runner also captures response headers such as:
x-fal-request-idx-fal-billable-unitsThe official fal-client SDK is valid and supported, but this repo's main requirement is portability inside a Codex skill. The raw queue endpoints are documented and stable enough for a deterministic wrapper, so the scripts in this skill stay on Python stdlib and can still be invoked with uv run.
Prompt like art direction, not like marketing copy:
For edit comparisons:
Background handling matters more than the prompt wording suggests:
gpt-image-1.5 is the safest option here when you genuinely need transparent output.nano-banana-2 and nano-banana-pro should be treated as chroma-key models for this workflow, not transparent-background models.#00FF00, with no gradients, no cast shadows on the background, no texture, and no green spill on the subject.#FF00FF sits too close to the warm red/purple bandana family and is more likely to contaminate edge colors.For text-to-image comparisons:
Do not overload first comparison runs with long prompt stacks. The first job is to test prompt adherence, identity preservation, and edit usefulness.
scripts/fal_queue_image_run.py
scripts/fal_platform_models.py
scripts/fal_image_experiment_matrix.py
Machine-readable tracking:
experiments/fal-image/ledger.jsonlexperiments/fal-image/ledger.csvexperiments/fal-image/<timestamp>-<slug>/batch.jsonHuman-readable tracking:
prompts/<timestamp>-...-prompts.mdlearnings/<timestamp>-...-learnings.mdGenerated images should still live under the appropriate public/assets/.../concepts/... path for the asset family being tested.
❌ Anti-pattern: flattening all image models into one fake prompt schema Why bad: you hide the controls that actually affect quality and cost. Better: use shared runner behavior plus explicit per-model presets and overrides.
❌ Anti-pattern: treating edit and generate as the same task Why bad: edit runs depend on reference discipline and preservation constraints that text-to-image runs do not. Better: keep separate presets and separate experiment configs for generation and editing.
❌ Anti-pattern: recording only prompts and final PNGs Why bad: you cannot audit request IDs, retries, or cost later. Better: always save raw JSON, normalized manifests, and ledger rows.
❌ Anti-pattern: comparing models with hidden fallback routing
Why bad: you may think you tested one endpoint but actually hit another route.
Better: set x-app-fal-disable-fallback: true on strict comparison runs.
❌ Anti-pattern: stuffing many reference images into every edit Why bad: it weakens edit control and makes failure analysis harder. Better: pass only the minimum reference images the edit actually needs.
❌ Anti-pattern: asking Banana-family models for transparency and trusting the result Why bad: you may get a faux-transparent dark backdrop instead of a clean extraction surface. Better: use an explicit chroma-key background and key it out later.
references/fal-platform-notes.mdreferences/fal-queue-and-inference.mdreferences/fal-image-models.mdassets/model-presets.jsonA good fal image workflow is not just "can it render." It is:
tools
# Skill: Extend the WebSocket Protocol Use this when adding a new message type. Both client and server must be updated together. ## Message flow ``` Client → Server: join, move, spell_cast, rename, [new type] Server → Client: welcome, player_join, player_leave, player_move, spell_cast, player_rename, [new type] ``` ## Step 1: Define the message before coding Document these before touching any file: - **Name**: snake_case - **Direction**: client→server, server→client, or
development
# Skill: Add a Three.js Feature to MultiMagicDungeonWeb This game is a **single monolithic `index.html`** — no build step, no bundler. Everything lives in one file. ## File structure inside index.html ``` <html> <head> ... styles ... </head> <body> <!-- HUD overlay divs: #hud, #rename-panel, etc. --> <canvas id="c"></canvas> <script type="module"> // === CONSTANTS (WS_URL, PLAYER_SPEED, HP_MAX, etc.) === // === GLOBALS (scene, camera, renderer, clock) === //
development
Creates simple Three.js web apps with scene setup, lighting, geometries, materials, animations, and responsive rendering. Use for: "Create a threejs scene/app/showcase" or when user wants 3D web content. Supports ES modules, modern Three.js r150+ APIs.
tools
# Skill: Test Multiplayer Locally Use this skill any time you need to verify multiplayer behavior in MultiMagicDungeonWeb. ## Stack - Game: `index.html` (open as `file://` — no HTTP server needed) - WS server: `server/index.js` on port 8080 - Node binary: `~/.nvm/versions/node/v22.22.0/bin/node` (shell aliases don't apply in Bash tool) ## Step 1: Start the WS server ```bash export PATH="$HOME/.nvm/versions/node/v22.22.0/bin:$PATH" cd /Users/douglasschonholtz/repos/MultiMagicDungeonWeb/server