write-inline-rbs

write-inline-rbs is a command for Claude Code from stevegeek/claude-ruby-plugins. It costs 17 tokens per session (647 once invoked), scanned A, original, Unlicense.

A command that adds inline RBS type annotations to Ruby source files. RBS is a Ruby type-signature format that describes method inputs, outputs, classes, and modules.

In plain words
What is it for?
Use it to annotate specified Ruby files with rbs-inline comments. It can account for method behavior, instance variables, DSL patterns, tests, and optional type-tracer output.
Why use it?
It helps make Ruby code's expected types visible without maintaining a separate signature file. The command also directs the agent to inspect related tests and Ruby structure before choosing annotations.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

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

Good fit Use it to annotate specified Ruby files with rbs-inline comments. It can account for method behavior, instance variables, DSL patterns, tests, and optional type-tracer output.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/stevegeek/claude-ruby-plugins/write-inline-rbs
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.

Clone the repo
git clone --depth 1 https://github.com/stevegeek/claude-ruby-plugins

Made for: Claude Code.

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 write-inline-rbs

README.md
[![agentmods](https://agentmods.dev/badge/commands/stevegeek/claude-ruby-plugins/write-inline-rbs/github.svg)](https://agentmods.dev/commands/stevegeek/claude-ruby-plugins/write-inline-rbs)
Your own site
<a href="https://agentmods.dev/commands/stevegeek/claude-ruby-plugins/write-inline-rbs"><img src="https://agentmods.dev/badge/commands/stevegeek/claude-ruby-plugins/write-inline-rbs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for write-inline-rbs

Your own site · 80×15
<a href="https://agentmods.dev/commands/stevegeek/claude-ruby-plugins/write-inline-rbs"><img src="https://agentmods.dev/badge/commands/stevegeek/claude-ruby-plugins/write-inline-rbs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 647 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00017 $0.00647
Opus 5.5 $0.00007 $0.00259
Sonnet 5.5 $0.00003 $0.00129
Haiku 4.5 $0.00002 $0.00065

Measured 1mo ago against content hash 0c400e8255c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

write-inline-rbs 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 1mo 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/write-inline-rbs.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.

Write Inline RBS Annotations

You are adding inline RBS type annotations directly in the Ruby source file at: $ARGUMENTS

Process

1. Load the RBS Skill

First, load the RBS skill for comprehensive type knowledge:

Use the Skill tool to load: ruby-inline-rbs

Then read the inline RBS subskill for syntax details:

  • subskills/inline/SKILL.md

2. Analyze Target

Read the Ruby file(s) specified by the user:

  • Understand class/module structure
  • Note method signatures, parameters, return patterns
  • Identify instance variables
  • Look for DSL usage (attr_*, delegate, etc.)

3. Find Tests

Search for related test files:

Glob for: test/**/*{target_name}*_test.rb, spec/**/*{target_name}*_spec.rb

Read tests to understand:

  • Expected method behavior
  • Edge cases (nil returns, exceptions)
  • Type expectations from assertions

4. Use Type Tracer (If Tests Exist)

If tests exist, consider running the type tracer:

# First locate type_tracer.rb in plugin directory using find
ruby <TRACER_SCRIPT> -c 'TargetClass' -f json path/to/test.rb

Review tracer output to inform type decisions.

5. Add Magic Comment

Ensure the file has the magic comment at the top:

# rbs_inline: enabled

6. Add Inline Annotations

Add type annotations using comment syntax:

Method signatures:

#: (String, Integer) -> String
def format(text, width)

Attributes:

attr_reader :name #: String
attr_accessor :count #: Integer?

Instance variables:

# @rbs @items: Array[String]

Blocks:

#: () { (String) -> void } -> void
def each(&block)

Generics:

# @rbs generic T
class Container

7. Generate and Validate

Generate RBS from inline annotations:

bundle exec rbs-inline --output lib

Then validate:

bundle exec steep check lib/target.rb

Fix any errors before completing.

Output

  1. Modified Ruby file(s) with inline type annotations
  2. Generated sig/generated/*.rbs files (if --output used)
  3. Report what was typed and any decisions made

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. 1mo ago First seen · 125 lines · 17 tokens per session scan A 0c400e8255c3

Subscribe to this mod's changes

write-inline-rbs is a command published in the GitHub repository stevegeek/claude-ruby-plugins (19 stars, last pushed 5mo ago), licensed Unlicense. It adds 17 tokens to every session and 647 once invoked, about $0.0001 per session on Opus 5.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.