skills/dmitrypogrebnoy/generating-sorbet-inline/SKILL.md
Generates Sorbet inline type signatures using sig blocks directly in Ruby source files. Triggers when adding Sorbet types, annotating Ruby methods with sig syntax, or generating type signatures for Sorbet-typed projects.
npx skillsauth add aiskillstore/marketplace generating-sorbet-inlineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate Sorbet type signatures using sig {} blocks directly in Ruby source files. Sorbet signatures are valid Ruby code that enable both static and runtime type checking.
When generating Sorbet inline signatures, always follow these steps.
Copy this checklist and track your progress:
Sorbet Inline Generation Progress:
- [ ] Step 1: Analyze the Ruby source
- [ ] Step 2: Add Sorbet signatures
- [ ] Step 3: Eliminate `T.untyped` in signatures
- [ ] Step 4: Review and refine signatures
- [ ] Step 5: Validate signatures with Sorbet
T.untyped. Infer the proper type instead.T.unsafe - it bypasses type checking entirely.T.cast - it forces types without verification.bundle exec if the project has Gemfile.sig { } block syntax for method signatures.extend T::Sig to classes/modules before using sig..rbi files. This skill is for inline signatures only.# typed: sigil level if one exists. Do not upgrade or change strictness without explicit user consent.Always perform this step.
Read and understand the Ruby source file:
public, private, protected.# typed: sigil level at the top of the file.Always perform this step.
First, check if the file already has a # typed: sigil at the top:
# typed: true as a sensible default (allows gradual typing).Sigil levels (least to most strict): ignore < false < true < strict < strong
Add extend T::Sig to the class/module:
class MyClass
extend T::Sig
end
Then add type signatures using sig {} blocks:
Example - Before:
class User
attr_reader :name, :age
def initialize(name, age)
@name = name
@age = age
end
def greet(greeting)
"#{greeting}, #{@name}!"
end
end
Example - After:
# typed: true
class User
extend T::Sig
sig { returns(String) }
attr_reader :name
sig { returns(Integer) }
attr_reader :age
sig { params(name: String, age: Integer).void }
def initialize(name, age)
@name = name
@age = age
end
sig { params(greeting: String).returns(String) }
def greet(greeting)
"#{greeting}, #{@name}!"
end
end
T.untyped in SignaturesAlways perform this step.
T.untyped with proper types.T.untyped only as a last resort when type cannot be determined.Always perform this step.
T.untyped types.Always perform this step.
Run Sorbet type checker to validate signatures:
srb tc
Or with bundle:
bundle exec srb tc
This checks:
Fix any errors reported and repeat until validation passes.
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.