Community程式設計與開發github.com

fal-assets

透過 fal MCP 伺服器、`um fal` CLI(REST)或 `fal api` 使用 fal(fal.ai)來產生遊戲素材。涵蓋透明背景的 sprite 與圖示、一致的變體與動畫幀、像素藝術、無縫紋理、PBR 材質貼圖、圖片轉 3D 模型、重新網格化、自動骨架綁定、音效、音樂、語音台詞以及預告片或過場影片。每當模組需要新的美術、音訊或 3D 模型,或是使用者提到 fal、產生 sprite、材質、模型、音效或音樂時使用。

fal-assets 是什麼?

此技能使 AI 代理程式能夠透過 fal MCP 伺服器、`um fal` CLI 或直接的 `fal api` 指令,充分利用 fal.ai 平台產生廣泛的遊戲素材。它提供統一的介面來存取數百個生成模型,涵蓋透明背景的 sprite、像素藝術、無縫紋理、PBR 材質貼圖、圖片轉 3D 模型、自動骨架綁定、音效、音樂、語音台詞以及影片。主要優點是它抽象化了與 fal API 直接互動的複雜性,提供如 `um fal sprite` 或 `um fal sfx` 等簡單的指令,用於常見遊戲素材類型,同時自動處理檔案上傳、任務輪詢和下載。此技能支援 Claude Code、Codex、Cursor、VS Code/Copilot 和 Gemini CLI,無論是透過 MCP 設定還是本地 CLI 工具。它強調成本控制、可重複性(透過記錄在 `fal_manifest.jsonl` 中的提示詞與種子)以及產出素材的後處理,包括音訊轉換和無縫紋理製作,使其成為 AI 輔助遊戲開發中不可或缺的工具。

相容平台✓Claude Code✓Codex CLI✓Cursor✓Gemini CLI
npx skills add https://github.com/rehan-remade/universal-modder/tree/main/skills/fal-assets

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Game assets with fal

fal 在一個 API 金鑰背後運行數百個生成模型。每當模組需要尚未存在的內容時(例如武器 sprite、頭目、從 16 個角度渲染的單位、可拼接的地板、雷射音效、頭目音樂、語音台詞),請使用它。

