Skip to content

Add ruby-version skill: verify Ruby releases before claiming versions exist#28

Open
OutlawAndy wants to merge 2 commits into
mainfrom
feat/ruby-version-skill
Open

Add ruby-version skill: verify Ruby releases before claiming versions exist#28
OutlawAndy wants to merge 2 commits into
mainfrom
feat/ruby-version-skill

Conversation

@OutlawAndy
Copy link
Copy Markdown
Member

@OutlawAndy OutlawAndy commented May 19, 2026

Why

Claude routinely makes confident but wrong claims about Ruby versions — most commonly insisting that a freshly-released Ruby "doesn't exist yet" because the version postdates training. This skill gives the agent a way to check the truth before asserting it, and gives developers a one-liner to install a specific Ruby.

Live demo of the problem this solves: running check.sh on my machine reports the latest stable Ruby is 4.0.3 — a version I would otherwise have denied existed.

What

New skill at skills/ruby-version/ with two bash scripts:

  • scripts/check.sh — prints the latest stable MRI Ruby known to local ruby-build, the versions currently installed via rbenv, and the ruby-build version itself (so staleness is visible).
  • scripts/install.sh <version> — validates the version against rbenv install -l first, then runs rbenv install --skip-existing. Does not auto-set global or local — that stays a user decision.

The SKILL.md description is written to trigger aggressively on phrases like "latest Ruby", "is Ruby X out", "does Ruby X.Y exist", "install Ruby", and any agent assertion about Ruby version existence. It explicitly instructs the agent to run check.sh before making such claims.

Design choices worth flagging

  • Bash, not Ruby. A .rb script would fail on machines where Ruby is missing or broken — exactly when you'd want to run it. Bash works either way.
  • Source of truth is rbenv install -l, not a network call. It's local, fast (<1s), already authoritative on a dev machine, and avoids new external dependencies. The trade-off is that ruby-build can be stale, so the script prints the ruby-build version alongside its answer — the same staleness problem as training-data, but visible.
  • Targets rbenv only. Matches the maintainer's setup. Other version managers (mise, asdf, chruby) are intentionally out of scope.
  • Install script never sets global/local. It prints next-step hints instead. Avoids surprising side effects on the user's environment.

Test plan

  • Ran bash skills/ruby-version/scripts/check.sh on macOS + rbenv + ruby-build — output shows latest stable, ruby-build version, and the installed list.
  • Verified the installed-versions filter excludes stray entries (e.g., a literal ~ directory in ~/.rbenv/versions/).
  • Ran bash skills/ruby-version/scripts/install.sh 9.9.9 — fails fast with an actionable hint about brew upgrade ruby-build instead of attempting an install.
  • Reviewer: sanity-check the SKILL.md trigger description — does it fire on the phrases you'd expect without being so loud it becomes noise?

🤖 Generated with Claude Code

Prevents the agent from confidently claiming a Ruby version doesn't exist
when it actually does — a recurring failure mode driven by training-data
staleness. Ships two bash scripts:

- check.sh: prints the latest stable MRI Ruby from rbenv install -l, the
  versions currently installed via rbenv, and the ruby-build version so
  staleness is visible.
- install.sh <version>: validates the version against ruby-build's known
  list first, then runs rbenv install --skip-existing. Does not auto-set
  global or local — that stays a user decision.

Scripts are bash, not Ruby, so they remain usable when Ruby itself is
missing or broken on the machine.

The SKILL.md description triggers aggressively on phrases like
"latest Ruby", "is Ruby X out", "install Ruby", and any agent assertion
about Ruby version existence — and instructs the agent to run check.sh
before making such claims.
Copilot AI review requested due to automatic review settings May 19, 2026 18:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new ruby-version skill intended to prevent incorrect assertions about Ruby version availability by providing local rbenv/ruby-build based verification and a guarded install helper.

Changes:

  • Added skills/ruby-version/SKILL.md describing when to invoke the skill and how to use the scripts.
  • Added scripts/check.sh to report latest stable Ruby known to local ruby-build, ruby-build version, and installed rbenv versions.
  • Added scripts/install.sh to validate a requested version against rbenv install -l and install via rbenv install --skip-existing.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
skills/ruby-version/SKILL.md Documents the new skill, triggers, and usage for verifying/installing Ruby via rbenv.
skills/ruby-version/scripts/check.sh Implements local Ruby version verification and reporting via rbenv/ruby-build.
skills/ruby-version/scripts/install.sh Implements validated Ruby installation via rbenv with fast-fail messaging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/ruby-version/scripts/check.sh Outdated
Comment thread skills/ruby-version/scripts/check.sh Outdated
…ilter system from installed list

Agent-Logs-Url: https://github.com/RoleModel/rolemodel-skills/sessions/cd28e139-db6f-4f65-b215-c7f0b7269d8d

Co-authored-by: OutlawAndy <1504753+OutlawAndy@users.noreply.github.com>
@OutlawAndy OutlawAndy self-assigned this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants