Agent skill

Ruby Information

When you need check documentation about Ruby classes, modules, and methods use this skill to get full details. Avoid check source code or use `ruby -e` for documentation unless absolutely necessary.

Stars 1
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/elct9620/claude-ruby-plugin/tree/main/skills/ri

SKILL.md

Ruby Information

Use the ri command to access Ruby documentation which is installed locally on your system.

Instructions

Use ri [options] <whatever> to look up information about Ruby classes, modules, and methods.

  • Combine with head to fast check documentation before displaying full content.
  • Combine with wc to count relevant items when searching for multiple entries.
  • Combine with grep to filter results based on keywords.

Consider to add quote to queries with special characters to avoid shell interpretation issues. e.g. ri 'String#blank?'

Scenarios

Direct Lookup

Check specific Ruby classes or methods accurately.

bash
ri Array#push

Search method

Check for methods is implemetned in a class or module and get a count of results.

bash
ri '.find' | wc -l

Use grep to filter results.

bash
ri '.find' | grep 'Enumerable'

Note: Use wc and grep to ensure the output is concise and relevant.

List Names

Get a list of all classes and modules under a specific namespace.

bash
ri --list 'MyModule::Application'

Preview Documentation

Preview the first few lines of documentation for a method or class.

bash
ri 'String#upcase' | head -n 10

Explore Options

Explore various options available with the ri command.

bash
ri --help

Documentation

You can get README and other documentation if bundled with gems.

bash
ri rspec:README.md

To list all available documentation files for a gem:

bash
ri rspec:

Append the : after the gem name to see all documentation files associated with that gem.

Building Documentation

You can use rdoc to generate and view documentation for your own Ruby projects.

bash
rdoc --format=ri --output=ri_doc .

View the generated documentation using ri:

bash
ri -d ./ri_doc 'MyClass'

References

For more information, refer to the official Ruby documentation: https://ruby.github.io/rdoc/index.html

Expand your agent's capabilities with these related and highly-rated skills.

mattpocock/skills

git-guardrails-claude-code

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

111,310 9,758
Explore
mattpocock/skills

scaffold-exercises

Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

111,310 9,758
Explore
mattpocock/skills

setup-pre-commit

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

111,310 9,758
Explore
mattpocock/skills

migrate-to-shoehorn

Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

111,310 9,758
Explore
mattpocock/skills

edit-article

Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

111,310 9,758
Explore
mattpocock/skills

obsidian-vault

Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.

111,310 9,758
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results