src/dot-agents/skills/pixi-tasks/SKILL.md
Complex pixi task workflows and orchestration. Use when building task dependency chains, configuring caching with inputs/outputs, creating parameterized tasks, or setting up CI pipelines—e.g., "pixi task depends-on", "task caching for build automation", "multi-environment test matrices".
npx skillsauth add jjjermiah/dotagents pixi-tasksInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Complex task patterns: dependency chains, caching with inputs/outputs, cross-environment workflows.
[tasks]
# Simple command
test = "pytest -v"
# With working directory
build = { cmd = "make", cwd = "src" }
# Multiple steps
setup = "mkdir -p build && cmake -B build"
YOU MUST use depends-on for execution order. Tasks without explicit dependencies execute in undefined order and will fail in CI pipelines. No exceptions.
[tasks]
configure = "cmake -B build"
build = { cmd = "cmake --build build", depends-on = ["configure"] }
test = { cmd = "ctest", depends-on = ["build"] }
start = { cmd = "./build/app", depends-on = ["build"] }
pixi run start # Runs: configure → build → start
Every time you have multiple upstream dependencies, use this pattern. Tasks with multiple depends-on entries wait for ALL dependencies to complete before executing.
[tasks]
fetch-data = "curl -o data.csv ..."
fetch-model = "curl -o model.pkl ..."
train = { cmd = "python train.py", depends-on = ["fetch-data", "fetch-model"] }
evaluate = { cmd = "python eval.py", depends-on = ["train"] }
Execution: fetch-data and fetch-model complete before train; order is dependency-driven.
Cache results based on inputs/outputs:
[tasks]
# Cache by input file
run = { cmd = "python main.py", inputs = ["main.py"] }
# Cache by inputs and outputs
build = {
cmd = "cargo build --release",
inputs = ["src/**/*.rs", "Cargo.toml"],
outputs = ["target/release/myapp"]
}
# Download caching (by output existence)
download = {
cmd = "curl -o data.csv https://example.com/data.csv",
outputs = ["data.csv"]
}
Cache invalidates immediately when ANY of these conditions are met:
Caches without proper inputs/outputs are always stale. Define both or accept that your tasks will re-run unnecessarily.
Define tasks that behave differently per platform using [target.<platform>.tasks]. Pixi automatically selects the correct implementation based on the current platform.
# Target-agnostic tasks that depend on platform-specific setup
task = { cmd = "echo 'Running main task'", depends-on = ["setup"] }
[target.linux-64.tasks]
setup = { cmd = "echo 'Linux setup'", description = "Setup for Linux" }
[target.osx-arm64.tasks]
setup = { cmd = "echo 'macOS setup'", description = "Setup for macOS" }
pixi run task # Runs the correct 'setup' for your platform, then 'task'
Combine with [target.<platform>.dependencies] to install packages only on specific platforms:
# Install stow only on Linux (via conda-forge)
[target.linux-64.dependencies]
stow = "*"
# Target-agnostic tasks
task = { cmd = "stow --version", depends-on = ["check-stow"] }
# Platform-specific setup tasks (same name, different implementations)
[target.linux-64.tasks]
check-stow = { cmd = "which stow", description = "Verify stow is available (pixi-installed)" }
[target.osx-arm64.tasks]
check-stow = { cmd = "which stow || (echo 'Install with: brew install stow' && exit 1)", description = "Verify stow is available (brew-installed)" }
Key insight: Tasks with the same name in different [target.*.tasks] sections are automatically resolved based on the current platform. Target-agnostic tasks can depend on these platform-specific tasks by name.
Run tasks across multiple environments. Always test in all target environments before committing. Environment-specific failures in CI are expensive and avoidable.
[feature.py311.dependencies]
python = "3.11.*"
[feature.py312.dependencies]
python = "3.12.*"
[environments]
py311 = ["py311"]
py312 = ["py312"]
[tasks]
test = "pytest"
# Test in all Python versions
test-all = {
depends-on = [
{ task = "test", environment = "py311" },
{ task = "test", environment = "py312" },
]
}
[feature.build.dependencies]
rust = ">=1.70"
[feature.build.tasks]
compile = "cargo build --release"
[feature.test.dependencies]
pytest = "*"
[feature.test.tasks]
test-python = "pytest"
[environments]
build = ["build"]
test = ["test"]
[tasks]
ci = {
depends-on = [
{ task = "compile", environment = "build" },
{ task = "test-python", environment = "test" },
]
}
Use MiniJinja templates:
[tasks]
process = {
cmd = "python process.py inputs/{{ filename }}.txt",
args = ["filename"],
inputs = ["inputs/{{ filename }}.txt"],
outputs = ["outputs/{{ filename }}.out"]
}
pixi run process data1
[tasks]
lint = "ruff check ."
format = "ruff format --check ."
typecheck = "mypy src/"
unit-test = { cmd = "pytest tests/unit", depends-on = ["lint", "format"] }
int-test = { cmd = "pytest tests/integration", depends-on = ["unit-test"] }
build = { cmd = "python -m build", depends-on = ["int-test", "typecheck"] }
ci = { depends-on = ["build"] }
- uses: prefix-dev/[email protected]
with:
cache: true
- run: pixi run ci
YOU MUST:
NEVER:
development
Guides creation, validation, and packaging of AI agent skills with token-efficient design, progressive disclosure patterns, and YAML frontmatter best practices. Use when building new skills, updating existing skills, validating skill structure against standards, or packaging for distribution—e.g., "create skill", "validate SKILL.md", "package skill for sharing", "check description format".
tools
Investigate and integrate weakly documented SDK/library modules (especially Azure SDKs) into code. Use when asked to "investigate module", "SDK", "client class", or when docs are missing/weak and you need to discover APIs, models, or usage patterns to implement integration.
tools
Write production-ready one-off scripts and automation utilities with proper error handling and safety patterns. Use when developing bash automation, Python CLI tools, shell scripts, system administration scripts, or command-line batch processing—e.g., "write a script to process files", "python one-liner for data conversion", "bash automation for backups", "shell script with error handling".
development
R package testing with testthat 3rd edition. Use when writing R tests, fixing failing tests, debugging errors, or reviewing coverage—e.g., "write testthat tests", "fix failing R tests", "snapshot testing", "test coverage".