Community编程与开发github.com

fal-assets

使用 fal(fal.ai)通过 fal MCP 服务器、`um fal` CLI(REST)或 `fal api` 生成游戏素材。涵盖带透明背景的精灵和图标、一致变体与动画帧、像素艺术、无缝纹理、PBR 材质贴图、图像转 3D 模型、重网格化、自动骨骼绑定、音效、音乐、语音台词以及预告片或过场视频。每当模组需要新的美术、音频或 3D 模型,或者用户提及 fal、生成精灵、纹理、模型、SFX 或游戏音乐时使用。

fal-assets 是什么?

此技能通过 fal.ai 平台为游戏模组开发提供全面的程序化资产生成。它将 fal 的数百个生成模型封装成便捷、可复现的命令行工作流,支持从概念设计到最终资源的一站式产出,非常适合集成到 Claude Code、Cursor、Codex 等 AI 代理工具中。技能覆盖了从 2D 资产(精灵、图标、无缝纹理、像素艺术)到 3D 模型(图像转 GLB、重网格化、自动骨骼绑定),再到音频(音效、音乐、语音)和视频(预告片/过场动画)的全部游戏素材类型。通过 `um fal <recipe>` CLI 命令,不仅能上传文件、排队、轮询结果,还会自动将每次生成的端点、种子、请求 ID 记录到 `fal_manifest.jsonl` 文件中,确保所有资产均可追溯、可复现——这在迭代游戏素材时至关重要。对于 AI 代理,该技能详细说明了 MCP 服务器的配置方式(Claude Code、Codex、Cursor、VS Code/Copilot 和 Gemini CLI),并提供了 `search_models`、`recommend_model`、`run_model` 等工具用于模型发现与调用。同时,它还包含游戏专用提示词技巧(如观察现有资产风格、明确视角方向、保持角色一致性)、音频格式转换指南以及成本控制建议,是模组开发者在 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 的新对话。

文档

使用 fal 生成游戏资产

fal 仅凭一个 API 密钥即可调用数百个生成模型。当模组需要尚不存在的内容时使用它:一把武器精灵、一个 Boss、一个从 16 个角度渲染的单位、一张可平铺的地板、一个激光音效、一段 Boss 音乐、一句配音台词。

设置(每会话检查一次)

  • 密钥。 必须设置 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 传递额外输入)

资产类型命令默认端点
精灵/图标,透明背景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 "紧张 Boss 战,芯片音乐,150 BPM" --seconds 90elevenlabs/music/v2.5
语音台词um fal voice "你敢挑战我?" --voice-id Adamfal-ai/elevenlabs/tts/eleven-v3
预告片/过场片段um fal video still.png "镜头环绕 Boss"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 位像素艺术游戏精灵,Terraria 风格,清晰的深色轮廓,有限调色板,居中,纯平白色背景,无阴影,无文字"。
  • 明确描述视角和朝向: 手持武器为"完美的水平侧视图,枪口朝右",敌怪为"从侧面看到,朝向左侧",下落炸弹为"笔直向下指向"。引擎有惯例(Terraria 物品朝右,NPC 面朝左),后期修正朝向会影响质量。
  • 背景: 透明(gpt-image-2)或单一颜色,以便 um sprite cutout 进行泛洪填充。避免渐变、风景和地面阴影。如果出现柔和阴影,在剪切中使用 --grey / --keep-top。
  • 玩家/队伍颜色: 在应使用玩家颜色的部分要求"明亮的饱和蓝色点缀",然后 um sprite team-mask --hue blue 将其转为遮罩。
  • 一组资产的一致性: 先生成一个主角图像,然后使用编辑端点以主角作为 --ref 派生其余部分("同一机器人,现在正在开火,枪口闪光")。不要用一个提示词请求整个精灵表;网格会不均匀。
  • 同一对象的多个角度或帧: 使用 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

相关技能