ruby_llm-skills
CLAUDE.md38 starsChanged 10 months agoMITView on GitHub
RubyLLM::Skills is a Ruby gem that implements the Agent Skills specification for RubyLLM. It enables progressive disclosure of AI capabilities through a three-level pattern: metadata (~100 tokens), full instructions (SKILL.md), and on-demand resources (scripts, references, assets). The gem uses the RubyLLM::Skills namespace (matches the parent ruby_llm gem): Progressive Disclosure: Skills load in three stages to minimize context usage: 1. Metadata (name + description) - loaded at startup, injected into system prompt 2. Full instructions (SKILL.md) - loaded when LLM determines…
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 81
All files use frozen_string_literal: true
- Distinctive: line 127
No external runtime dependencies - intentionally lightweight.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
RubyLLM::Skills is a Ruby gem that implements the Agent Skills specification for RubyLLM. It enables progressive disclosure of AI capabilities through a three-level pattern: metadata (~100 tokens), full instructions (SKILL.md), and on-demand resources (scripts, references, assets).
Development Commands
Setup
bin/setup # Install dependencies and prepare development environmentTesting
bundle exec rake test # Run all tests using Minitest
bundle exec rake # Run default task: tests + lintingLinting
bundle exec rake standard # Run StandardRB linter
bundle exec standardrb --fix # Auto-fix linting issuesConsole
bin/console # Start IRB console with gem loadedGem Tasks
bundle exec rake build # Build gem to pkg/
bundle exec rake install # Build and install gem locally
bundle exec rake release # Build, tag, and push gem (requires credentials)Architecture
Module Structure
The gem uses the RubyLLM::Skills namespace (matches the parent ruby_llm gem):
lib/ruby_llm/
├── skills.rb # Main module entry point
└── skills/
└── version.rb # Gem version constantKey Design Patterns
Progressive Disclosure: Skills load in three stages to minimize context usage:
- Metadata (name + description) - loaded at startup, injected into system prompt
- Full instructions (SKILL.md) - loaded when LLM determines skill is relevant
- Resources (scripts, references, assets) - loaded on demand during execution
Multi-Source Loading: Skills can be loaded from:
- Filesystem directories (default:
app/skills) - Zip archives (for distribution)
- ActiveRecord models (for per-user customization)
- Multiple sources simultaneously (later sources override earlier ones)
Storage Format Detection: The gem auto-detects source types:
- Strings ending in
/or valid directories → Filesystem - Strings ending in
.zip→ Zip file - ActiveRecord relations or object arrays → Database
- Database records detect format by field:
content(text) vsdata(binary/zip)
Testing
Uses Minitest framework. Test structure:
test/test_helper.rb- Test configuration and setuptest/ruby_llm/test_skills.rb- Main test suite
Code Style
- Uses StandardRB for linting (Ruby 3.1+ compatible)
- All files use
frozen_string_literal: true - Module naming:
RubyLLM(uppercase 'LLM' to match parent gem)
CI/CD
GitHub Actions workflow (.github/workflows/main.yml):
- Runs on: push to main, all PRs
- Ruby version: 3.4.2
- Tasks:
bundle exec rake(runs tests + linting)
Gemspec Notes
The gemspec currently has TODO placeholders that need completion before publishing:
spec.summary- Add short descriptionspec.description- Add longer descriptionspec.homepage- Add gem website/repo URLspec.metadata["allowed_push_host"]- Set gem serverspec.metadata["source_code_uri"]- Add repo URLspec.metadata["changelog_uri"]- Add changelog URL
Skill Structure
Skills follow a convention-based directory structure:
skill-name/
├── SKILL.md # Required: YAML frontmatter + markdown instructions
├── scripts/ # Optional: executable code
├── references/ # Optional: additional documentation
└── assets/ # Optional: templates, imagesRequired YAML frontmatter fields:
name(lowercase, hyphens only, max 64 chars)description(what it does AND when to use it, max 1024 chars)
Optional frontmatter: license, compatibility, custom metadata
Dependencies
Minimal dependencies by design. Only requires:
- Ruby >= 3.1.0
- Bundler (for gem development)
- Minitest (for testing)
- StandardRB (for linting)
No external runtime dependencies - intentionally lightweight.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

