Set up a project development environment with wrapper scripts and/or a Nix flake.
Parameters
-
location: Desired location for setup artifacts.
-
"machine-local": Inside .my/ (ignored by git, good for personal tools).
-
"project-local": Root level (e.g., bin/ , flake.nix ).
-
setup_types: What to set up ("wrapper", "flake", or "both").
If these parameters are not explicitly provided in the request, infer them from context or ask the user for clarification before proceeding.
Process
For each setup type selected:
Wrapper Scripts
Determine paths based on location:
-
Machine-local: .my/bin/ with my- prefix
-
Project-local: bin/ , ask about naming:
-
Generic: test , lint , fmt , build , dev
-
Prefixed (default): <project-name>-test , etc.
Invoke the code-analyze-project skill to:
-
Detect project type
-
Recommend wrappers (test, lint, fmt, build, dev commands)
Present recommended wrappers and ask which to create
Create wrapper directory if needed
If machine-local: Create .my/.gitignore with content *
Create wrapper scripts with template:
#!/usr/bin/env bash set -euo pipefail <command>
- Make executable: chmod +x <dir>/*
Nix Flake
Determine path based on location:
-
Machine-local: .my/flake.nix
-
Project-local: flake.nix
Check for existing flake at the determined path
Detect project type and required packages:
-
Node.js: package.json → nodejs, npm/pnpm/yarn
-
Python: pyproject.toml, setup.py → python3, pip/poetry/uv
-
Go: go.mod → go, gopls
-
Rust: Cargo.toml → cargo, rustc
-
Ruby: Gemfile → ruby, bundler
-
Other: check for Makefile, CMakeLists.txt, etc.
Generate flake using the template in templates/flake.nix
-
Use buildInputs (not packages ) for dependencies
-
No shellHook unless absolutely necessary
-
Keep it simple and minimal
-
If updating existing flake, preserve custom inputs/outputs but simplify structure
If machine-local: Create .my/.gitignore with content * if not exists
Verify the flake: nix flake check path:.
- If verification fails, fix issues and re-verify
Output
-
Project type detected
-
Wrapper/flake location created
-
Scripts/flake created (with descriptions)
-
How to use