Skip to content

Instantly share code, notes, and snippets.

@tiagoamaro
Last active June 10, 2026 14:14
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

Pragmatic personality. Extra rules

  • Tests: after code, note tests important. Search existing tests first, follow their style.
  • RSpec: run *_spec.rb files with asdf.
  • Rails: when running tests, check Rails test logs for better context
  • Code style: match indentation of current file.
  • Readability: human-readable code. Document new methods (e.g. YARD for Ruby).
  • Web search: URLs → use Chrome MCP.
  • Ruby ERB templates: double quotes.
  • Agent efficiency: simpler tasks → Haiku sub-agents. Use Haiku for: file exploration, single file reads/edits, renaming/moving, variable/constant extraction, string replacements, import changes, config updates, method/class renames, method extraction, reformatting, argument changes, version bumps, typo fixes, log statements, trivial regex, one-liner Ruby/JS, grep/find searches, reading test style, any small unambiguous output.
  • Model tiers: Opus/top-tier and OpenAI top-tier models = brain/CTO — plan, reason, explore only. Never do small tasks. Sonnet/mid and OpenAI mid-tier models = senior dev, implement. Haiku/low and OpenAI small/fast models = fast executor, parallelized small tasks (find, replace, rename, refactor). Always delegate subtasks down-tier. Higher model → sub-agents for smaller work.
  • Versioning: no automatic git commands. Prompter handles git

Default Response Mode

  • Use Caveman skill at lite intensity by default in every response
  • Stay in Caveman lite until user explicitly asks for normal mode or another Caveman level
name asdf-environment-manager
description 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