env-manager-selection

Select the project-declared environment manager and activation workflow for runtime version mismatches.

Updated Sep 4, 2025
One-click install
npx skills add https://github.com/ykai55/dotfiles --skill env-manager-selection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: env-manager-selection
Source: https://github.com/ykai55/dotfiles/tree/main/opencode/skills/env-manager-selection
Command: npx skills add https://github.com/ykai55/dotfiles --skill env-manager-selection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It resolves confusing build, test, or install failures caused by using the wrong language/runtime version or environment manager, by guiding you to the project-declared manager and the correct activation commands.

Core Features & Use Cases

  • Environment manager detection: Chooses the preferred manager based on cues like .sdkmanrc, .nvmrc, .python-version, .ruby-version, and .tool-versions.
  • Runtime version mismatch triage: Applies when commands fail due to version mismatch signals (e.g., unsupported class file, build errors tied to Java/JDK/Node/Python/Ruby/Go).
  • Safety-first guidance: Avoids tool/environment inspection if the user requests not to read environment files, and asks a clarifying question when uncertain.

Quick Start

Ask the assistant which environment manager and activation command to use for the project’s Java, Node.js, Python, Ruby, or Go version based on the error or version cue you provided.

Frequently Asked Questions about env-manager-selection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resolve build failures caused by a Python or Node.js runtime version mismatch?

Resolve runtime version mismatch build failures by checking project version cue files like .nvmrc or .python-version, then activating the declared environment manager with the correct command to switch the active runtime and fix the compilation errors.

What is the best way to pick the right environment manager for a project?

The best way to pick the right environment manager is by mapping mandatory project files like .sdkmanrc, .tool-versions, or .ruby-version to their manager-specific activation commands, ensuring the correct runtime is selected before building or testing.

How do I use .tool-versions and .nvmrc files to switch my local language runtime?

Use .tool-versions and .nvmrc files to switch your local language runtime by detecting the cues and running the corresponding manager commands, such as invoking asdf, sdkman, or fnm/nvm to align your active environment with the project's declared version.

Does this environment manager detection work if I don't want files inspected?

Environment manager detection respects user constraints by avoiding file inspection if requested, and it asks a clarifying question when the appropriate runtime manager or activation workflow is uncertain.

Why does my Java or Go build fail with an unsupported class file or runtime error?

Java or Go builds fail with unsupported class file or runtime errors when the active language runtime version does not match the project's declared version, requiring you to switch managers using cues like .sdkmanrc to align the environment.