Add ruby-version skill: verify Ruby releases before claiming versions exist#28
Open
OutlawAndy wants to merge 2 commits into
Open
Add ruby-version skill: verify Ruby releases before claiming versions exist#28OutlawAndy wants to merge 2 commits into
OutlawAndy wants to merge 2 commits into
Conversation
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.
Contributor
There was a problem hiding this comment.
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.mddescribing when to invoke the skill and how to use the scripts. - Added
scripts/check.shto report latest stable Ruby known to local ruby-build, ruby-build version, and installed rbenv versions. - Added
scripts/install.shto validate a requested version againstrbenv install -land install viarbenv 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.
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.shon 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 againstrbenv install -lfirst, then runsrbenv install --skip-existing. Does not auto-set global or local — that stays a user decision.The
SKILL.mddescription 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 runcheck.shbefore making such claims.Design choices worth flagging
.rbscript would fail on machines where Ruby is missing or broken — exactly when you'd want to run it. Bash works either way.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.Test plan
bash skills/ruby-version/scripts/check.shon macOS + rbenv + ruby-build — output shows latest stable, ruby-build version, and the installed list.~directory in~/.rbenv/versions/).bash skills/ruby-version/scripts/install.sh 9.9.9— fails fast with an actionable hint aboutbrew upgrade ruby-buildinstead of attempting an install.🤖 Generated with Claude Code