init-pixi-project
/init-pixi-project
Initialize and scaffold a new Pixi-managed Python project, or upgrade an existing one. Use when the user explicitly mentions "init", "initialize", or "setup" in conjunction with "pixi". Handles existing projects by prompting for confirmation before merging.
- Author
- igamenovoer ↗
- Repository
- magic-context ↗
- Licence
- MIT
- Last repository change
- 11.05.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 11.05.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/scaffold_structure.py
What it does and when to use it
Initialize and scaffold a new Pixi-managed Python project, or upgrade an existing one. Use when the user explicitly mentions "init", "initialize", or "setup" in conjunction with "pixi". Handles existing projects by prompting for confirmation before merging.
Triggers from the description
Original author description
Initialize and scaffold a new Pixi-managed Python project, or upgrade an existing one. Use when the user explicitly mentions "init", "initialize", or "setup" in conjunction with "pixi". Handles existing projects by prompting for confirmation before merging.
How it works
- References
- Workflow
SKILL.md preview
---
name: init-pixi-project
description: Initialize and scaffold a new Pixi-managed Python project, or upgrade an existing one. Use when the user explicitly mentions "init", "initialize", or "setup" in conjunction with "pixi". Handles existing projects by prompting for confirmation before merging.
---
# Initialize Pixi Project
## References
- **Usage & Commands**: See [references/pixi-usage.md](references/pixi-usage.md) for details on `pixi search`, `add`, and `run`.
## Workflow
### 1. Safety Check & Parameters
1. **Check for Existing Artifacts**: Look for `pixi.lock`, `pixi.toml`, or a `pyproject.toml` containing `[tool.pixi]`.
2. **Prompt if Exists**: If any of these exist, **PAUSE and ASK** the user:
> "Existing Pixi configuration detected. Proceeding will scaffold the directory structure and attempt to merge standard dependencies (scipy, ruff, etc.) into the current environment. This might affect existing functionality. Do you want to proceed?"
3. **Abort if Rejected**: If the user declines, stop.
4. **Determine Parameters** (if proceeding):
- **Format**: Default to `pyproject` unless user specifies otherwise.
- **Python Version**: Target one minor version behind latest stable (e.g., 3.12).
### 2. Initialization (Merge/Create)
Attempt to initialize Pixi.
- **Run**: `pixi init [PATH] --format [pyproject|pixi] -c conda-forge`
- **Handle Existing**:
- If the command fails because the project is already initialized, verify that `[tool.pixi]` exists in the manifest.
- If it exists, skip to the next step.
- If `pyproject.toml` exists but lacks Pixi config, the agent should try to append the default Pixi configuration or ask the user if `pixi init` didn't do it automatically.
### 3. Post-Initialization Configuration
#### A. Handle Custom Project Name
If the user specified a project name different from the current directory name:
1. **Rename Source**: `mv src/<dir_name> src/<project_name>`
2. **Update Manifest**: Edit `pyproject.toml` to replace the old name with the new one in:
- `[project] name = "..."`
- `[tool.pixi.pypi-dependencies]` section (rename the key).
#### B. Scaffolding (Idempotent)
Run the scaffolding script. Pass the project name if custom.
```bash
python <path_to_skill>/scripts/scaffold_structure.py [PATH] --package-name <project_name>
```
#### C. Gitignore
Check `.gitignore`. Append the following if not present:
```gitignore
.pixi/
tmp/
.git/
```
#### D. Install Python and Dependencies (Smart Merge)
1. **Check Python**: Check if `python` is already a dependency.
- If yes, respect the existing version (or ask user if they want to override).
- If no, add it: `pixi add python=<version>`
2. **Add Standard Packages**:
- Attempt to add the standard stack:
```bash
pixi add --pypi scipy mdutils ruff mkdocs-material mypy attrs omegaconf imageio
```
- **Conflict Handling**: If `pixi add` fails due to conflicts with existing packages, try to resolve by:
- Installing the non-conflicting subset.
- Reporting specific conflicts to the user and asking for guidance.
3. **Finalize**: Run `pixi install`.
### 4. Verification
- Verify the environment is usable (`pixi shell` works).
- Verify directory structure.
Files in this package (3)
- SKILL.md 3 KB
- references/pixi-usage.md 2 KB
- scripts/scaffold_structure.py 5 KB
Versions
The database has no other skills named init-pixi-project.
Database snapshot: 13.11.2026 · package version ddd2360a5ec8 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 84init
Initialize a new project with a standard directory structure, template files, and a git repository. Use this skill whenever the user starts a new project, types /init, asks to "set up a new project", "initialize a repo", "scaffold a project", or wants to create the standard… - 100rpix
Use whenever R code lives in a Pixi project, meaning a pixi.toml (or a pyproject.toml with [tool.pixi]) next to .R, .qmd or .Rmd files or a DESCRIPTION, and when asked to set up an R project with Pixi or rpix, or to move one from renv. Covers installing and adding R packages… - 100new-modular-project
Creates a new Mojo or MAX project. Use when wanting to start a new Mojo or MAX project, initializing the `pixi` or `uv` environment to use Mojo or MAX, or when the user wants to begin a new Mojo or MAX project from scratch. - 100pixijs-create
Scaffold a requested PixiJS v8 project with the official create-pixi CLI, or add PixiJS to an existing project. Covers template selection, project-local package setup, TypeScript/WebGPU types, and bundler configuration. Use for project creation, PixiJS installation, or related… - 100pixijs-migration-v8
Use this skill when upgrading to PixiJS v8 from v7 or diagnosing broken v7 code after an upgrade. Covers async app.init, single pixi.js package (deprecated @pixi/* sub-packages), Graphics shape-then-fill, BaseTexture → TextureSource, shader/uniform rework,… - 100pixi-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.