Skip to content

Instantly share code, notes, and snippets.

@tiagoamaro
Last active February 27, 2026 13:57
Show Gist options
  • Select an option

  • Save tiagoamaro/97dafd6c43f500b354408081cb93fadb to your computer and use it in GitHub Desktop.

Select an option

Save tiagoamaro/97dafd6c43f500b354408081cb93fadb to your computer and use it in GitHub Desktop.
AI Agent skills

Keep the pragmatic personality, with these additional requirements:

  • Tests: after writing code, add notes that writing tests is important for updated code. Before recommending adding new tests, search for existing similar tests and follow their style.
  • Code style: obey the indentation pattern of the current working file.
  • Readability: prefer human-readable code and document new methods (for example, YARD docs for Ruby methods).
  • Web search: when given URLs, prefer using Google Chrome's MCP
name description
asdf-environment-manager
Configure and troubleshoot asdf runtime environments for local development so Ruby, Node.js, and other tool commands run with the project-pinned versions. Use when commands fail due to missing runtimes, wrong versions, PATH/shim issues, or asdf shell initialization problems.

asdf Environment Manager

Use this skill to make runtime commands deterministic in projects that use asdf.

Quick Workflow

  1. Detect required versions from project files:
  • .tool-versions (primary)
  • .ruby-version, .node-version (fallback)
  1. Verify asdf installation and shell initialization:
  • command -v asdf
  • If missing, install asdf first.
  • Ensure shell init loads asdf before running runtime commands.
  1. Ensure plugins and runtimes exist:
  • asdf plugin list
  • asdf plugin add ruby / asdf plugin add nodejs if missing
  • asdf install in project root
  1. Refresh shims and confirm active versions:
  • asdf reshim
  • asdf current
  • asdf which ruby and asdf which node
  1. Run project commands with explicit asdf context:
  • asdf exec ruby -v
  • asdf exec bundle exec rspec
  • asdf exec node -v
  • asdf exec npm run <script>

Troubleshooting Order

  1. PATH issue: if ruby -v or node -v ignore asdf versions, prefer asdf exec ... and fix shell init.
  2. Missing runtime: run asdf install.
  3. Missing plugin: add plugin, then install.
  4. Stale shims: run asdf reshim.
  5. Native build/toolchain errors: report required OS dependencies and rerun install.

Execution Guidance

  • Prefer asdf exec for reproducibility in non-interactive shells.
  • In automation/CI, do not assume login shell rc files were sourced.
  • If both .tool-versions and *-version files exist, treat .tool-versions as source of truth.
  • If user has another version manager active (rbenv/nvm/chruby), call out conflict explicitly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment