patterns

Standardize Unity service, config, installer, and event creation with VContainer and MessagePipe.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/punkfuncgames/tetris-clone --skill patterns-punkfuncgames
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: patterns
Source: https://github.com/punkfuncgames/tetris-clone/tree/main/.claude/skills/patterns
Command: npx skills add https://github.com/punkfuncgames/tetris-clone --skill patterns-punkfuncgames

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a consistent set of architecture conventions to avoid ad-hoc service, config, installer, and event implementations across Unity projects, reducing bugs and integration friction.

Core Features & Use Cases

  • Config + Data: Enforces data-oriented ScriptableObject configs with plain data structs and extension-method logic for predictable runtime behavior and easy testing.
  • Service Pattern: Standardizes constructor-injected services with IAsyncStartable, ITickable, and IDisposable patterns, including null-guarding and lifecycle cleanup.
  • Installer & Events: Prescribes static installer registration with VContainer and MessagePipe broker setup, plus readonly MessagePipe event structs and reactive disposal strategies for robust event flows.
  • Use Case: Ideal when adding a new domain service, creating configuration assets, wiring MessagePipe events, or implementing reactive cleanup across a modular Unity codebase.

Quick Start

Create a new ScriptableObject config with a plain data struct, implement a constructor-injected service that uses IAsyncStartable and CompositeDisposable, and register both in a static Install method on your project's installer.

Frequently Asked Questions about patterns

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

FAQPage Schema
How do I structure Unity services with VContainer dependency injection?

Standardize Unity services by using constructor-injected classes that implement IAsyncStartable, ITickable, and IDisposable, ensuring proper lifecycle management and null-guarding within the VContainer framework.

What is the best way to configure ScriptableObject settings for Unity domain services?

Create data-oriented ScriptableObject configs using plain data structs paired with extension-method logic, which ensures predictable runtime behavior and makes testing your Unity configurations significantly easier.

How do I manage MessagePipe event brokers and reactive disposal in Unity?

Manage MessagePipe events by defining readonly event structs and using CompositeDisposable-based reactive disposal strategies to ensure robust event flows and automatic cleanup of reactive subscriptions.

How do I register installers and events statically in a Unity project?

Register installers and events by prescribing static installer registration methods with VContainer to centralize MessagePipe broker setup, ensuring consistent dependency wiring across your Unity codebase.

Does this architecture pattern work for modular UI logic in Unity?

Yes, these modular Unity service patterns apply directly to UI logic by standardizing constructor-injected services, MessagePipe event handling, and reactive disposal cleanup for robust component interactions.