ruby-gc

A safety-focused cleanup tool for Ruby versions installed through asdf, a tool that manages multiple language versions. It finds versions that no project or system setting refers to.

In plain words
What is it for?
Use it to preview unused Ruby versions and, after explicit confirmation, remove them with the apply option. It keeps globally selected or otherwise pinned versions.
Why use it?
It reduces the risk of deleting a Ruby version still needed by an application, and reports what it found before any removal.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/joshukraine/dotfiles/ruby-gc
Any agent
npx skills add joshukraine/dotfiles --skill ruby-gc
Clone the repo
git clone --depth 1 https://github.com/joshukraine/dotfiles

Made for: Claude Code, Codex.

Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,454 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.02454
Opus 5 $0.00013 $0.01227
Sonnet 5 $0.00005 $0.00491
Haiku 4.5 $0.00003 $0.00245

Measured 2d ago against content hash 162ebefca600, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ruby-gc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude/.claude/skills/ruby-gc/SKILL.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

asdf list ruby
du -sh ~/.asdf/installs/ruby/*

2. Read the global pin

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

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

Read the full file on GitHub · 153 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 153 lines · 25 tokens per session scan A 162ebefca600

Subscribe to this mod's changes

ruby-gc is a skill published in the GitHub repository joshukraine/dotfiles (421 stars, last pushed 20d ago), licensed MIT. It adds 25 tokens to every session and 2,454 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

cmux-rebuild

Manage the user's durable dev sessions — zellij sessions on remote hosts (bonbon, taffy) reached over mosh, plus the local host's (trifle) own detached zellij sessions, surfaced as cmux tabs via ssh::durable / zellij::resume. Load when the user wants to rebuild/resurrect lost cmux durable surfaces after a cmux restart…

DJRHails/dotfiles · 232 tokens

ml-paper-writing

Write publication-ready ML/AI papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM. Use when drafting papers from research repos, structuring arguments, verifying citations, or preparing camera-ready submissions. Includes LaTeX templates, reviewer guidelines, and citation verification workflows.

DJRHails/dotfiles · 65 tokens

python-conventions

Python coding conventions, modern tooling, and project setup. Apply when writing or reviewing Python code, creating projects, writing scripts, or migrating from legacy tools. Covers uv, ruff, ty, type hints, code structure, async, testing, and project configuration.

DJRHails/dotfiles · 57 tokens

review-pr

Review an existing GitHub PR with the parallel pr-review-toolkit agents, post inline findings, fix them, run the quality pipeline, push, resolve threads, and post a summary. Right-sizes small / delta PRs to a direct single-pass review with no sub-agents. Use when asked to review and fix a PR, do a thorough multi-agent…

DJRHails/dotfiles · 89 tokens

cmux-fork-session

Fork the current agent session — Claude Code or pi — into a new cmux split pane (or tab): opens a split beside the caller, relaunches this session forked (claude --fork-session / pi --fork), titles it 'fork: ', and keeps that title. Use when the user asks to fork/duplicate/branch the current session into a new split…

DJRHails/dotfiles · 137 tokens

patch-stack-action

Manage patch-stack forks — setup, daily patch editing, and sync workflows. Use when a repo references DJRHails/patch-stack-action, has commits prefixed "patch-stack:", or has patch/ branches.

DJRHails/dotfiles · 46 tokens