AgentSkillsCN

ruby-resource-map

适用于 Ruby 项目——提供权威的文档、类型注解与工具支持来源。

SKILL.md
--- frontmatter
name: ruby-resource-map
description: Use when working in a Ruby project - provides authoritative sources for documentation, typing, and tooling

Ruby Knowledge

Authoritative resource map for Ruby development. Use these sources rather than searching broadly.

Never use these sources:

  • ruby-doc.org
  • apidock.com

Official Documentation

Primary source: https://docs.ruby-lang.org/en/

Other Useful Resources

Core & Standard Library

TermMeaning
Default gemShips with Ruby, cannot uninstall
Bundled gemShips with Ruby, can uninstall/replace
Standard libraryPart of Ruby itself, not a gem

Typing Ecosystem

Two type definition formats exist in Ruby:

  • RBI - Sorbet's format. Uses Ruby DSL syntax (sig { ... }) in .rb and .rbi files.
  • RBS - Official Ruby format (Ruby 3.0+). Dedicated syntax in .rbs files or inline as comments.

Sorbet Ecosystem

Sorbet is a static and runtime type checker for Ruby, maintained by Stripe. Key companion tools:

  • Tapioca - Generates RBI files for gems and DSLs (Rails, ActiveRecord, etc.)
  • Spoom - Coverage analysis, strictness bumping, dead code detection, signature migration

RBS Ecosystem

  • rbs - Official CLI for working with RBS files (prototype, list, methods)
  • Steep - Type checker that uses RBS

RBS Inline Comments

Sorbet supports RBS-style inline type annotations using #: comment syntax. This eliminates the need for separate .rbi files or verbose sig blocks.

Docs: https://sorbet.org/docs/rbs-comments