unity-scene-contracts

Generate formal scene contracts for Unity scenes with validation rules.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/krl76/MP-Study-Projects --skill unity-scene-contracts-krl76
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-scene-contracts
Source: https://github.com/krl76/MP-Study-Projects/tree/main/Practice1/.codex/skills/unity-skills/skills/scene-contracts
Command: npx skills add https://github.com/krl76/MP-Study-Projects --skill unity-scene-contracts-krl76

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scene setup in Unity often relies on hidden runtime lookups, which leads to fragile projects. This skill provides a formal scene contract that defines required root objects, component ownership, inspector references, bootstrap objects, and rules for scene wiring to ensure deterministic composition.

Core Features & Use Cases

  • Define required root objects and the components on each root
  • Specify which references are assigned in the Inspector and which objects bootstrap the scene
  • Identify runtime-spawned objects and validation checks to catch misconfigurations early
  • Output artifacts include a scene object contract, bootstrap sequence, inspector wiring rules, and validation rules, with awareness of hidden dependency risks
  • Guardrails: Mode is Both (Semi-Auto + Full-Auto) — advisory only, no REST skills

Quick Start

Define the current scene contract by applying this skill to your active Unity scene.

Frequently Asked Questions about unity-scene-contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is a scene contract in Unity and why do I need one?

A Unity scene contract defines required root objects, component ownership, and inspector references to ensure deterministic composition. You need one to replace hidden runtime lookups with formal wiring rules, preventing brittle scene setups and fragile project structures.

How do I define required root objects and inspector references for a Unity scene?

You define required root objects and inspector references by applying the scene contract to your active Unity scene. This generates formal wiring rules specifying component ownership, bootstrap objects, and runtime dependencies to guarantee deterministic scene composition.

Does this scene contract approach work for validating runtime-spawned objects and bootstrap sequences?

Yes, the scene contract approach works for validating runtime-spawned objects and bootstrap sequences. It identifies runtime-spawned entities and specifies validation checks to catch misconfigurations early, ensuring your bootstrap sequence and runtime dependencies are correctly wired.

What's the best way to catch hidden dependency risks in Unity scene setup?

The best way to catch hidden dependency risks in Unity scene setup is by generating a formal scene contract. It highlights hidden dependency risks while specifying explicit inspector wiring rules and validation checks to replace fragile runtime lookups with deterministic composition.

Can I use this scene contract generation without any external dependencies or REST APIs?

Yes, you can use this scene contract generation without external dependencies or REST APIs. It operates in a semi-auto and full-auto advisory mode with zero dependencies, providing formal scene wiring rules and validation checks directly for your Unity project.

When should I not rely on hidden runtime lookups for Unity scene composition?

You should not rely on hidden runtime lookups for Unity scene composition when setting up bootstrap sequences or required references. Using a formal scene contract instead ensures deterministic composition and prevents fragile projects by explicitly defining inspector wiring and validation rules.