tea-x-random/unity-game-skills/unity-asset-pipeline

Claude Code and agent skill by tea-x-random/unity-game-skills

Trust tier 3
  • community
Source check pending

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-pipeline

SKILL.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 feed Assets/<Game>/Art/Source/; only this pipeline writes to Assets/<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)

art contract (art-spec.yaml + AssetBrief, owned by unity-art-direction)
→ family reference pack (golden asset first; see "Families" below)
→ source generation (PixelLab pixel sprite / Gemini image / Tripo mesh)
→ asset-contract.yaml v2 (budgets + promotion evidence)
→ technical qualification (sprite QA / model inspection / audio processing)
→ cleanup / repair (repeat technical qualification)
→ Unity realized-import report (ApplyAssetContract + importer/Avatar/scale gates)
→ runtime prefab (GeneratePrefabFromContract)
→ BeautyCell screenshot test (visual-regression gate)
→ approved-asset registry (the ONLY source scene-builders may use)

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:

yaml
schema: unity-game-skills.asset-contract.v2 # REQUIRED for new assets
lifecycle: { stage: source, previous_stage: reference, promotion_evidence: [] }
id: meadow_tree_a
family: meadow_vegetation
role: midground_obstacle
style_id: cozy_toy_diorama_v1 # MUST match art-spec.yaml style_id
art_spec: Assets/<Game>/Art/_ArtDirection/art-spec.yaml # validator resolves the spec from here
source:
generator: gemini # pixellab | tripo | gemini | authored | kitbash | vendor | elevenlabs
source_art: Assets/<Game>/Art/Source/meadow_tree_a.png # required to compute palette/scale checks
prompt_hash: "sha256:..."
reference_pack: # resolvable file paths (anchors, palette swatch, sheets)
- Assets/<Game>/Art/_ArtDirection/palettes/master-palette.png
runtime:
type: sprite # REQUIRED — sprite | model | ui | texture | vfx | audio; sprite checks key off this
prefab: Assets/<Game>/Art/Prefabs/Environment/MeadowTreeA.prefab
pivot: bottom_center
pixels_per_unit: 100 # MUST equal art-spec craft.pixels_per_unit (project PPU SSOT)
scale_meters: [1.2, 1.8, 1.2] # world-space bounds target; drives computed scale_valid
collider: capsule
material_profile: World_Stylized_v1
shadow_profile: soft_blob_v1
camera_contract: # must agree with scene-composition camera profile
projection: orthographic
yaw: 45
pitch: 35
target_screen_height_percent: 18
qa:
alpha_valid: true
scale_valid: true
palette_valid: true
scene_test_valid: true

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-spec or the contract's art_spec: path (registry mode: the registry's art_spec: key); unresolvable spec = FAIL. --no-art-spec is the ONLY escape hatch and is for exploratory/concept contracts, never approval.
  • Resolves composition.yaml from --composition or as a sibling of the art-spec (registry mode: composition_profile:); checks camera_contract against it (--no-composition only when no profile exists yet).
  • Checks style_id equality and, for sprites, runtime.pixels_per_unit == art-spec craft.pixels_per_unit (plus PPU uniformity across the whole registry in --registry mode — one game = one PPU).
  • Computes palette_valid by running unity-image-generator/scripts/validate_sprite.py as a subprocess against the art-spec palette (exact per-pixel membership for craft.finish: pixel; average-distance heuristic otherwise). If the tool can't run, that is a FAIL, not a skip.
  • Computes scale_valid for sprites from source PNG dims: world height (height_px / PPU) vs runtime.scale_meters[1], plus canvas-is-a-tile-multiple for pixel finish. 3D scale_valid stays with the Editor import validator.
  • For runtime.type: model, requires and ingests qa.model_qa_report from inspect_3d_asset.py. Generator success, riggable=true, and skeleton names do not substitute for geometry/skin/weight/clip checks. Approved models additionally require a passing qa.unity_model_import_report from 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's qa.frame_diff_report) so alpha/halo/finish, wrong-subject/role-fit, AND animation-identity failures block approval. A contract with a frame-based 2D animation: block (runtime.type: sprite or animation.sheet set) and no frame-diff report FAILS (sets qa.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-spec craft.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.
bash
python3 $UNITY_GAME_SKILLS_HOME/unity-asset-pipeline/scripts/validate_asset_manifest.py \
Assets/<Game>/Art/Approved/meadow_tree_a/asset-contract.yaml \
--sprite-qa Assets/<Game>/Art/Source/QA/meadow_tree_a.sprite-qa.json \
--image-critique Assets/<Game>/Art/Source/QA/meadow_tree_a.critique.json

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.

bash
python3 $UNITY_GAME_SKILLS_HOME/unity-asset-pipeline/scripts/check_scene_registry.py \
Assets/Scenes/Gameplay.unity \
--registry Assets/<Game>/Art/Approved/registry.yaml \
--json-report Assets/<Game>/Art/QA/scene-registry.json

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", see unity-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:

  1. 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).
  2. 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 small AssetContractTag component.
  3. Best-candidate provenance — verify best_candidate_report points to the selected candidate and that rejected candidates did not enter the registry.
  4. 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, use extruded_atlas_manifest so slicing excludes duplicated edge pixels.
  5. Import automation — for real projects, use Unity Import Presets + AssetPostprocessor so 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tea-x-random/unity-game-skills/unity-asset-pipeline/badge)](https://verified-skill.com/skills/tea-x-random/unity-game-skills/unity-asset-pipeline)

Something wrong with this skill or its page? Tell us.