/yogurt:yogurt-lifefrom yogurt
Manages process lifetimes with Life objects: create, kill, await, combine, parent, scope, race. Use when code starts, stops, races, or waits for a process in Yogurt code.
Ships in yogurt. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A Life answers "is this process happening now?". Alive or dead; dead stays dead, so a restart needs a new Life. Treat it as the time span of a process (entity, level, turn, animation, open screen), not as a cancel signal.
Life turn = new Life(); // until Kill or end of using
Life zombieLife = zombie.Life(); // until the entity dies
async Life DetectHit() { ... } // until the method returns
Life move = view.PlayMove(cell); // UniTask -> Life, until the task ends
Life app = token; // CancellationToken -> Life
Life any = a | b; Life all = a & b; // first dies / both die
Life child = new Life().SetParent(level.Life()); // dies with parent or on Kill
Life none = default; // dead
if (life) { } // IsAlive(), IsDead()
life.Kill(); // no-op if dead
await life; // continues when it dies, never throws
CancellationToken t = life; // for UniTask/Unity APIs
using Life scope = new Life(); // killed at scope end
await life continues normally.Wait.*(…, life), button.OnClickAsync(life) and any UniTask call given it as a token throw OperationCanceledException. It unwinds every job awaiting that chain; .Forget() and async Life methods swallow it. Do not catch it.owner.Run(step) stops.So bind a wait to the Life whose death should stop this job and its callers. When a child can end alone without stopping the parent flow, await the child's Life instead.
Every new Life() gets an end (Kill, using or a parent). Every .Forget() starts a job that some Life stops. Lives in static fields are wrong; keep them in locals or components.
Scope: things that belong to a turn live exactly as long as it. A Life is a valid parameter.
public struct PlayerTurnJob
{
public async UniTask Run(PlayerAspect player)
{
using Life turn = new Life();
new ShowPossibleStepsJob().Run(player, turn).Forget(); // shows, awaits turn, hides
Vector2Int cell = await new WaitForPlayerStepJob().Run(player);
await new StepJob().Run(player.Agent, cell);
}
}
Race: async Life local functions, joined with |. When the first ends, using kills turn, which stops the other.
using Life turn = new Life().SetParent(player.Life());
bool skipped = false;
await (WaitForStep() | WaitForSkip());
async Life WaitForStep() => await new WaitForPlayerStepJob().Run(player);
async Life WaitForSkip()
{
await Query.Single<LevelAspect>().View.Skip.OnClickAsync(turn);
skipped = true;
}
Process state other jobs can ask about: keep the Life in a component.
public struct Stun : IComponent { public Life Life; }
using Life stun = new Life().SetParent(agent.Life());
agent.Set(new Stun { Life = stun });
await Wait.Seconds(seconds, stun);
bool stunned = agent.Has<Stun>() && agent.Get<Stun>().Life;
Phase: a phase is an entity; the flow awaits its Life (yogurt-jobs references/meta-flow.md).
readonly record struct (default is dead). With CSHARP_9 defined it is a class (null is dead). The API is the same.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub hoodrij/yogurt --plugin yogurt6 skills in this plugin
/yogurtCore API, pillars and pitfalls of Yogurt, an entity-component framework for Unity. Use for any code with `using Yogurt`, `IComponent`, `IAspect`, `Query.Of`, `Entity.Create`, `Life` or `*Job` structs, and with the other yogurt-* skills./yogurt-entityDesigns Yogurt entities: aspects, components, tags, extensions, configs, owners and names. Use when adding a game object or writing or changing any IAspect or IComponent type./yogurt-jobsWrites Yogurt jobs with process thinking: one struct per complete process that owns what it starts. Use when writing or changing any `*Job`, adding a game rule, splitting logic, or building the game flow./yogurt-setupSets up a Unity 6 project for Yogurt with C# 11 for Unity and the IDE. Use when a project starts to use Yogurt, when C# 10/11 syntax does not compile, or when the IDE shows C# 9 errors in Yogurt code./yogurt-unityYogurt.Unity glue: passive views, buttons awaited by jobs, Link/Despawn, Asset and PooledAsset, configs in Resources, boot, Wait, Run, folder layout. Use when writing any MonoBehaviour view, UI, input, prefab reference, ScriptableObject config or boot code in a Yogurt game.Other plugins' skills for the same job