unity-unitask-design

Enforce UniTask design rules for Unity async programming.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/YiDuandtdt/Bone-Throne --skill unity-unitask-design-yiduandtdt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-unitask-design
Source: https://github.com/YiDuandtdt/Bone-Throne/tree/main/.agents/skills/unity-skills/skills/unitask-design
Command: npx skills add https://github.com/YiDuandtdt/Bone-Throne --skill unity-unitask-design-yiduandtdt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

UniTask usage in Unity often leads to subtle bugs and leaks without a formal design guide; this Skill provides guardrails to prevent common mistakes.

Core Features & Use Cases

  • Defines design constraints for UniTask methods, triggers, and interop points to prevent double-awaits, forgotten Forget, and improper cancellation.
  • Documents recommended patterns for WhenAll, ToUniTask, cancellation propagation, and resource management in Unity projects.
  • Serves as a reference during code reviews and onboarding to reduce runtime pitfalls.

Quick Start

Audit new async UniTask code against these rules before merging.

Frequently Asked Questions about unity-unitask-design

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

FAQPage Schema
How do I prevent double-await crashes when writing async UniTask methods in Unity?

Prevent double-await crashes in UniTask by enforcing strict design rules that restrict struct reuse and ensure triggers are awaited exactly once. This Skill provides guardrails to audit async APIs and eliminate runtime pitfalls before merging code.

What is the best way to manage cancellation propagation in Unity UniTask?

The best way to manage cancellation propagation in UniTask is to follow documented patterns that safely route cancellation tokens through async triggers and interop points. This Skill specifies constraints to prevent forgotten Forget calls and improper timing.

How do I avoid resource leaks and forgotten Forget calls in Unity async programming?

Avoid resource leaks and forgotten Forget calls in Unity async programming by applying formal design constraints to all UniTask methods. This Skill serves as a code review reference to catch unsafe interop and ensure proper resource management.

Can I use WhenAll and ToUniTask interop patterns safely in Unity projects?

Yes, you can use WhenAll and ToUniTask interop patterns safely in Unity projects by applying recommended design rules. This Skill documents safe interop constraints to prevent runtime bugs and ensure zero-allocation async behavior.

Why does UniTask cause subtle bugs without a formal design guide in Unity?

UniTask causes subtle bugs in Unity because its zero-allocation struct design allows dangerous practices like double-awaits and forgotten Forget calls. This Skill provides the necessary guardrails to prevent improper cancellation and unsafe interop.

What are the limitations of using UniTask for async programming in Unity?

UniTask limitations in Unity include susceptibility to double-await crashes, forgotten Forget calls, and resource leaks if not properly constrained. This Skill defines the exact practices to avoid these edge cases and maintain safe async interop.