gamedev-plugin/skills/threejs-3d-generator/SKILL.md
Generate, texture, rig, animate, stylize, convert, and download 3D assets for Three.js games using the Tripo API. Use for text-to-3D, image-to-3D, 2D concept to 3D conversion, game-ready GLB/FBX assets, characters, creatures, buildings, props, weapons, terrain pieces, auto-rigging, animation retargeting, model texturing, LEGO/voxel/Minecraft-style stylization, low-poly/quad conversion, and browser asset pipelines. Pair with threejs-image-generator for concepts, texture references, sky/background/terrain textures, logos, icons, and GUI art before image-to-3D generation.
npx skillsauth add bernatmv/ai-rules threejs-3d-generatorInstall 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.
Create production-oriented 3D assets, then prepare them for Three.js games. This is the Three.js game system's 3D-generation layer; it uses Tripo as the provider for text-to-3D, image-to-3D, texturing, rigging, retargeting, stylization, conversion, and downloadable GLB/FBX outputs.
Never store API keys in skill files or client-side game code. The script checks:
--api-keyTRIPO_API_KEYStep 0 before declaring the key unavailable:
bash ~/.claude/skills/threejs-game-director/scripts/probe_asset_credentials.sh
For Codex installs:
bash ~/.codex/skills/threejs-game-director/scripts/probe_asset_credentials.sh
Paste the literal TRIPO_API_KEY=SET|MISSING output in the report. Do not conclude the key is unavailable from a plain non-interactive shell until this probe has sourced the user's shell profiles.
When the probe says SET but threejs_3d_asset.py reports a missing key, the key is exported in an interactive-only profile (e.g. ~/.zshrc). Wrap script invocations the same way the probe does:
zsh -c 'source "$HOME/.zprofile" 2>/dev/null; source "$HOME/.zshrc" 2>/dev/null; python3 .../threejs_3d_asset.py ...'
Use the API only from local/server-side tooling. Generated model download URLs expire quickly, so download outputs immediately after successful tasks.
Reference gate:
references/api-notes.md before provider API work, endpoint/task decisions, model-version choices, polling, postprocess, conversion, rigging, animation, or download handling.references/threejs-integration.md before importing Tripo outputs into a browser game or advising GLB/FBX integration.references/image-generator-workflows.md before pairing threejs-image-generator with this skill for 2D concepts, texture references, UI art, logos, decals, or image-to-3D inputs.Track required references in a reference ledger with yes/no, path, and failure reason. Do not mark an asset pipeline complete while a required reference is skipped.
Run from the user's current project directory:
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py --help
If installed in Codex instead of Claude, use:
python3 ~/.codex/skills/threejs-3d-generator/scripts/threejs_3d_asset.py --help
Recommended premium game hero model:
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py text \
--prompt "game-ready [hero asset], strong readable silhouette, layered hard-surface detail, PBR materials, clean topology for browser game, centered pivot, 3/4 view, no text" \
--model-version v3.1-20260211 \
--texture-quality detailed \
--geometry-quality detailed \
--wait --download --out-dir assets/models/hero
Text to 3D:
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py text \
--prompt "game-ready sci-fi hover bike, sleek armored panels, readable silhouette, PBR, front facing" \
--model-version v3.1-20260211 \
--texture-quality detailed \
--geometry-quality detailed \
--wait --download --out-dir assets/models/hover-bike
Image to 3D from a local threejs-image-generator concept:
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py image \
--image assets/concepts/hover-bike-front.png \
--model-version v3.1-20260211 \
--enable-image-autofix \
--texture-alignment original_image \
--texture-quality detailed \
--wait --download --out-dir assets/models/hover-bike
Status and download:
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py status TASK_ID
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py download TASK_ID --out-dir assets/models
Texture, rig, animate, or convert:
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py postprocess \
--type texture_model --original-task-id TASK_ID \
--texture-prompt "brushed gunmetal, orange hazard decals, worn edges" \
--wait --download --out-dir assets/models/retextured
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py postprocess \
--type animate_prerigcheck --original-task-id TASK_ID --wait
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py postprocess \
--type animate_rig --original-task-id TASK_ID --rig-type biped --spec tripo --wait
# animate_retarget takes the RIG task ID, not the generation task ID.
# Batch up to 5 presets per task via --animations.
# NEVER pass --animate-in-place: it corrupts the bake (mirrored limbs / exploded
# skinning). Strip root motion in the engine instead.
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py postprocess \
--type animate_retarget --original-task-id RIG_TASK_ID --model-version v2.5-20260210 \
--animations preset:idle,preset:walk,preset:run \
--wait --download --out-dir assets/models/animated
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py postprocess \
--type conversion --original-task-id TASK_ID --format GLTF \
--face-limit 20000 --wait --download --out-dir assets/models/gltf
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py postprocess \
--type stylize_model --original-task-id TASK_ID --style voxel \
--wait --download --out-dir assets/models/voxel
Animated character pipeline (generation -> prerigcheck -> validated rig with retries -> retargets -> downloads). The pipeline routes itself by body plan: biped characters automatically use the v1.0-20240301 anatomical rig with one FBX per animation (plain preset names are mapped onto the preset:biped:* library); creatures use the v2.5-20260210 rig with GLB clips:
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py character-pipeline \
--prompt "stylized cyber runner character, T-pose, full body, game-ready outfit, readable silhouette" \
--animations preset:idle,preset:walk,preset:run,preset:jump \
--out-dir assets/models/cyber-runner
# Creature example: stance language matters — generate in the pose the preset expects.
python3 ~/.claude/skills/threejs-3d-generator/scripts/threejs_3d_asset.py character-pipeline \
--prompt "stylized wolf, quadrupedal stance, all four legs planted and separated, full body" \
--rig-type quadruped --animations preset:quadruped:walk \
--out-dir assets/models/wolf
Use threejs-image-generator before 3D generation when the asset benefits from a strong 2D reference:
Load references/image-generator-workflows.md for prompt patterns before generating or editing 2D inputs.
Load references/threejs-integration.md before importing Tripo outputs into a browser game. In short:
GLTFLoader for loading.AnimationMixer for rigged/animated GLBs.threejs-3d-generator / threejs-image-generator passes.Load references/api-notes.md for the full parameter tables. The rules that prevent most failures:
--quad and --generate-parts off (generate_parts disables texturing; quad forces FBX output).animate_prerigcheck first (it takes no model version) and use the detected rig_type for animate_rig and preset selection. riggable=false means regenerate with a clearer pose, not force-rig.riggable=true does not guarantee a usable rig. After rigging, validate the skeleton before retargeting: threejs_3d_asset.py validate-rig rig-model.glb --rig-type biped (the character-pipeline does this automatically). Check both presence AND chain depth: a rig with a 1-bone leg or 2-bone arm warps every clip.character-pipeline --rig-retries N (default 2) automates this, and --model-task-id TASK_ID resumes from an existing generation. Armored/hard-surface characters need the most retries; organic meshes usually rig first try.avian for wing chains — and drive wings procedurally in Three.js or via external clips on a mixamo-spec rig.NlaTrack, NlaTrack.001, … in request order — map by index and rename after import.character-pipeline routes this automatically; only override --rig-model-version deliberately:
v1.0-20240301 (anatomical Mixamo-like skeleton with twist bones + the large preset:biped:* clip library: idle, walk, run, slash, jump, dances, ...). The v2.x limb-chain rigger went 0/16 on humanoid meshes — armored or not, T-pose or A-pose — always producing asymmetric chains.v2.5-20260210 (v2.x handles quadruped/avian well: symmetric 5-6 bone chains).--model-version default (omit the version): the retarget enum rejects explicit v1.0-20240301 (HTTP 400 code 2017) but the server default handles v1.0 rigs.--out-format fbx (the script enforces this): Tripo's GLB bake on this path exports twist-bone transforms in the wrong space and limbs collapse into the torso — the FBX of the same task is correct. Load with three.js FBXLoader or convert offline. v2.5 creature retargets are fine as GLB.--spec tripo (default) when Tripo presets will be retargeted; --spec mixamo rigs cannot be used with Tripo retarget and are only for external animation pipelines.animate_retarget takes the RIG task ID. Batch up to 5 presets per task with --animations.preset:attack; use preset:slash/preset:shoot). Non-biped rig types have a single locomotion preset each; plan extra creature motion procedurally or via external retargeting.threejs_3d_asset.py validate-animation clip.glb (keyframe QA: flags scale tracks, limb-stretching translation tracks, extreme rotations, and reports per-clip duration/channel coverage), then verify motion visually in the engine.--animate-in-place (verified to corrupt clips: mirrored/crossed limbs on v1.0 rigs, exploded skinning on v2.5). Keep root motion baked and convert to in-place at import: zero only the HORIZONTAL components of the root bone's position track, keep vertical (jumps and gait bob live there). Gameplay code then drives locomotion. Exact snippet in threejs-integration.md.gltf.animations clip names and counts before wiring the AnimationMixer.smart_low_poly, face_limit, later conversion, or low-poly postprocess when the asset is too expensive.development
Keyword research and validation with real search-demand data — never ship keywords from intuition alone. Probes Google Autocomplete per language (free, no account) to prove demand and discover the exact phrasing people type, checks SERPs for winnability, and uses Keyword Planner/Ahrefs/Semrush exports when the user has access. Activates when: choosing or reviewing SEO keywords, meta keywords, page titles, article topics or slugs, landing page copy targeting search, App Store/ASO keyword fields, multilingual keyword sets, 'what should we rank for', 'keyword analysis', or auditing why a page doesn't rank. Also invoke it as a validation pass whenever another skill or task produces a keyword list.
development
Automate YooAsset hot-update and asset bundles — build bundles, run Editor simulate builds, manage Collector groups, analyze BuildReport, and validate runtime. Use when building or simulating YooAsset bundles, configuring collectors, or validating hot-update assets, even if the user just says "热更" or "打AB包". 自动化 YooAsset 热更新与资源包(构建 bundle、编辑器模拟构建、管理 Collector 分组、分析 BuildReport、运行时校验);当用户要构建或模拟 YooAsset 资源包、配置 collector、或校验热更资源时使用。
development
Source-anchored design rules for YooAsset v2.3.18 — initialization, default-package shortcuts, play modes, asset handles, loading, updates, filesystem, build, and pitfalls. Use when writing or reviewing YooAsset code, initializing packages, loading assets via handles, setting up hot-update/download, or choosing a play mode, even if the user just says "热更" or "资源包". 为 YooAsset v2.3.18 提供源码锚定的设计规则(初始化、默认包快捷方式、运行模式、资源句柄、加载、更新、文件系统、构建、陷阱);当用户要编写或审查 YooAsset 代码、初始化 package、用句柄加载资源、配置热更/下载、或选择运行模式时使用。
data-ai
Last-resort guidance for safely hand-editing Unity serialized YAML (.unity/.prefab/.asset/.meta/ProjectSettings) — reference/fileID repair, GUID safety, and merge-conflict fixes. Use when REST cannot reach the change and YAML must be hand-edited — fixing m_Script GUIDs, broken fileID references, .meta files, or merge conflicts, even if the user just says "场景文件打不开" or "引用丢了". 安全手编 Unity 序列化 YAML(.unity/.prefab/.asset/.meta/ProjectSettings)的最后手段(引用/fileID 修复、GUID 安全、合并冲突修复);当 REST 无法触达、必须手编 YAML 时使用——修复 m_Script GUID、断裂 fileID 引用、.meta 文件或合并冲突。