設定(每次 session 檢查一次)

  • 金鑰。 必須設定 FAL_KEY(在 https://fal.ai/dashboard/keys 建立一個)。um fal 也會從工作目錄的 .env 檔案讀取它(FAL_KEY=...)。切勿將金鑰寫入模組檔案中;um publish check 會標記洩漏的金鑰。

  • MCP。 fal 託管的 MCP 伺服器是 https://mcp.fal.ai/mcp,標頭為 Authorization: Bearer $FAL_KEY。儲存庫已為每個代理程式預先設定:

    • Claude Code:.mcp.json
    • Codex:.codex/config.toml
    • Cursor:.cursor/mcp.json
    • VS Code/Copilot:.vscode/mcp.json
    • Gemini CLI:gemini-extension.json

    手動新增的方法:

    • Claude Code:claude mcp add --transport http fal https://mcp.fal.ai/mcp --header "Authorization: Bearer $FAL_KEY"
    • Codex(~/.codex/config.toml):[mcp_servers.fal],搭配 url = "https://mcp.fal.ai/mcp" 與 bearer_token_env_var = "FAL_KEY"
    • 其他:將其 MCP 設定指向上述 URL 和標頭。 MCP 工具:search_models、recommend_model、get_model_schema、get_pricing、run_model、submit_job/check_job/get_job_result、upload_file、search_docs。
  • 沒有 fal 金鑰? 對於圖片,um comfy 改用本機的 ComfyUI 伺服器(um comfy status,然後 um comfy image "..." --sprite)。它沒有音訊、3D 或影片配方。

  • CLI 替代方案: pip install fal 提供 fal api <endpoint> key=value key:=json;genmedia CLI(genmedia run ... --json --download)也對代理程式友善。

使用哪個介面

  • 探索(哪個是目前最適合 X 的模型、其輸入、價格):fal MCP recommend_model / search_models / get_model_schema / get_pricing,或 um fal search、um fal schema <endpoint>、um fal price <endpoint>。模型目錄每週更新。以下預設值在 2026 年 9 月是最新的;在大量生成前請先檢查。
  • 任何需要存放在磁碟上的內容(每個遊戲素材):um fal <recipe>。它會上傳本機輸入、排隊、輪詢、下載每個輸出檔案,並將端點、輸入、種子和請求 ID 附加到 <out>/fal_manifest.jsonl,因此每個素材都可以被追蹤和重新生成。
  • 快速查看或一次性的 URL 即可:MCP run_model。

配方(um fal <recipe> --help 查看選項;--model 覆蓋端點;--set k=v 傳遞額外輸入)

素材指令預設端點
Sprite / 圖示,透明背景um fal sprite "<主體, 視角, 風格>" --name xopenai/gpt-image-2(background=transparent)
概念藝術、關鍵美術、背景um fal image "<提示>" --aspect 16:9fal-ai/nano-banana-2
一致的變體、額外幀、重新上色、同一角色新姿勢um fal edit "<變更>" --ref base.pngfal-ai/nano-banana-2/edit
背景移除um fal rmbg in.pngfal-ai/birefnet/v2
從任何圖片產生乾淨的像素藝術um fal pixelate in.png --colors 24fal-ai/image2pixel
放大um fal upscale in.png --factor 2fal-ai/seedvr/upscale/image
無縫拼接紋理um fal texture "青苔鵝卵石"fal-ai/z-image/turbo/tiling
PBR 貼圖(basecolor、normal、roughness、metalness、height)um fal pbr "鏽蝕金屬板"fal-ai/patina/material
圖片 → 紋理化 3D 模型(GLB)`um fal model3d concept.png [--engine trellis2hunyuan
自動骨架綁定類人角色,可選動畫um fal rig character.glb --animatefal-ai/meshy/rigging
音效um fal sfx "等離子步槍射擊,有衝擊感" --seconds 1.2fal-ai/elevenlabs/sound-effects/v2
音樂um fal music "緊張的頭目戰,晶片音樂,150 BPM" --seconds 90elevenlabs/music/v2.5
語音台詞um fal voice "你敢挑戰我嗎?" --voice-id Adamfal-ai/elevenlabs/tts/eleven-v3
預告片 / 過場片段um fal video still.png "鏡頭繞著頭目旋轉"bytedance/seedance-2.5/image-to-video
其他任何內容um fal run <endpoint> key=value key:=json [email protected]任何

其他有用的端點:

  • 3D:tripo3d/tripo/remesh 和 fal-ai/meshy/v5/remesh(低多邊形,遊戲就緒)、fal-ai/trellis-2/retexture。
  • 動作:fal-ai/hunyuan-motion(文字 → 動作)。
  • 圖示:fal-ai/recraft/v4.1/text-to-vector(SVG 圖示)。
  • 影片去背:pixelcut/video-background-removal。
  • 音樂:google/lyria-3.5。
  • 語音:fal-ai/minimax/speech-2.8-hd。

提示詞設計:讓遊戲美術符合遊戲風格

  • 先查看遊戲自己的素材: 像素尺寸、輪廓、調色板、透視、面向、精細程度。將其放入可重複使用的風格後綴中。對於 Terraria:"16 位元像素藝術遊戲 sprite,Terraria 風格,清晰的深色輪廓,有限的調色板,置中,純白平背景,無陰影,無文字"。
  • 明確描述視角和方向: 對於手持武器使用 "完全水平側視圖,槍口朝右",對於敵人使用 "從側面看,面向左",對於落下的炸彈使用 "筆直指向下方"。遊戲引擎有慣例(Terraria 物品朝右,NPC 面向左),之後修正方向會犧牲品質。
  • 背景: 透明(gpt-image-2)或純色,讓 um sprite cutout 可以進行泛填充。避免漸層、風景和地面陰影。如果出現柔和的陰影,請在去背中使用 --grey / --keep-top。
  • 玩家 / 隊伍顏色: 在應使用玩家顏色的部分要求 "明亮飽和的藍色點綴",然後 um sprite team-mask --hue blue 會將它們變成遮罩。
  • 一組素材的一致性: 產生一張主角圖片,然後使用編輯端點以主角作為 --ref 衍生其餘部分("同一個機器人,現在正在開火,槍口閃光")。不要用一個提示詞要求一整張 sprite sheet;網格排列會不均勻。
  • 同一物體的多個角度或幀: 走 3D 路線。取得概念圖,執行 um fal model3d,然後從遊戲攝影機執行 um render3d(素材管線技能)。這就是 AoE2 機器人計程車獲得 16 個一致朝向 × 5 個動畫的方法。
  • 除非需要,否則不要在美術中加入文字或標誌: 模型很喜歡添加這些。

遊戲引擎用的音訊

  • SFX 和音樂端點回傳 MP3。請轉換為引擎所需的格式:
    • ffmpeg -i x.mp3 -ar 44100 x.wav(XNA/tModLoader,大多數引擎);
    • ffmpeg -i x.mp3 -c:a libvorbis -q:a 5 x.ogg(Minecraft、Godot、Unity);
    • 先裁剪靜音:-af silenceremove=start_periods=1:start_threshold=-50dB。
  • 循環:um fal sfx ... --loop,或要求音樂模型產生可循環的音軌並交叉淡出結尾。
  • 保持 SFX 簡短(0.2-2 秒)並標準化音量(-af loudnorm=I=-16),使其能與遊戲內建音效搭配。

成本與禮儀

  • 為昂貴的項目定價: 在批次處理 3D、影片或長音樂之前,先查看價格(um fal price <endpoint> / MCP get_pricing)。對於超過約 20 次生成或任何影片規模的內容,請先告知使用者粗略成本。
  • 廉價疊代: 在探索階段使用低品質或低解析度(--quality low、--res 0.5K),然後用完全相同的提示詞(以及在支援的情況下使用相同的種子)以完整品質重新執行選中的結果。
  • 可重複性: 將 fal_manifest.jsonl 與素材保存在一起;它記錄了提示詞、種子和請求 ID。
  • 致謝: 在模組的 README 中,感謝素材是使用 fal 生成的,並列出模型名稱。請查看模型的授權頁面以了解商業用途的相關資訊。

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

asset-pipeline

Turn generated or hand-made art into exactly what a game engine loads. Covers sprite cutout, trim and nearest-neighbour fitting to frame sizes, pixelation to a palette, sprite sheets and strips, player/team-colour masks, seamless textures, and rendering a 3D model into sprite frames from the game

game-automation

Launch, see and drive a real game so an agent can test its own mods. Covers launching via Steam or the exe, windowed mode at a fixed size, screenshots of the game window (GPU-safe capture), clicking and typing into menus, holding keys, relative mouse, crash-reporter cleanup, killing by PID, reading logs, scripted test scenes, and an in-game JSON bridge that lets an agent observe and act. Windows-first (also from WSL), with notes for Linux and macOS. Use when a mod must be verified in game, when navigating menus automatically, or when building a repeatable test or demo scene.

game-recon

Figure out how a specific installed game can be modded, before writing any mod code. Covers where it

game-research-websearch

Research a game, engine or modding technique on the open web with archive-aware, rate-limit-safe searches — Wayback Machine/archive.today for dead forums (XeNTaX, Zenhax, old threads), GitHub code/repo search, Nexus/Steam Workshop/Thunderstore APIs, Reddit JSON, YouTube transcripts, plus archive snapshots as evidence. Use when starting work on a game (

mashup-mods

Build cross-game mashups and total conversions, the

mod-any-game

Mod a PC game the user owns, taking an idea to working in the real game and recorded. It covers new items, weapons, enemies, bosses, units, civilizations, mechanics, art, sound, VR and cross-game mashups. Use when the user wants to mod, extend, hack on, reverse engineer or mash up a game (

port-a-mod

Port an existing mod to a newer game version or another mod loader while keeping its behaviour, values and quirks. Typical cases are an old Forge 1.7.10 or 1.12 Minecraft mod moving to modern Fabric or NeoForge, a Skyrim LE plugin moving to SE/AE, or a tModLoader 1.3 mod moving to 1.4. It covers pinning one source version, a private decompiled reference, an adaptation matrix, extracting the mod

publish-mod

Package and release a finished game mod. Covers the pre-release lint (no game files, decompiled code or leaked keys), README and install steps, credits and AI disclosure, versioning, where to upload (Nexus Mods, Steam Workshop, Thunderstore, mod.io, GitHub releases), and the post with a video. Use when the user wants to ship, share, upload, release or post a mod.

reverse-engineering

Read how a game actually works so a mod can hook it. Decompile .NET/Mono (ILSpy), IL2CPP (Cpp2IL, Il2CppDumper), Java (Vineflower) and native code (Ghidra, IDA, via MCP servers); dump data and asset formats; reverse-engineer a binary file format and prove it with a round trip; read live memory (Cheat Engine, Frida, x64dbg); find render passes (RenderDoc). Use when a mod needs game internals, e.g.

share-field-notes

Search and contribute to the shared AI-modding knowledge base, where field notes record how specific games were modded, decompiled or reverse-engineered (exact versions, route, engine facts, verification, gotchas). Use before starting work on a game (

showcase-video

Record and cut a short showcase video of a game mod, or a compilation of clips, ready to post on X/YouTube. Records the game window with only the game

相關技能