memory-safety

Community

Prevent DOTS memory leaks and GC spikes.

AuthordyCuong03
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents native container lifetime bugs and managed allocation “GC bombs” in Unity DOTS/Hybrid code paths, reducing editor exceptions and hard-to-debug memory leaks.

Core Features & Use Cases

  • Allocator lifetime correctness: Ensures Allocator.Persistent allocations always have matching Dispose() in the proper lifecycle hook (OnDestroy / state.Dispose-bound fields).
  • Job-safe container usage: Enforces rules around passing NativeArray between main thread and jobs, resizing patterns, and correct usage of parallel writers.
  • GC-avoidance in hot paths: Flags managed allocation anti-patterns in OnUpdate (string interpolation/formatting, LINQ, boxing, dictionary writes) and provides DOTS-native replacements.
  • Blob asset best practices: Guides read-only long-lived data via BlobAssetReference<T> built once and never mutated.

Quick Start

Use the memory-safety skill to audit your Unity DOTS/Hybrid system for Allocator.Persistent leaks and hot-path GC allocations before you ask for verifier-level performance and safety checks.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: memory-safety
Download link: https://github.com/dyCuong03/unity-agent-team/archive/main.zip#memory-safety

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.