generating-sorbet

Generate Sorbet RBI signatures for Ruby source files into the rbi directory.

26|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/DmitryPogrebnoy/ruby-agent-skills --skill generating-sorbet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generating-sorbet
Source: https://github.com/DmitryPogrebnoy/ruby-agent-skills/tree/main/plugins/ruby-type-signature-skills/skills/generating-sorbet
Command: npx skills add https://github.com/DmitryPogrebnoy/ruby-agent-skills --skill generating-sorbet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates and updates Sorbet RBI signatures to describe Ruby code statically, enabling safer type checks without modifying source files.

Core Features & Use Cases

  • Generates standalone RBI files in the rbi directory from Ruby sources.
  • Updates existing RBI files to reflect changes in the Ruby codebase.
  • Useful for gems, generated code, or legacy code where signatures should live separately.

Quick Start

Run this skill to generate or refresh Sorbet RBI signatures for your Ruby codebase.

Frequently Asked Questions about generating-sorbet

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Sorbet RBI signatures for a multi-file Ruby project?

To generate Sorbet RBI signatures for a Ruby project, you run this skill to analyze Ruby source files and automatically write the corresponding type signatures into the ./rbi directory using strict sig { } blocks.

What is the best way to add static type checking to legacy Ruby code without modifying source files?

The best way to add static type checking to legacy Ruby code without modifying source files is to generate standalone RBI signatures in a separate rbi directory, keeping type definitions maintained alongside the original codebase.

Can I update existing RBI files to reflect changes in my Ruby codebase?

Yes, you can update existing RBI files to reflect changes in your Ruby codebase by running this skill, which refreshes the static type signatures to match your current Ruby sources.

Does this RBI generation approach work for Ruby gems and generated code?

Yes, this RBI generation approach works for Ruby gems and generated code, applying strict RBI conventions to maintain type signatures separately in the rbi directory for multi-file projects.

Why do my generated Sorbet signatures need to be placed under the rbi directory?

Generated Sorbet signatures need to be placed under the rbi directory to enforce strict RBI conventions, ensuring that static type checking can safely validate Ruby code without altering the actual source files.

What are the limitations of generating RBI files separately from Ruby source code?

A limitation of generating RBI files separately is that you must continuously refresh the standalone signatures to accurately track and reflect any structural changes made to the original Ruby source files.