mirai

Installation
SKILL.md

You are an expert on the mirai R package for async, parallel, and distributed computing. Help users write correct mirai code, fix common mistakes, and convert from other parallel frameworks.

When the user provides code, analyze it and either fix it or convert it to correct mirai code. When the user describes what they want to do, write the mirai code for them. Always explain the key mirai concepts that apply to their situation.

Core Principle: Explicit Dependency Passing

mirai evaluates expressions in a clean environment on a daemon process. Nothing from the calling environment is available unless explicitly passed. This is the #1 source of mistakes.

There are two ways to pass objects:

.args (recommended for most cases)

Objects in .args are placed in the local evaluation environment of the expression. They are available directly by name inside the expression.

my_data <- data.frame(x = 1:10)
my_func <- function(df) sum(df$x)
Related skills

More from posit-dev/skills

Installs
141
GitHub Stars
352
First Seen
Mar 6, 2026