Agent skill

Ruby Gc

by joshukraine in joshukraine/dotfiles

Audit asdf-installed Ruby versions against project pins and remove unreferenced ones.

MITAuto-check passed

Install Ruby Gc

skills CLI
$ npx skills add joshukraine/dotfiles --skill ruby-gc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install joshukraine/dotfiles ruby-gc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/joshukraine/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/claude/.claude/skills/ruby-gc .claude/skills/ruby-gc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ruby-gc
GitHub stars
429
Token cost
~2.2k tokens
SKILL.md length
1,147 words
Files
1
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

Audit asdf-installed Ruby versions against project pins and remove unreferenced ones.

  • Works in 7 steps: Inventory what's installed → Read the global pin → Scan for pins — FULL DEPTH → …
  • SKILL.md covers Arguments, Safety rules, Your task and Relationship to /create-bump
  • Calls ruby, asdf and python

What it does

Ruby Gc is an agent skill from joshukraine/dotfiles. Audit asdf-installed Ruby versions against project pins and remove unreferenced ones. Dry-run by default.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Ruby. The repository describes itself as: :roundpushpin: My dotfiles for macOS using Neovim, Zsh, and Ghostty + Tmux. The licence is MIT.

Example prompts

  • “/ruby-gc”

Requirements

  • Python 3
  • Node.js
  • Docker

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Inventory what's installed
  2. Read the global pin
  3. Scan for pins — FULL DEPTH
  4. Parse the pins carefully
  5. Classify each installed version
  6. Report
  7. Uninstall (only with --apply + explicit confirmation)

What it can do on your machine

Read from SKILL.md and the folder at commit b59ad5b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • ruby
    • asdf
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ruby Gc loads about 2.2k tokens when it runs. Until then it costs about 28 tokens; SKILL.md has 1,147 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from joshukraine/dotfiles at commit b59ad5b, republished under its MIT licence (© joshukraine). 1,147 words, ~2,241 tokens.

Download SKILL.mdSave it as .claude/skills/ruby-gc/SKILL.md (or your agent's skills folder).
name
ruby-gc
description
Audit asdf-installed Ruby versions against project pins and remove unreferenced ones. Dry-run by default.
disable-model-invocation
true
argument-hint
[--apply]

Ruby GC

Garbage-collect asdf-installed Ruby versions that nothing on the system references.

Dry-run by default. Without --apply, this is a read-only report and you must not uninstall anything.

Arguments

  • $ARGUMENTS — pass --apply to enable the uninstall step. Absent that flag, stop after the report.
  • --apply enables deletion; it does not authorize it. You still show the full table and get an explicit yes first.

Safety rules

These are non-negotiable. The cost of a wrong delete is a broken app plus a slow rebuild; the cost of a wrong keep is a few hundred MB.

  1. Never delete the global version — the one in ~/.tool-versions.
  2. Never delete a version that has any pin on disk, wherever that pin lives.
  3. Never delete without showing the table and getting an explicit confirmation in the same session.
  4. If the scan errors, or returns implausibly few pins, STOP and report. A truncated scan is indistinguishable from "nothing uses this" — it produces a confident delete list that breaks real apps. This has happened; treat a thin result as a bug in the scan, not a licence to delete. "Implausibly few" is measured against the July 2026 baseline in "Calibration" below — check it every run, before classifying anything.
  5. Uninstall one version at a time, reporting each result before the next.

Your task

1. Inventory what's installed
bash
asdf list ruby
du -sh ~/.asdf/installs/ruby/*
2. Read the global pin
bash
cat ~/.tool-versions

This is a symlink into ~/dotfiles/asdf/.tool-versions (the real dotfiles). Note that ~/code/my_repos/dotfiles/ and ~/dotfiles.bak/ are stale clones carrying outdated pins — ignore them as authorities on the global version, though their pins still count under rule 2 until the user cleans them up.

3. Scan for pins — FULL DEPTH
bash
find ~ -type f \( -name .tool-versions -o -name .ruby-version \) \
  -not -path '*/node_modules/*' -not -path '*/.git/*' \
  -not -path '*/Library/*' -not -path '*/.Trash/*' \
  -not -path '*/vendor/*' -not -path '*/.asdf/*' \
  -not -path '*/.local/share/nvim/*' -not -path '*/.local/share/zap/*' \
  -not -path '*/.local/share/neobean/*' \
  -exec grep -H . {} + 2>/dev/null

Do not add -maxdepth. Projects nest deeper than seems reasonable — code/active/eto/ComixDistroBase/comix_distro/ is five levels below ~/code, and a -maxdepth 4 scan silently misses it while still returning plenty of plausible-looking output.

Scan all of ~, not just ~/code. Real projects live in ~/Sites/ too — that's where the legacy ETO sites pinning Ruby 2.7.4 are.

The plugin-directory exclusions are deliberate: nvim and zsh plugins vendor their own .tool-versions (bullets.vim pins ruby 3.1.0, neotest-rspec pins 3.1.1, a zap plugin pins 2.5.3). Those are library artifacts, not projects, and shouldn't hold an install hostage.

3b. Scan Gemfiles too — they are live pins

~/dotfiles/asdf/.asdfrc sets legacy_version_file = yes, and asdf-ruby's bin/list-legacy-filenames echoes .ruby-version Gemfile. So a Gemfile is a version pin on this system, exactly like a .ruby-version. Verify both facts each run rather than trusting this note — if legacy_version_file is ever turned off, Gemfiles stop counting.

bash
find ~ -type f -name Gemfile \
  -not -path '*/node_modules/*' -not -path '*/.git/*' \
  -not -path '*/Library/*' -not -path '*/.Trash/*' \
  -not -path '*/vendor/*' -not -path '*/.asdf/*' \
  -not -path '*/.local/share/*' \
  -exec grep -HE '^\s*ruby\s' {} + 2>/dev/null
3c. Calibration — is this scan plausible?

Rule 4 is only enforceable against a known-good baseline. Measured 2026-07-17, immediately after a cleanup run:

SignalBaselineTreat as a broken scan if...
.ruby-version + .tool-versions files found58fewer than ~40
.tool-versions carrying a ruby line21fewer than ~14
Gemfiles with any ruby line113fewer than ~80
Gemfiles with an exact ruby pin10zero

Counts drift as projects come and go, so treat them as an order-of-magnitude check, not an assertion — a 20% wobble is normal, a 60% drop is a bug. The landmark checks below are the real test, because they fail loudly rather than plausibly:

  • The scan MUST reach ~/Sites/ — 13 ruby pins live there, including the legacy ETO sites on 2.7.4. Zero hits under ~/Sites means the scan never left ~/code.
  • The scan MUST reach ~/code/active/eto/ComixDistroBase/comix_distro/. Missing it means a depth limit crept in.
  • The deepest real pin sits 9 levels below ~ (~/code/active/eto/ETOWebReboot/legacy/*/.tool-versions). Any -maxdepth silently truncates this.

Note the Gemfile ratio: 113 files carry a ruby line but only 10 are real pins. That gap is the ~100 prag-studio Gemfiles pinning ruby '>= 3.0.0'. If exact pins ever approach the total, the parse is wrongly counting range specifiers — that inflates the keep list and makes the skill useless rather than dangerous. Both failure directions are worth catching.

Show full SKILL.md (510 more words)Show less
4. Parse the pins carefully

Five formats, all present on this system:

FileExample contentsExtract
.ruby-versionruby-4.0.6strip the ruby- prefix → 4.0.6
.ruby-version3.1.2use as-is
.tool-versionsruby 3.1.2the ruby line only — the file also carries nodejs, python, lua, neovim
Gemfileruby "3.1.2"→ 3.1.2 — a real pin
Gemfileruby '>= 3.0.0' or ruby file: ".ruby-version"not a pin — ignore

A .tool-versions line may list multiple fallback versions (python 3.12.4 2.7.18); if a ruby line ever does, every version listed counts as pinned.

Only an exact Gemfile version pins anything. parse-legacy-file's sed pipeline ends with /^[^0-9]/d, which drops any result not starting with a digit — so >= 3.0.0 yields nothing, and file: ".ruby-version" defers to the .ruby-version already scanned in step 3. This matters: ~100 prag-studio Gemfiles say ruby '>= 3.0.0', and counting them would wrongly pin versions nothing uses. Mirror the plugin's real behavior; don't invent stricter or looser rules.

5. Classify each installed version
  • Global → keep, always.
  • Has ≥1 pin → keep. Record which paths, so the report can show its reasons.
  • Zero pins → delete candidate.

Sort delete candidates into two tiers, and present them separately:

  • Unreferenced — no pin anywhere. Safe.
  • Judgment — pinned only by archived clones (~/code/archives/), throwaway sandboxes (~/code/rails/, ~/code/fly/), other people's dotfiles (~/code/nathan/, ~/code/kelsie/), or stale dotfile copies. Technically pinned, plausibly disposable — the user decides, per version, every run. Never fold these into the safe tier.
6. Report

Show a table: version, size, keep/delete, and the concrete reason (a pin path, or "no pins found"). Include the total reclaimable.

Also report pins referencing versions that aren't installed (e.g. 3.3.4 has pins but no install). It means those projects are already broken, and it's a useful signal that a pin doesn't prove a project is alive.

State the known gaps every run, so the user can calibrate:

  • Only ~ is scanned — anything on an external volume is invisible.
  • Pins are read from .ruby-version, .tool-versions, and Gemfile. A project selecting its Ruby some other way (a wrapper script, a Docker image, direnv) would not show up.

CHECKPOINT: stop here unless --apply was passed. Report and end.

7. Uninstall (only with --apply + explicit confirmation)

Confirm the exact list with the user, then per version:

bash
asdf uninstall ruby <version>

Report each result. Afterwards, re-run asdf list ruby and du -sh ~/.asdf/installs/ruby to show the new state and actual space reclaimed.

Relationship to /create-bump

/create-bump is a project-local skill in the asdf working repo (~/code/active/asdf/.claude/skills/create-bump/), not part of dotfiles — it won't appear in this repo.

It uninstalls only the single MRI version it installed for testing — safe, because it created that version minutes earlier and nothing can be pinned to it yet. It must not call this skill or do fleet-wide cleanup; a routine ruby-build bump should never be able to delete an app's Ruby. Run /ruby-gc deliberately, on its own.

That constraint is enforced where it binds — in /create-bump's own step 8, since a skill can only follow rules written in the file it reads. The note here is orientation, not enforcement. If /create-bump is ever rewritten, re-check that its step 8 still carries the no-fleet-cleanup rule.

© joshukraine, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in claude/.claude/skills/ruby-gc of joshukraine/dotfiles.

Open the folder on GitHubat commit b59ad5b

Compare with similar skills

Ruby Gc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ruby Gc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ruby Gc this skilljoshukraine/dotfiles429—~2.2kAutomated safety check: PassMIT
Gumroad Prod Consoleantiwork/gumroad9.8k—~2.9kAutomated safety check: NotesMIT
Fastlane Pull Request Reviewfastlane/fastlane42k—~550Automated safety check: PassMIT
Antipattern Preventiondoorkeeper-gem/doorkeeper5.5k—~1.1kAutomated safety check: PassMIT
Mutantmbj/mutant2.2k—~2kAutomated safety check: PassProprietary
Evaluating Pegslineofflight/frankfurter2k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Gumroad Prod Console

    antiwork/gumroad

    Execute read-only Ruby/Rails commands against Gumroad's production database for debugging and investigation.

    9.8k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check: notes
  • Reviews a fastlane pull request against its linked issue and the project guides, separating blocking from non-blocking findings and handling vulnerabilities privately.

    42k GitHub stars~550 tokensUpdated today
    DevelopmentAuto-check passed
  • Antipattern Prevention

    doorkeeper-gem/doorkeeper

    Avoid common Ruby and Rails antipatterns that degrade maintainability and performance.

    5.5k GitHub stars~1.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Mutant

    mbj/mutant

    Run mutant, read mutation reports, fix alive mutations, and verify coverage.

    2.2k GitHub stars~2k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Evaluating Pegs

    lineofflight/frankfurter

    A skill your agent uses when adding, evaluating, or removing an entry in db/seeds/pegs/, when the user mentions a pegged or fixed currency, or when an issue suggests we should "pin" or "lock" a…

    2k GitHub stars~1.6k tokensUpdated 5 days ago
    Auto-check passed
  • Swig CI Repro

    swig/swig

    Reproduce a GitHub Actions Linux CI failure locally when it does not happen on your machine: a podman/docker image that mirrors the ubuntu-22.04 runner by reusing the real Tools/CI-linux-.sh install…

    6.3k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check passed

More from joshukraine/dotfiles

All 24 skills in this repo
  • Todoist CLI

    joshukraine/dotfiles

    Manage Todoist tasks, projects, labels, filters, sections, comments, reminders, and workspaces via the td CLI.

    429 GitHub starsUsed in 1 repo~6.9k tokens
    Auto-check passed
  • Autopilot Triage

    joshukraine/dotfiles

    Vet open issues for autonomous resolution and queue the qualifying ones with the autopilot-queued label — the start-of-day "fill the queue" half of the triage → run split.

    429 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • Checkpoint

    joshukraine/dotfiles

    Quick 2-minute status update on current phase, completed work, blockers, and health check.

    429 GitHub stars~600 tokensUpdated yesterday
    Auto-check passed
  • Create PR

    joshukraine/dotfiles

    Create a pull request with auto-generated description, issue linking, ROADMAP updates, and PR-metadata validation.

    429 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Debrief

    joshukraine/dotfiles

    Detailed technical walkthrough covering architecture, test coverage, product tour, and key design decisions.

    429 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Drift Check

    joshukraine/dotfiles

    Pre-PR advisory check for deviations from the project spec. An agent skill from joshukraine/dotfiles.

    429 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Ruby Gc

What does Ruby Gc do?

Audit asdf-installed Ruby versions against project pins and remove unreferenced ones. Ruby Gc is an agent skill from joshukraine/dotfiles. Audit asdf-installed Ruby versions against project pins and remove unreferenced ones.

How do I install Ruby Gc in Claude Code?

Run `npx skills add joshukraine/dotfiles --skill ruby-gc -a claude-code`. Or copy the skill folder (claude/.claude/skills/ruby-gc in joshukraine/dotfiles) into .claude/skills/ruby-gc in your project. Claude Code loads it when a task matches its description.

How do I install Ruby Gc in Codex?

Run `npx skills add joshukraine/dotfiles --skill ruby-gc -a codex`. Or copy the skill folder (claude/.claude/skills/ruby-gc in joshukraine/dotfiles) into .agents/skills/ruby-gc in your project. Codex loads it when a task matches its description.

Can I use Ruby Gc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add joshukraine/dotfiles --skill ruby-gc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ruby-gc, .gemini/skills/ruby-gc, .github/skills/ruby-gc and .opencode/skills/ruby-gc in your project.

What does Ruby Gc need to run?

Going by SKILL.md and its folder, Ruby Gc needs the command-line tools its instructions call (ruby, asdf and python). Our summary lists: Python 3; Node.js; Docker.

Does Ruby Gc access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Ruby Gc safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ruby Gc use?

Ruby Gc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ruby Gc use?

About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ruby Gc?

Skills that share tags, products or a category with Ruby Gc: Gumroad Prod Console (antiwork/gumroad, 9.8k stars), Fastlane Pull Request Review (fastlane/fastlane, 42k stars), Antipattern Prevention (doorkeeper-gem/doorkeeper, 5.5k stars) and Mutant (mbj/mutant, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ruby Gc?

joshukraine (a GitHub user) maintains it in joshukraine/dotfiles, which has 429 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 6, 2026.

Source: joshukraine/dotfiles on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.