$npx -y skills add majidmanzarpour/threejs-game-skills --skill threejs-3d-generatorGenerate, 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-riggin
| 1 | # Three.js 3D Generator |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | 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. |
| 6 | |
| 7 | Resolve `<this-skill-dir>` in the commands below in this order: `~/.claude/skills/threejs-3d-generator`, `~/.codex/skills/threejs-3d-generator`, `~/.agents/skills/threejs-3d-generator`, or repo `skills/threejs-3d-generator`. |
| 8 | |
| 9 | ## API Key |
| 10 | |
| 11 | Never store API keys in skill files or client-side game code, and never paste a key value into a report. The script reads `--api-key` or `TRIPO_API_KEY`. |
| 12 | |
| 13 | Step 0, before declaring the key unavailable: run this skill's own probe and paste its literal output into the report. |
| 14 | |
| 15 | ```bash |
| 16 | python3 <this-skill-dir>/scripts/threejs_3d_asset.py probe # prints TRIPO_API_KEY=SET|MISSING |
| 17 | ``` |
| 18 | |
| 19 | `TRIPO_API_KEY=MISSING` is only a valid skip/blocker reason when this output is shown. Keys defined only in a shell profile can be absent from the process env; if the plain probe prints MISSING unexpectedly, wrap it: `zsh -lc 'source ~/.zprofile 2>/dev/null || true; source ~/.zshrc 2>/dev/null || true; python3 <this-skill-dir>/scripts/threejs_3d_asset.py probe'`. When the director skill is loaded, prefer `threejs-game-director/scripts/probe_asset_credentials.sh`, which probes all three asset keys at once. |
| 20 | |
| 21 | Generated model download URLs expire quickly, so download outputs immediately after successful tasks. |
| 22 | |
| 23 | ## Tool Script |
| 24 | |
| 25 | Reference gate: |
| 26 | |
| 27 | - Load `references/api-notes.md` before provider API work, endpoint/task decisions, model-version choices, polling, postprocess, conversion, rigging, animation, or download handling. |
| 28 | - Load `references/threejs-integration.md` before importing Tripo outputs into a browser game or advising GLB/FBX integration. |
| 29 | - Load `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. |
| 30 | |
| 31 | 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. |
| 32 | |
| 33 | Run from the user's current project directory: |
| 34 | |
| 35 | ```bash |
| 36 | python3 <this-skill-dir>/scripts/threejs_3d_asset.py --help |
| 37 | ``` |
| 38 | |
| 39 | ## Common Commands |
| 40 | |
| 41 | Recommended premium game hero model: |
| 42 | |
| 43 | ```bash |
| 44 | python3 <this-skill-dir>/scripts/threejs_3d_asset.py text \ |
| 45 | --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" \ |
| 46 | --model-version v3.1-20260211 \ |
| 47 | --texture-quality detailed \ |
| 48 | --geometry-quality detailed \ |
| 49 | --wait --download --out-dir assets/models/hero |
| 50 | ``` |
| 51 | |
| 52 | Text to 3D: |
| 53 | |
| 54 | ```bash |
| 55 | python3 <this-skill-dir>/scripts/threejs_3d_asset.py text \ |
| 56 | --prompt "game-ready sci-fi hover bike, sleek armored panels, readable silhouette, PBR, front facing" \ |
| 57 | --model-version v3.1-20260211 \ |
| 58 | --texture-quality detailed \ |
| 59 | --geometry-quality detailed \ |
| 60 | --wait --download --out-dir assets/models/hover-bike |
| 61 | ``` |
| 62 | |
| 63 | Image to 3D from a local `threejs-image-generator` concept: |
| 64 | |
| 65 | ```bash |
| 66 | python3 <this-skill-dir>/scripts/threejs_3d_asset.py image \ |
| 67 | --image assets/concepts/hover-bike-front.png \ |
| 68 | --model-version v3.1-20260211 \ |
| 69 | --enable-image-autofix \ |
| 70 | --texture-alignment original_image \ |
| 71 | --texture-quality detailed \ |
| 72 | --wait --download --out-dir assets/models/hover-bike |
| 73 | ``` |
| 74 | |
| 75 | Status and download: |
| 76 | |
| 77 | ```bash |
| 78 | python3 <this-skill-dir>/scripts/threejs_3d_asset.py status TASK_ID |
| 79 | python3 <this-skill-dir>/scripts/threejs_3d_asset.py download TASK_ID --out-dir assets/models |
| 80 | ``` |
| 81 | |
| 82 | Texture, rig, animate, or convert: |
| 83 | |
| 84 | ```bash |
| 85 | python3 <this-skill-dir>/scripts/threejs_3d_asset.py postprocess \ |
| 86 | --type texture_model --original-task-id TASK_ID \ |
| 87 | --texture-prompt "brushed gunmetal, orange hazard decals, worn edges" \ |
| 88 | --wait --download --out-dir assets/models/retextured |
| 89 | |
| 90 | python3 <this-skill-dir>/scripts/threejs_3d_asset.py postprocess \ |
| 91 | --type animate_prerigcheck --original-task-id TASK_ID --wait |
| 92 | |
| 93 | # Rig version is routed by --rig-type: biped -> v1.0-20240301 (the v2.x rigger |
| 94 | # fails on humanoids), other body plans -> v2.5-20260210. Only pass |
| 95 | # --model-version to override that routing. |
| 96 | python3 <this |