convert-rbs-to-inline

convert-rbs-to-inline is a command for coding agents from stevegeek/claude-ruby-plugins. It costs 24 tokens per session (866 once invoked), scanned A, original, Unlicense.

A command for moving Ruby type signatures from separate .rbs files into annotations written directly inside Ruby source files. RBS is Ruby’s format for describing types without changing runtime behavior.

In plain words
What is it for?
Use it to convert one or more standalone RBS files, including glob matches, while skipping generated signatures and checking the converted result against the original types.
Why use it?
It keeps a class’s code and type information together and avoids manually repeating the conversion process. The workflow also checks that each signature has a matching Ruby file.

Command

Part of the ruby-rbs plugin — 3 skills, 3 commands, 4 agents shipped together

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 commands/stevegeek/claude-ruby-plugins/convert-rbs-to-inline
Clone the repo
git clone --depth 1 https://github.com/stevegeek/claude-ruby-plugins

Or install ruby-rbs, the plugin that ships this one along with the rest of its 3 skills, 3 commands, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for convert-rbs-to-inline

README.md
[![agentmods](https://agentmods.dev/badge/commands/stevegeek/claude-ruby-plugins/convert-rbs-to-inline.svg)](https://agentmods.dev/commands/stevegeek/claude-ruby-plugins/convert-rbs-to-inline)
Your own site
<a href="https://agentmods.dev/commands/stevegeek/claude-ruby-plugins/convert-rbs-to-inline"><img src="https://agentmods.dev/badge/commands/stevegeek/claude-ruby-plugins/convert-rbs-to-inline.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 866 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.00024 $0.00866
Opus 5 $0.00012 $0.00433
Sonnet 5 $0.00005 $0.00173
Haiku 4.5 $0.00002 $0.00087

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

Security

Grade A, and why

convert-rbs-to-inline 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 4d 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.

plugins/ruby-rbs/commands/convert-rbs-to-inline.md · 125 lines

How it starts

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

Convert Standalone RBS to Inline Annotations

You are converting standalone .rbs signature files into inline RBS annotations embedded directly in Ruby source files.

Target files: $ARGUMENTS

Process

1. Load the RBS Skill

First, load the RBS skill for comprehensive type knowledge:

Use the Skill tool to load: ruby-rbs

Read both subskills:

  • subskills/rbs-files/SKILL.md - Understand standalone RBS format
  • subskills/inline/SKILL.md - Learn inline annotation syntax

Also read the comparison reference:

  • references/comparing-signatures.md - How to verify conversion

2. Resolve Target Files

Parse the user's arguments to find .rbs files to convert:

# If glob pattern provided
find sig -name "*.rbs" -not -path "*/generated/*" 2>/dev/null

# List what will be converted
ls -la $ARGUMENTS

Skip any files in sig/generated/ (these are output from rbs-inline).

3. For Each .rbs File

3.1 Find Corresponding Ruby File

Map the .rbs path to its Ruby source:

  • sig/user.rbslib/user.rb
  • sig/my_app/models/user.rbslib/my_app/models/user.rb
  • sig/app/models/user.rbsapp/models/user.rb

If the Ruby file doesn't exist, report it and skip.

3.2 Read Both Files

Read the .rbs file to understand what types need to be converted. Read the Ruby file to know where to insert annotations.

3.3 Convert and Insert

Transform each RBS declaration to inline syntax and insert at the correct location:

Standalone Inline
def foo: (String) -> Integer #: (String) -> Integer above def foo
attr_reader name: String attr_reader :name #: String
@items: Array[String] # @rbs @items: Array[String]
class Foo[T] # @rbs generic T after class Foo
type callback = ... # @rbs! type callback = ...
3.4 Add Magic Comment

Ensure file starts with (after shebang/frozen_string_literal):

# rbs_inline: enabled

4. Generate and Validate

Read the full file on GitHub · 125 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. 4d ago First seen · 125 lines · 24 tokens per session scan A fd70db3764c0

Subscribe to this mod's changes

convert-rbs-to-inline is a command published in the GitHub repository stevegeek/claude-ruby-plugins (19 stars, last pushed 4mo ago), licensed Unlicense. It adds 24 tokens to every session and 866 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.