pixi-environment-builder
Use when creating, migrating, or debugging pixi environments, especially for scientific Python, bioinformatics, single-cell analysis, CUDA/PyTorch, Jupyter/VS Code kernels, conda-to-pixi migration, or conda + PyPI mixed dependency issues.
Install / Use
npx skills add xuzhougeng/wisp-science --skill pixi-environment-builderInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of pixi-environment-builder
pixi-environment-builder scores 93/100 on our quality scale, 565th of 4,657 Development & Engineering skills we index (top 13%).
Its SKILL.md is 15 KB long, well organised into 31 sections with 28 code examples: a thorough specification that gives an agent plenty to work with.
With 1,167 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 8 days ago, so pixi-environment-builder is actively maintained.
- It is released under AGPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
pixi-environment-builder compared with similar skills
All 4 of these similar skills score higher than pixi-environment-builder; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| pixi-environment-builder (this skill)by xuzhougeng | 93 | 1.2k | 8d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 88.6k | 17d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.3k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 44.8k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 2d ago | CLAUDE.md |
Frequently asked questions
- How do I install pixi-environment-builder?
- Run
npx skills add xuzhougeng/wisp-science --skill pixi-environment-builder. The install tabs above show the steps for each supported agent. - Which AI agents does pixi-environment-builder work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is pixi-environment-builder safe to use?
- It is AGPL-3.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is pixi-environment-builder still maintained?
- The repository was last updated 8 days ago, so pixi-environment-builder is actively maintained.
Skill content
View source on GitHubname: pixi-environment-builder description: Use when creating, migrating, or debugging pixi environments, especially for scientific Python, bioinformatics, single-cell analysis, CUDA/PyTorch, Jupyter/VS Code kernels, conda-to-pixi migration, or conda + PyPI mixed dependency issues.
Pixi Environment Builder
Overview
Use this skill to design, migrate, and debug pixi-managed environments. The core principle is to clarify environment intent before editing pixi.toml: version constraints, project scope, package source priority, mirror/network policy, special packages, cache location, and validation tasks.
Pixi can solve dependencies automatically, but mixed conda + PyPI environments need deliberate package ownership. Most hard failures come from unclear ownership, unconstrained top-level packages, inaccessible mirrors, or non-registry packages.
Preflight Questions
Before creating or changing a pixi environment, ask these questions unless the answer is already known from repo files, user context, or error logs:
-
Required versions
- Are any package versions fixed by previous results, notebooks, papers, models, CUDA drivers, or collaborators?
- Examples:
python,cuda,pytorch, domain packages, model libraries, analysis frameworks.
-
Environment scope
- Is this project-level, user/global-level, or temporary?
- Project-level: create or edit repo
pixi.toml. - User/global-level: prefer
pixi globalfor reusable CLI tools, not complex project workflows.
-
Package source priority
- Should conda or PyPI own the main dependency graph?
- Which packages should be installed from conda, PyPI, Git, local path, or system modules?
- Avoid specifying the same package unconstrained in both conda and PyPI.
-
Multiple environments or kernels
- Does the user need separate named environments, solve groups, or Jupyter/VS Code kernels?
- Clarify whether they need identical packages in separate prefixes or different feature sets.
-
Mirror and network policy
- Which conda channels and mirrors are reachable?
- Which PyPI index is reachable?
- Can the machine access GitHub,
pypi.org,files.pythonhosted.org,prefix.dev, or internal mirrors?
-
Non-registry packages
- Are any packages installed from local source, private Git repos, wheels, editable paths, or unpublished projects?
-
Cache and storage
- Use pixi defaults unless there is a permissions, quota, or sharing requirement.
- If custom cache is needed, ask where writable shared cache should live.
-
Validation
- What imports, version checks, CLI commands, GPU checks, or kernel registration prove the environment works?
Design Rules
Prefer project-level manifests for project workflows
For analysis projects, put environment definition in the repo:
[workspace]
name = "project-name"
channels = ["conda-forge"]
platforms = ["linux-64"]
Use user/global environments mostly for standalone tools.
Assign package ownership
Choose one owner for each important package family.
Prefer conda for:
- Python interpreter
- compiled libraries and hard-to-build scientific packages
- CUDA/PyTorch stacks when conda binaries are desired
- R, rpy2, system libraries, CLI bioinformatics tools
- packages requiring consistent native ABI
Prefer PyPI for:
- packages whose canonical release is PyPI
- fast-moving Python-only libraries
- packages unavailable or stale on conda
- top-level frameworks that expect pip-style dependency resolution
- headless/server variants such as
opencv-python-headless
Avoid this pattern:
[dependencies]
scanpy = "*"
anndata = "*"
scipy = "*"
[pypi-dependencies]
some-framework-that-also-depends-on-scanpy = "*"
This can make conda pin versions before PyPI solves, causing conflicts.
Start minimal, then add constraints only when evidence requires them
Do not mechanically copy an entire old conda environment. Start from:
- interpreter/runtime
- top-level packages the user directly uses
- hardware/runtime packages
- Jupyter/kernel tooling if needed
- non-registry packages
Add transitive pins only when solver output or runtime validation proves they are needed.
Migrating From Conda
When migrating an existing conda/mamba environment:
- Inspect by path if env-name lookup is unreliable:
conda list -p /path/to/env
conda env export -p /path/to/env --no-builds
- Identify direct imports and notebook evidence:
rg -n "^(import|from) " scripts src notebooks tests --glob '*.py' --glob '*.ipynb'
rg -n "Version:|__version__|import " notebooks scripts --glob '*.ipynb'
-
Classify packages:
- direct user dependencies
- transitive dependencies
- runtime/system dependencies
- local/Git/private packages
- packages only needed for old experiments
-
Preserve known compatibility anchors:
- versions printed in notebook outputs
- versions required by published workflow
- CUDA/PyTorch compatibility
- package versions known to affect results
-
Leave unrelated transitive packages out of
pixi.toml.
Multiple Environments And Kernels
Use multiple named environments when the user needs isolation or parallel notebooks.
Use one solve group when environments should have identical package versions:
[environments]
worker-1 = { solve-group = "analysis" }
worker-2 = { solve-group = "analysis" }
worker-3 = { solve-group = "analysis" }
Use separate features when environments differ:
[feature.gpu.dependencies]
pytorch-cuda = "*"
[feature.r.dependencies]
r-base = "*"
[environments]
cpu = []
gpu = ["gpu"]
r-analysis = ["r"]
For VS Code/Jupyter kernels, add explicit kernel tasks:
[tasks]
kernel-1 = "python -m ipykernel install --user --name worker-1 --display-name 'Python (worker-1)'"
kernel-2 = "python -m ipykernel install --user --name worker-2 --display-name 'Python (worker-2)'"
kernels = "pixi run -e worker-1 kernel-1 && pixi run -e worker-2 kernel-2"
Tell VS Code users: after registration, select the kernel in VS Code; they do not need to launch notebooks through pixi run.
Mirrors And Network
Use mirrors deliberately. Do not assume a mirror works for all package types.
Recommended checks:
pixi config list
sed -n '1,120p' ~/.config/uv/uv.toml 2>/dev/null
sed -n '1,120p' ~/.config/pip/pip.conf 2>/dev/null
env | rg "PIP|UV|PIXI|RATTLER|HTTP|HTTPS|PROXY"
For PyPI, prefer setting only the index URL in pixi.toml:
[pypi-options]
index-url = "https://example-mirror/simple"
Avoid unnecessary files.pythonhosted.org mirror rewrites unless verified. Some mirrors serve simple index pages but fail wheel metadata URLs.
If official PyPI times out, switch to a reachable mirror. If a mirror gives 404 for metadata, try another mirror or the official file server directly.
For conda, use .pixi/config.toml mirrors when needed:
[mirrors]
"https://conda.anaconda.org/conda-forge" = [
"https://your-conda-mirror/anaconda/cloud/conda-forge",
"https://conda.anaconda.org/conda-forge"
]
Conda + PyPI Mapping
Pixi needs conda-to-PyPI name mapping when conda and PyPI dependencies are mixed. If fetching mapping from prefix.dev fails, use a local mapping file.
In pixi.toml:
[workspace]
conda-pypi-map = { "conda-forge" = "config/conda-pypi-map.json" }
Example config/conda-pypi-map.json:
{
"scikit-learn": "scikit-learn",
"matplotlib-base": "matplotlib",
"pytorch": "torch",
"torchvision": "torchvision",
"torchaudio": "torchaudio"
}
Validate it:
python -m json.tool config/conda-pypi-map.json
Keep this mapping small and project-specific. Add entries only for packages relevant to mixed solving.
Non-Registry Packages
If a package is not found on PyPI or conda, inspect how it was installed before guessing.
Check old environment metadata:
find /path/to/env/lib/python*/site-packages -maxdepth 3 \
\( -iname '*dist-info' -o -path '*dist-info/direct_url.json' \)
Use local path dependency when reproducible on this machine:
[pypi-dependencies]
my-package = { path = "/absolute/path/to/source" }
Use Git dependency when portability matters:
[pypi-dependencies]
my-package = { git = "https://github.com/org/repo.git", rev = "commit-sha" }
Prefer a fixed commit/tag for reproducibility.
Common Failure Patterns
Package not found in registry
Root cause: package is unpublished, private, named differently, or only installed from source.
Actions:
- Inspect old
direct_url.json. - Search project docs for install command.
- Use path or Git dependency.
- Do not keep retrying PyPI.
Version conflict after conda solve
Root cause: conda pinned a transitive package version that conflicts with PyPI requirements.
Actions:
- Read the solver message for pinned packages.
- Decide whether top-level package should own those dependencies.
- Remove conda-side transitive packages, or bound them to a compatible range.
- Pin only compatibility anchors, not every transitive package.
Network timeout fetching PyPI package
Root cause: inaccessible PyPI index, file host, proxy, or mirror.
Actions:
- Check current
[pypi-options] index-url. - Check user uv/pip config for reachable mirrors.
- Change only PyPI index first.
- Clean PyPI cache and retry.
pixi clean cache --pypi -y
pixi install --all
Mirror metadata 404
Root cause: simple index mirror works but wheel metadata/file mirror is incomplete.
Actions:
- Remove
files.pythonhosted.orgmirror rewrites. - Use a different PyPI index.
- Avoid mixing multiple PyPI mirror layers unless verified.
OpenCV solve conflict
Root cause: conda opencv pulls GUI/Qt/Python ABI-specific builds.
Server/headless fix:
[pypi-dependencies]
opencv-python-headless = ">=4.10,<5"
Use conda opencv only when GUI functionality is required.
CUDA/PyTorch mismatch
Root cause: CUDA runtime, driver, PyTorch build, and channel priorities disagree.
Actions:
- Ask for
nvidia-smi. - Pin CUDA runtime intentionally.
- Use a single coherent PyTorch source.
- Validate with
torch.cuda.is_available().
Cache Guidance
Pixi has default cache. Do not create custom cache directories unless the user requests shared cache, has permission errors, or needs a specific storage path.
Useful commands:
pixi clean cache --pypi -y
pixi clean cache --repodata -y
pixi clean cache --mapping -y
If custom cache is needed:
PIXI_CACHE_DIR=/path/to/pixi-cache \
RATTLER_CACHE_DIR=/path/to/rattler-cache \
pixi install --all
Verification Tasks
Add a check task for complex environments. It should verify the actual success criteria, not just installation.
Examples:
[tasks]
check = "python -c \"import sys; print(sys.version)\""
For GPU Python environments:
check = "python -c \"import torch; print(torch.__version__); print(torch.version.cuda); print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'NO GPU')\""
Run:
pixi run -e <environment> check
For Jupyter/VS Code workflows, verify kernel registration separately:
pixi run kernels
jupyter kernelspec list
OpenBLAS Thread Tuning For R Environments
conda-forge r-base ships with OpenBLAS, but when OPENBLAS_NUM_THREADS is unset on a
high-core server, the default thread scheduling is extremely poor — SVD on 96 cores
without explicit thread count is slower than single-threaded. This directly impacts
Seurat RunPCA() (backed by irlba() randomized SVD).
When To Apply
- User reports RunPCA / SVD / matrix operations are slow in a pixi R environment
OPENBLAS_NUM_THREADSandOMP_NUM_THREADSare both unset- Multi-core Linux server (>16 cores)
Diagnostic Flow
Step 1 - Confirm BLAS Implementation
PREFIX=$(pixi info --manifes
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
88.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
44.8kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
