Tooluck logoTooluck
SKILL.md

unity-async

Agent skill fromBesty0728/Unity-Skills

Advise on Unity async and lifecycle strategy

How to install unity-async

install unity-async
# install the Unity-Skills pack with the skills CLI
npx skills add Besty0728/Unity-Skills

# or add only this skill to Claude Code: copy the folder

SkillsForUnity/unity-skills~/skills/async/

# into

~/.claude/skills/async/ (all projects)

.claude/skills/async/ (one project)

SkillsForUnity/unity-skills~/skills/async/SKILL.md

MITFull file
1> **Before calling any skill in this module:** if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via `GET /skills/recommend?includeSchema=true`) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.
2
3## Triggers
4- Choosing Update/coroutine/UniTask/timer
5- Handling cancellation and cleanup
6- 在 Update/协程/UniTask/定时器间取舍、处理取消与清理
7
8# Unity Async Strategy
9
10> **Scope**: this module is about **async code you write into the Unity runtime** — `Update`, coroutines, UniTask, cancellation and lifecycle ownership. It is not about the REST protocol's own async jobs. For `jobId` / polling / `job_status` / `GET /jobs/{id}`, see [batch](../batch/SKILL.md).
11
12Use this skill when the user is deciding how runtime work should be scheduled or cleaned up.
13
14## Guardrails
15
16> **Mode**: Documentation only — no REST skills to gate; load freely under any operating mode (Approval / Auto / Bypass).
17
18- Do not recommend `UniTask` just because it looks more advanced than coroutine.
19- Prefer the simplest scheduling model that fits the use case.
20
21## Decision Ladder
22
231. First ask whether the task needs per-frame work at all.
242. If not, prefer events, callbacks, or explicit method calls.
253. If a short Unity-bound sequence is needed, prefer coroutine.
264. Recommend `UniTask` only when:
27 - the project already uses it, or
28…

Excerpt shown under the repository's MIT license.

More skills in Unity-Skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates