YO
yo-async-effects
Write Yo async code and algebraic effect handlers. Use this when working with Io, Future, JoinHandle, ctl/fn handlers, io.async, io.await, io.spawn, return, and unwind.
Install
mkdir -p .claude/skills/yo-async-effects && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16616" && unzip -o skill.zip -d .claude/skills/yo-async-effects && rm skill.zipInstalls to .claude/skills/yo-async-effects
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Write Yo async code and algebraic effect handlers. Use this when working with Io, Future, JoinHandle, ctl/fn handlers, io.async, io.await, io.spawn, return, and unwind.168 chars✓ has a “when” trigger
About this skill
Yo Async and Effects
Use this skill for single-threaded async workflows and algebraic-effect-based APIs in Yo.
If a repository wraps these primitives, keep the same semantics and verify whether the wrapper changes naming only or behavior too.
When to use this skill
Use this skill when you need to:
- write functions that take an
io : Ioparameter - return or consume
Future(...)values - run tasks with
io.async,io.await, orio.spawn - define handlers using
ctl(args) -> Rand install them as plain local bindings - reason about
returnversusunwindin handlers
Workflow
- Decide whether the task needs sequential async, concurrent async on one thread, or true parallelism.
- Add the effect parameters (
io : Io,raise : Raise, …) to function signatures and call sites. There is no implicit injection — pass them explicitly. - Use the async and effects recipes for working patterns.
- Re-check handler semantics before finalizing:
return(value)resumes the continuationunwind(expr)discards it (only valid inside actl(...) -> Rbody)
High-signal rules
io.async(fn)creates a lazy future; it does not start until awaited or spawned.io.await(future, e)runs or waits for the future and returns its result.eis the effect bundle the future expects.io.spawn(future, e)starts it without waiting and returnsJoinHandle(T).handle.await(io)returnsOption(T);.Nonemeans the task aborted viaunwind.- Future types are
Future(T)orFuture(T, E)whereEis a single effect bundle (typically a struct). Pack multiple effects into one struct rather than passing them as separate type arguments. - Effects are passed as explicit parameters — pass them by name at call sites.
- A handler whose body may
unwindmust be typedctl(args) -> R; otherwise type itfn(args) -> R. Subtyping is one-way:fn(T) -> R <: ctl(T) -> R. return(value)inside a handler resumes the continuation;unwind(expr)discards it and exits the install frame.Exception— non-resumable; handler callsunwind(...)to exit.ResumableException(T)— handler callsreturn(...)to resume.- Closures cannot be
ctland cannot capturectlvalues. Handlers are bare (non-capturing) anonymous functions. - Yo async is single-threaded concurrency, not multithreaded parallelism.