0.01
The project is in a healthy, maintained state
Load, validate, and integrate Agent Skills with RubyLLM. Supports the open Agent Skills specification for progressive skill discovery and loading from filesystem, zip archives, and databases.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 1.10
 Project Readme

RubyLLM::Skills

Agent Skills for RubyLLM. Teach your AI how to do things your way.

Gem Version CI Compound Engineered

Installation

gem "ruby_llm-skills"

Quick Start

chat = RubyLLM.chat
chat.with_skills
chat.ask "Create a PDF report from this data"

The LLM discovers skills, calls the skill tool, and gets instructions.

Usage

chat.with_skills                              # app/skills (default)
chat.with_skills("lib/skills")                # custom path
chat.with_skills("app/skills", "app/commands") # multiple paths
chat.with_skills("app/skills", user.skills)   # with database records

Creating Skills

app/skills/
└── pdf-report/
    ├── SKILL.md
    ├── scripts/
    └── references/

SKILL.md requires frontmatter:

---
name: pdf-report
description: Generate PDF reports. Use when asked to create reports or export to PDF.
---

# PDF Report Generator

Instructions here...

Slash Commands

Single-file skills work as commands:

app/commands/
├── write-poem.md
└── review-code.md
chat.with_skills("app/skills", "app/commands")
chat.ask "/write-poem about robots"

Database Skills

Store skills or commands in your database:

create_table :skills do |t|
  t.string :name, null: false
  t.text :description, null: false
  t.text :content, null: false  # SKILL.md body
  t.references :user
  t.timestamps
end

chat.with_skills(user.skills)
chat.ask "/my-command args"  # works as command too

Records must respond to #name, #description, and #content. For skills with scripts/references, use filesystem skills.

Rails

Default path auto-configured to Rails.root/app/skills.

rails generate skill pdf-report --description "Generate PDF reports"

Development

Setup

bin/setup

Running Tests

bundle exec rake test        # Unit tests (151 tests)
bundle exec rake test_rails  # Rails integration tests (25+ tests)
bundle exec rake test_all    # Both
bundle exec rake             # Tests + linting

Dummy Rails App

A minimal Rails 8 app at test/dummy/ tests Rails integration:

  • Filesystem skills: app/skills/greeting/ tests directory-based loading
  • Database skills: Skill model tests ActiveRecord-based loading
  • Generator tests: Tests for rails generate skill
  • Composite loading: Tests combining filesystem + database sources
cd test/dummy
bundle exec rails test  # Run Rails tests directly

Resources

License

MIT