This skill helps your AI agent understand Ruby files in as few tokens as possible.
The main features are:
- Print the outline of a file
- Print the definition of a method
Combined, these allow the agent to quickly understand a file without needing to read the entire thing.
We've used this internally at Poll Everywhere for the last few months, and it's been one of the tools agents, unprompted, use most frequently.
Get a file outline with --outline:
$ scripts/prism --outline app/models/user.rb Concerns::Searchable (module) [4-14] User < ApplicationRecord [17-78] includes Concerns::Searchable ::ROLES [21] @password (rw) [23] has_many :posts, dependent: :destroy validates :email, presence: true, uniqueness: true before_save :normalize_email scope :active, -> { where(active: true) } #full_name [42-44] .find_by_credentials(email, password) [46-49] #normalize_email~ [53-55] #custom_validation- [59-61] Admin < User [80-92] Sigil key: # instance method, . class method, :: constant, @ attribute, ~ protected, - private
Extract a specific method with --method:
$ scripts/prism --method full_name app/models/user.rb === METHOD: full_name === Lines 42-44: def full_name "#{first_name} #{last_name}" end amp skill add polleverywhere/ruby-prism-skill/ruby-prismOr manually clone to ~/.config/agents/skills/ruby-prism/.
# From GitHub git clone https://github.com/polleverywhere/ruby-prism-skill.git cp -r ruby-prism-skill/ruby-prism ~/.claude/skills/ # Or using the command palette (Ctrl+Shift+P / Cmd+Shift+P) # Run: "Claude Code: Import Skill" and provide the GitHub URLSkills are loaded from:
~/.claude/skills/(user-wide).claude/skills/(project-specific)
# From GitHub git clone https://github.com/polleverywhere/ruby-prism-skill.git cp -r ruby-prism-skill/ruby-prism ~/.agents/skills/Skills are loaded from:
~/.agents/skills/(user-wide).agents/skills/(project-specific)
# From GitHub git clone https://github.com/polleverywhere/ruby-prism-skill.git cp -r ruby-prism-skill/ruby-prism ~/.config/opencode/skills/Skills are loaded from:
~/.config/opencode/skills/(user-wide)
Ruby 3.3+ (Prism is bundled with Ruby 3.3+). No gem installation needed.
