Agent skill · software engineering · aiskillstore

generating-sorbet

Generates Sorbet type signatures in separate RBI files from Ruby source files. Triggers when creating type definitions, adding types to Ruby code, or generating .rbi files for classes/modules without existing Sorbet signatures.

Why this skill is useful

Adds specific commands and procedures for generating Sorbet RBI files that the AI wouldn't reliably generate on its own.

What it needs

Requires sorbet installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Sorbet RBI Generation Skill Generate Sorbet type signatures in separate .rbi files. RBI files are used when you cannot or should not modify the original Ruby source - such as for gems, generated code, or legacy codebases. Instructions When generating Sorbet RBI signatures, always follow these steps. Copy this checklist and track your progress: Rules You MUST NOT run Ruby code of the project. You MUST NOT use T.untyped. Infer the proper type instead. You MUST NOT use T.unsafe - it bypasses type checking entirely. You MUST NOT use T.cast - it forces types without verification. You MUST ask the user to provide more details if something is not clear. You MUST prepend any command with bundle exec if the project has Gemfile. You MUST use sig { } block syntax for method signatures. You MUST add extend T::Sig to classes/modules before using sig. You MUST NOT add method bodies in RBI files - only signatures and empty method definitions. You MUST place RBI files in ./rbi directory. 1. Analyze the Ruby Source Always perform this step. Read and understand the Ruby source file: Identify all classes, modules, methods, constants and instance variables. Note inheritance, module inclusion and definitions based on metaprogramming. Note visibility modifiers - public, private, protected. Note type parameters for generic classes. 2. Generate RBI Files Always perform this step. 1. Determine the correct RBI directory: Place RBI files in ./rbi directory. Sorbet reads all .rbi files from this location. RBI files are needed to describe code Sorbet cannot understand statically: Gem definitions Methods created with definemethod or methodmissing Constants from constget/constset Dynamic ancestors added via extend DSL-generated methods (Rails, ActiveRecord, etc.) 2. Create the RBI file with typed sigil: 3. Add extend T::Sig to each class/module: 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/generating-sorbet

View the source on GitHub

Browse the @skills marketplace