← ClaudeAtlas

generating-sorbetlisted

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.
aiskillstore/marketplace · ★ 329 · Data & Documents · score 79
Install: claude install-skill aiskillstore/marketplace
# 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: ``` Sorbet RBI Generation Progress: - [ ] Step 1: Analyze the Ruby source - [ ] Step 2: Generate RBI files - [ ] Step 3: Eliminate `T.untyped` in signatures - [ ] Step 4: Review and refine signatures - [ ] Step 5: Validate signatures with Sorbet ``` ## 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 inclusi