Asdf manager
You might have skills, but I got quirks!
npx -y skills add detro/quirks --skill asdf-managerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Manage project runtime dependencies, tool versions, and plugins using asdf-vm. Proposes asdf to resolve missing script runtimes (e.g. Python, Perl) and handle tool updates with strict security checks for custom plugins.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
11.2 KB, as published. Nobody here has run it
ASDF Manager
This skill allows agents to manage project tool versions and dependencies using asdf. It handles the creation and updating of .tool-versions files, installs and updates plugins, and enforces essential security guardrails when installing third-party plugins.
When to Use
- When a project uses
asdffor managing runtime environments (e.g. Node.js, Python, Ruby, Go, Elixir, Rust). - When a
.tool-versionsfile exists in the repository, or the user wants to set up multi-runtime versioning. - When the user asks to "update all tools" or set a tool to its "latest" version.
- When the user wants to add a new development tool, language runtime, or utility that is manageable via
asdf. - When an agent is trying to run a script in Python, Perl, or another scripting language, but is struggling to find the required runtime on the host system, especially if the project is already leveraging
asdf(e.g., contains a.tool-versionsfile).
When Not to Use
- When the project is explicitly configured to use another package/runtime manager (such as
mise,fnm,nvm,pyenv,rbenv,gvm, orasdf-vmis not installed/desired). - When installing packages that should be managed via system-level package managers (like
brew,apt,pacman, ordnf) and do not require per-project version locking.
Inputs
| Input | Required | Description |
|---|---|---|
| Tool Name | Yes | The name of the runtime or tool (e.g., nodejs, python, golang). |
| Version | No | The specific version to set or install (e.g., 18.16.0, latest, system). |
| Action | Yes | The operation to perform: update-all, install-tool, set-version, add-plugin, or propose-missing-runtime. |
| Global | No | Set to true to apply the configuration globally ($HOME/.tool-versions) instead of the local project directory. |
Workflow
Step 1: Detect and Validate ASDF Environment
Before executing any asdf commands, verify that asdf is installed and accessible in the agent's current shell environment:
- Run
which asdforasdf --version. - If
asdfis not found, check common installation paths (such as$HOME/.asdf/bin/asdfor/opt/homebrew/bin/asdf). If it is installed but not sourced, guide the user on how to source it. - If
asdfis completely missing from the system, the skill must quit early and inform the user: "Please install it from https://asdf-vm.com/guide/getting-started.html"- Why: The skill cannot proceed without the
asdfcore executable installed. Fast-failing with a helpful installation URL ensures a smooth user setup experience.
- Why: The skill cannot proceed without the
Step 2: Handle "Update All Tools" requests
When the user asks to update all tools to their latest versions:
- Locate the
.tool-versionsfile (typically in the project root, or check parent directories). - Read the list of tools defined in the
.tool-versionsfile. - For each tool found, execute the following command to automatically resolve and write the latest version:
asdf set <tool-name> latest- Why: Using
asdf set <tool-name> latestis more precise and robust than editing.tool-versionsmanually, because it triggersasdfto fetch the real, resolved, latest available version, download/compile it if necessary, and write the exact static version string back to the.tool-versionsfile.
- Why: Using
Step 3: Search and Add Plugins (Community Index Check)
When the user requests to install a tool/plugin:
- First, check if the plugin is already installed by running:
If it is already installed, skip to Step 5.asdf plugin list - If the plugin is not installed, verify if it exists in the official
asdfcommunity index:
Filter or search the output for the desired tool name.asdf plugin list all- Why: Checking the community index ensures we only install curated and reviewed plugins. Third-party plugins outside the official index have the power to run custom hook scripts and compile/install untrusted binaries on the host system.
Step 4: Strict Security Check for Custom/Non-Community Plugins
If the requested tool is NOT present in the official community index (asdf plugin list all output):
- Guide the Agent to search online (e.g., via search engines, GitHub, or documentation) to find the correct, legitimate source repository URL for the
asdfplugin. - DO NOT proceed to install the custom plugin without explicit user permission. This is a critical security boundary.
- Formulate a structured permission request to the user containing:
- A clear warning that the plugin is not in the official
asdfcommunity repository list. - The exact repository URL found for the plugin (e.g.,
https://github.com/someone/asdf-mytool). - A warning about the security implications of third-party plugins (which can execute arbitrary shell code during installation/use).
- An explicit prompt asking for permission to proceed with installation.
- A clear warning that the plugin is not in the official
- If and only if the user consents, proceed to add the custom plugin using the verified URL:
asdf plugin add <tool-name> <plugin-url>
Step 5: Install and Set the Tool Version
Once the plugin is installed/added:
- If the user requested a specific version, install it:
Otherwise, install the latest version:asdf install <tool-name> <version>asdf install <tool-name> latest - Write the version to the project configuration:
- For local project versioning (default):
asdf set <tool-name> <version-or-latest> - For global user-level versioning:
asdf set -u <tool-name> <version-or-latest>
- For local project versioning (default):
- Run
asdf reshimafter installation to ensure all shims are updated and the newly installed executable is immediately usable.
Step 6: Propose and Install Missing Runtimes for Scripts
When an agent needs to execute a script (e.g., Python, Perl, Ruby, Bash, etc.) but cannot locate the necessary language runtime or interpreter on the host system:
- Analyze Project Context: Check if the project is already leveraging
asdfby looking for a.tool-versionsfile orasdfconfigurations in the current directory or parent directories.- Why: If the project already uses
asdf, utilizing it to install the missing runtime keeps the environment consistent with existing project configurations and avoids polluting the global system or introducing version conflicts.
- Why: If the project already uses
- Propose ASDF as an Option: Instead of failing or trying to install the runtime globally via system package managers (which might require root/sudo privileges or cause environment contamination), propose using
asdfto install the required runtime. - Ask for Explicit User Permission: Present a clear proposal to the user explaining:
- Which runtime is missing (e.g.,
python,perl). - The script that needs to be executed.
- Why
asdfis the recommended path (e.g., local version isolation, existing.tool-versionsfile). - An explicit request for permission to add the plugin, install the runtime, and set the version locally.
- Why: Installing a runtime compiles or downloads binaries and modifies the local workspace environment. Explicit user permission is a critical safety and transparency boundary before performing these changes.
- Which runtime is missing (e.g.,
- Install and Configure: If and only if the user grants permission:
- Identify the official plugin name (e.g.,
python,perl) usingasdf plugin list all. - Add the plugin, install the specified/latest version, and set it locally (following Steps 3, 4, and 5).
- Ensure the runtime is added to the project's local
.tool-versionsfile so that future executions of the script are fully reproducible.
- Identify the official plugin name (e.g.,
Validation
- Run
asdf currentto verify that the newly set tool versions are active and resolve correctly in the directory. - Ensure
.tool-versionsfile matches the configured tools and versions. - Check that custom plugins added outside the official index were only installed after explicit user confirmation.
- Verify that missing script runtimes (like Python or Perl) are proposed and installed via
asdfonly after explicit user consent, and are properly written to the local.tool-versionsfile.
Common Pitfalls
| Pitfall | Solution |
|---|---|
asdf: command not found in agent shell | asdf is likely installed but not sourced in the active shell. Locate asdf.sh (e.g., under /opt/homebrew/opt/asdf/libexec/asdf.sh or $HOME/.asdf/asdf.sh) and source it, or add /shims to $PATH dynamically in the agent context. |
| Tool executable does not run after install | Run asdf reshim to regenerate the shims directory wrappers so the shell can locate the new binary. |
| Installation fails due to missing compilation tools | Languages like Ruby, Python, and Erlang compiled from source using asdf require local build dependencies (like gcc, openssl, make, libyaml, etc.). Tell the user which dependencies are missing based on the build logs. |
| Non-interactive shell blocks on interactive prompts | Ensure asdf commands are run non-interactively or dependencies are pre-satisfied. |
| Script still fails after installing runtime | Check if the script contains a hardcoded absolute shebang (e.g., #!/usr/bin/python3 or #!/usr/bin/perl). Suggest updating the shebang to use #!/usr/bin/env <runtime> (e.g., #!/usr/bin/env python3) so that asdf shims can intercept and resolve the execution path correctly. |