tea-x-random/unity-game-skills/unity-asset-pipeline
Claude Code and agent skill by tea-x-random/unity-game-skills
- community
Checking that the SKILL.md file is still in the repository.
Promote generated or authored source art into approved, runtime-ready Unity packages through explicit brief, reference, source, technical, imported, and approved stages. Use for asset-contract.yaml v2, deterministic sprite/model/audio QA, GLB/glTF rig and skin inspection, realized Unity import reports, prefab/LOD/collider/material factories, BeautyCell and deformation tests, approved registries, or diagnosing why assets fail when assembled. Scene builders must use registry prefabs instead of raw generated files. Pairs with unity-art-direction, unity-pixel-art, unity-image-generator, unity-3d-generator, unity-animation, unity-scene-composition, and unity-graphics.
Install
npx vskill@latest install tea-x-random/unity-game-skills/unity-asset-pipelineSKILL.md
The same SKILL.md was published earlier as tea-x-random/unity-game-skills/unity-asset-pipeline.
Unity asset pipeline
Generators produce source art. This skill produces approved runtime asset packages. The boundary between the two is the single most important thing to enforce: an image or mesh existing on disk is NOT an asset that belongs in the game. An asset belongs in the game only when it has a contract, passes validation, ships as a prefab, and is entered into the registry.
The hard rule. Scene-building agents may only instantiate prefabs listed in the approved-asset registry. They must NEVER drag a freshly generated file directly into a gameplay scene. Generators feedAssets/<Game>/Art/Source/; only this pipeline writes toAssets/<Game>/Art/Approved/and the registry.
This skill is downstream of unity-art-direction (which owns the locked art-spec.yaml, style presets, mobile budgets, and the family strategy) and upstream of unity-scene-composition (which owns placement). It turns the art-direction process into enforceable data.
The pipeline (each asset)
Never skip forward. Use references/asset-lifecycle.md as the state machine. A good-looking source with no technical report, import report, runtime test, and screenshot is not approved and must not enter a scene.
The asset contract (machine-readable, per asset)
Every approved asset ships with Assets/<Game>/Art/Approved/<id>/asset-contract.yaml. This is what stops each agent from improvising scale, pivot, material, silhouette size, and camera assumptions. Full annotated template: references/asset-contract-template.yaml. Minimum shape:
qa.* flags are set by validators, not hand-authored. Approval requires the asset-class-specific flags selected by validate_asset_manifest.py --require-approved; irrelevant sprite/model/audio flags are N/A rather than fake true values. A v2 contract also needs lifecycle.stage: approved and existing promotion_evidence report paths.
Validate the contract + source: validate_asset_manifest.py
Run before importing. Coherence checks are default-on and FAIL when their inputs are absent — no silent skips:
- Resolves the art-spec from
--art-specor the contract'sart_spec:path (registry mode: the registry'sart_spec:key); unresolvable spec = FAIL.--no-art-specis the ONLY escape hatch and is for exploratory/concept contracts, never approval. - Resolves
composition.yamlfrom--compositionor as a sibling of the art-spec (registry mode:composition_profile:); checkscamera_contractagainst it (--no-compositiononly when no profile exists yet). - Checks
style_idequality and, for sprites,runtime.pixels_per_unit== art-speccraft.pixels_per_unit(plus PPU uniformity across the whole registry in--registrymode — one game = one PPU). - Computes
palette_validby runningunity-image-generator/scripts/validate_sprite.pyas a subprocess against the art-spec palette (exact per-pixel membership forcraft.finish: pixel; average-distance heuristic otherwise). If the tool can't run, that is a FAIL, not a skip. - Computes
scale_validfor sprites from source PNG dims: world height (height_px / PPU) vsruntime.scale_meters[1], plus canvas-is-a-tile-multiple for pixel finish. 3Dscale_validstays with the Editor import validator. - For
runtime.type: model, requires and ingestsqa.model_qa_reportfrominspect_3d_asset.py. Generator success,riggable=true, and skeleton names do not substitute for geometry/skin/weight/clip checks. Approved models additionally require a passingqa.unity_model_import_reportfrom realized Unity data. - Ingests the pixel QA report (
--sprite-qa), vision critique report (--image-critique), and frame-vs-anchor diff report(s) (--frame-diff, or the contract'sqa.frame_diff_report) so alpha/halo/finish, wrong-subject/role-fit, AND animation-identity failures block approval. A contract with a frame-based 2Danimation:block (runtime.type: spriteoranimation.sheetset) and no frame-diff report FAILS (setsqa.frame_diff_valid); 3D skeletal clips (sheet: null) pass this check as N/A — they are validated by unity-3d-generator's validate-animation instead. - Checks
composition.yaml:shadow_and_contact.key_light_direction== art-speccraft.light_direction(one global light direction; string inequality = failure). - Checks the GameTheme.cs derived view: every color hex in the file at
derived_artifacts.game_theme_cs(or--game-theme) must exist in the art-spec palette subtree (roles + arrays + ramps) — colors only, typography/spacing/radii are GameTheme-native.
Exit code 0 = contract valid and all referenced QA passed; non-zero = rejected (do not import).
Scene-walk registry resolution: check_scene_registry.py
The assembly-time bypass detector — the scripted half of unity-game-director's Verification rule ("every placed asset resolves to a registry entry"). It parses .unity scene files directly (no Unity/PyYAML needed), collects every ART reference (prefab instances, sprites, meshes, materials by guid), and fails any that don't resolve to the approved registry (a registry prefab, or a file inside a registered asset's approved folder). An EMPTY registry (no entries yet) is the legal gray-box state — reported as registry_empty, not failed. Engine-builtin primitives never fail, and GameObject names containing PLACEHOLDER (configurable) are reported for visibility — but any FILE-based art reference must resolve to the registry regardless of object naming; never wire raw generated files into a scene, even as placeholders. The prototype-first doctrine stays intact: gray-box = flagged primitives.
Exit 0 = every file-based scene art reference is registry-approved (engine builtins exempt); exit 2 = assembly-time bypass — fix before "done". (An MCP scene-walk cross-check remains valid for live/unsaved scenes; this script covers saved scenes deterministically.)
Bounded re-roll policy (when a candidate fails QA)
Re-rolls are bounded, targeted, and route-scoped — never a blind loop:
- Auto-re-roll ONLY when the critique overall score is below ~2.25/3 (the quality ceiling); candidates above it gain nothing from re-rolls — fix the brief or accept.
- Each re-roll must target the two worst-scoring axes in the revised prompt; keep the best-seen candidate across iterations, never just the latest.
- Hard cap: 2 re-roll iterations, then stop and escalate (revise the AssetBrief or get a human call).
- Scope: the Gemini route only. Pixel assets are never blanket re-rolled — repair the broken region with PixelLab
inpaint("fix, don't reroll", seeunity-pixel-art).
Apply the contract in Unity + build the prefab
Run inside Unity via unity-mcp-bridge execute_code or promoted Editor scripts. Key steps live in references/editor-asset-pipeline.md:
- ApplyAssetContract — set TextureImporter/ModelImporter to the contract's PPU, pivot, sprite mode, filter, mipmaps, max size, ASTC, material profile, optional secondary textures, and sheet/atlas slicing data, then validate the realized import matches the contract (the import validator — pivot, PPU, sprite mesh mode, compression, max texture size, mipmaps, material/shader assignment).
- GeneratePrefabFromContract — instantiate, attach the contract's collider + shared material + shadow profile, set pivot, save the prefab to
runtime.prefab, and stamp the contract path on a smallAssetContractTagcomponent. - Best-candidate provenance — verify
best_candidate_reportpoints to the selected candidate and that rejected candidates did not enter the registry. - Atlas/Addressables gates — if the asset is a sprite, put it in its contract's
sprite_atlas/atlas_group; if the project uses Addressables, assign the contract address/group/labels. For sheets, useextruded_atlas_manifestso slicing excludes duplicated edge pixels. - Import automation — for real projects, use Unity Import Presets +
AssetPostprocessorso correct settings are defaults, not manual reminders; validation still verifies the result.
The import validator is a gate, not a reminder: if the realized import settings do not match the contract, fail and do not produce a prefab.
BeautyCell — the screenshot gate (required before approval)
"Verify visually in Unity" becomes an automated gate with a recorded screenshot. Render the prefab in the standard validation scenes and compare against an approved reference frame. C# in references/editor-asset-pipeline.md (RenderBeautyCell, CompareReferenceFrames); scene list and acceptance in references/beauty-cell.md. An asset is approved only when it passes in:
ArtValidationScene(gameplay camera + four standard framings)BeautyCell_01(the polished hero screen — see "Beauty cell first" below)CameraScaleTest,LightingTest,MaterialTest,MobileDeviceTest
A candidate fails automatically if it cannot pass all of these. The screenshot is stored next to the contract as evidence.
The approved-asset registry
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/unity-asset-pipeline/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tea-x-random/unity-game-skills/unity-asset-pipeline)