Unity Code Gen

Generate Unity C# scripts and NUnit tests from functional specifications.

7|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/JulianKerignard/Unity-Skills --skill unity-code-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Unity Code Gen
Source: https://github.com/JulianKerignard/Unity-Skills/tree/main/skills/unity-code-gen
Command: npx skills add https://github.com/JulianKerignard/Unity-Skills --skill unity-code-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Unity Code Gen automates the creation of production-ready Unity C# scripts and NUnit tests from functional specifications. It analyzes the existing codebase, selects suitable architectural patterns via a decision tree, and generates clean, well-typed code that adheres to project conventions, reducing boilerplate and errors.

Core Features & Use Cases

  • Analyze user requests and inspect the project to infer conventions
  • Generate code and tests in the correct structure and assemblies
  • Apply patterns (MonoBehaviour, ScriptableObject, interfaces, events) with Unity-appropriate attributes

Quick Start

Describe the Unity feature you want and Unity Code Gen will generate the code and tests.

Frequently Asked Questions about Unity Code Gen

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

FAQPage Schema
How do I auto-generate Unity C# scripts from a functional specification?

To auto-generate Unity C# scripts, provide a functional specification describing the feature. The tool analyzes the request, inspects existing project conventions, and generates clean, well-typed scripts matching repository patterns.

Can I automatically generate NUnit tests for my Unity MonoBehaviour components?

Yes, you can generate NUnit tests alongside your Unity MonoBehaviour components. The automation produces both the component code and corresponding tests structured correctly within the project's assemblies.

Does the generated Unity code adapt to my project's existing architectural patterns?

Yes, the generated Unity code adapts to existing architectural patterns. It inspects the repository to infer conventions and applies a decision tree to select suitable patterns like ScriptableObjects or interfaces with Unity-appropriate attributes.

What is the best way to reduce boilerplate when creating ScriptableObjects in Unity?

The best way to reduce boilerplate when creating ScriptableObjects in Unity is using an automated code generation tool. It applies Unity-appropriate attributes and architectural patterns directly from your functional specifications.

Do I need to manually organize generated Unity scripts into specific assemblies?

No, you do not need to manually organize generated Unity scripts into assemblies. The automation analyzes the project structure and places the generated code and tests into the correct assemblies automatically.

Why should I use code generation instead of manually writing Unity C# components?

You should use code generation instead of manually writing Unity C# components to reduce boilerplate and errors. It ensures production-ready code adheres to project conventions and applies appropriate architectural patterns automatically.