peiyuanqi/work-like-me/manage-virtual-environments
Claude Code and agent skill by peiyuanqi/work-like-me
- community
Checking that the SKILL.md file is still in the repository.
Sets up, reuses, repairs, pins, or verifies isolated project environments and toolchains for Python, Node.js, Rust, Go, Java, .NET, and other stacks, preferring repository-declared versions, existing environments, lockfiles, and user-scope tooling. Use for requests such as \"set up a virtual environment\", \"create venv\", \"activate the environment\", \"install dependencies\", \"use uv\", \"use nvm\", \"create .nvmrc\", or \"install Rust\", or when work is blocked by a missing or wrong runtime.
Install
npx vskill@latest install peiyuanqi/work-like-me/manage-virtual-environmentsSKILL.md
The same SKILL.md was published earlier as peiyuanqi/work-like-me/manage-virtual-environments.
Manage Virtual Environments
Version: 1.3.0
Create or select a reproducible project environment without damaging an existing toolchain or silently changing dependency intent.
1. Inspect Before Changing Anything
- Read repository instructions and setup documentation.
- Inspect manifests, lockfiles, and version pins such as
pyproject.toml,
uv.lock, requirements*.txt, package.json, package-lock.json, pnpm-lock.yaml, .nvmrc, .node-version, rust-toolchain.toml, Cargo.toml, and Cargo.lock.
- Check
git statusand preserve user-owned changes. - Reuse a documented or existing environment before creating another one.
- Detect the host OS and shell before choosing commands.
Useful inventory commands:
Command discovery alone can mislead: on Windows, python.exe or python3.exe may be a disabled Microsoft Store alias. Run the candidate executable with --version before relying on it.
2. Python
Prefer an existing environment
In automated tool calls, invoke the environment's interpreter directly, because activation does not persist across separate shell calls:
Adapt the path when the repository uses a named environment such as .venv-map-tools. A missing bare python is not a reason to delete or recreate an existing environment.
Create with uv when the repository supports it
For a requirements-based project:
Fall back to the standard library venv
Use python -m pip rather than bare pip so installation targets the intended interpreter. For an interactive shell, activation is optional convenience:
3. Node.js
- Prefer the version in repository docs,
.nvmrc,.node-version, the
package.json engines field, or Volta configuration.
- Use the already-adopted version manager; add a second manager only with a
clear need.
- POSIX
nvmand Windowsnvm-windowsare different tools. UnixNVM_DIR
initialization does not apply on Windows.
POSIX nvm:
Windows nvm-windows:
When the user explicitly requests a version and a project pin:
Install dependencies without needlessly rewriting lockfiles:
npm ciwhenpackage-lock.jsonexists; otherwisenpm install.pnpm install --frozen-lockfilewhenpnpm-lock.yamlexists.yarn install --immutablefor modern Yarn lockfile-based projects.
Verify node --version, the package-manager version, and the repository's build or test command.
4. Rust
Rust uses a pinned toolchain rather than a per-project virtual environment.
- Reuse
rust-toolchain.tomlorrust-toolchainwhen present. - If Rust is missing and setup is in scope, prefer a trusted OS package-manager
installation of Rustup. On Windows, prefer the signed Winget route over downloading and directly launching a bootstrap executable:
Before installing, verify winget is available, and check for the MSVC C++ build tools when targeting *-pc-windows-msvc, because Rustup alone does not provide the native linker. If Winget is unavailable, follow repository guidance, or use the official Rustup installer only when local command policy permits it.
- Install the repository-pinned toolchain. If no pin exists, use the version
the user explicitly requested; otherwise use the repository's documented default and record the choice.
- Create a new
rust-toolchain.tomlonly when the user requests a project pin
or repository convention requires one.
Use the equivalent commands in POSIX shells. Run focused tests once the toolchain is usable.
5. Other Language Toolchains
Go, Java, and .NET use versioned toolchains and project dependency managers rather than Python-style virtual environments.
- Go: honor
go.mod/go.work; rungo mod download,go build ./..., and
go test ./... as appropriate.
- Java: prefer the repository's Maven or Gradle wrapper; verify the configured
JDK before using a system installation.
- .NET: honor
global.json; rundotnet --info, restore, build, and focused
tests with the pinned SDK.
Install a missing toolchain only when setup is part of the request. Prefer user-scope, version-managed, or OS package-manager installation over global ad-hoc changes.
6. Safety and Verification
- Install Python or Node packages into the project environment, not globally,
when a project environment is available.
- Before deleting, replacing, or recursively moving an existing environment,
resolve its exact path and confirm the replacement is intended.
- Prefer lockfile-preserving commands, and report any manifest or lockfile
changes.
- Dependency installation can execute project or package scripts, so use
repository-defined commands and trusted sources.
- Add environment directories to
.gitignoreonly when needed and consistent
with repository convention.
- Stage files or create setup documentation only when the user requested it or
the enclosing workflow explicitly requires it.
- Verify the exact executable path, runtime version, dependency health, and a
focused repository build or test command.
- Report what was reused or created, commands run, files changed, and any setup
the user must repeat in a new shell.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingwlm/plugins/swe/skills/manage-virtual-environments/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/peiyuanqi/work-like-me/manage-virtual-environments)