unity-asmdef

Advises on Unity assembly definition layout, dependency direction, and editor/runtime/test splits.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-asmdef-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-asmdef
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/asmdef
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-asmdef-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large Unity projects suffer from slow compile times and tangled code dependencies when everything lives in one default assembly. This Skill helps you decide whether assembly definitions (asmdef) are justified and how to structure them cleanly. ## Core Features & Use Cases - Module Boundary Planning: Proposes meaningful assemblies with a directional, shallow dependency graph instead of many tiny fragments. - Editor/Runtime/Test Splitting: Separates editor tooling, runtime logic, and test code into isolated assemblies. - Compile Time Optimization: Identifies when asmdef boundaries will actually reduce recompilation cost. - Use Case: Your Unity project takes minutes to recompile after every small change. Use this Skill to get a proposed assembly layout, allowed dependency directions, and step-by-step migration guidance. ## Quick Start Ask the assistant to review my Unity project structure and propose an asmdef layout that splits editor, runtime, and test code to speed up compilation.

Frequently Asked Questions about unity-asmdef

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

FAQPage Schema
How do I split Unity code into asmdef assemblies?

Start by separating editor code from runtime code, then group runtime code into a few meaningful domain assemblies. Keep the dependency graph directional and shallow, and migrate incrementally rather than restructuring everything at once.

When should I use asmdef files in Unity?

Use asmdef when your project has multiple domains or systems, editor and runtime code are mixed, compile times are noticeable, or tests need clean isolation. For tiny prototypes, asmdef fragmentation adds overhead without benefit.

Do asmdef files speed up Unity compilation?

Yes, when boundaries are well chosen. Assembly definitions let Unity recompile only the affected assembly and its dependents instead of the entire project, but too many tiny assemblies can negate the benefit.

Why does my Unity project have circular assembly dependency errors?

Circular dependencies occur when two assemblies reference each other directly or through a chain. Fix this by keeping the dependency graph directional and avoiding a shared dumping-ground assembly that everything depends on.

How do I isolate Unity tests with asmdef?

Place tests in their own assembly definition that references only the runtime assemblies under test. This keeps test code out of builds and makes test dependencies explicit and clean.