Agent Skills
Ruby implementation of the Agent Skills open standard — a simple format for giving AI agents new capabilities.
What are Agent Skills?
Agent Skills are portable folders of instructions that AI agents can load to perform specialized tasks. The format is supported by Claude, GitHub Copilot, Cursor, VS Code, and 26+ other tools.
my-skill/
├── SKILL.md # Instructions for the agent (required)
├── scripts/ # Executable code (optional)
├── references/ # Supporting docs (optional)
└── assets/ # Templates, data files (optional)
Installation
Add to your Gemfile:
Or install directly:
Quick Start
# Create a new skill agent-skills new my-skill -d "Description of what this skill does" # Validate against spec agent-skills validate ./my-skill # Package for distribution agent-skills pack ./my-skill
CLI Commands
| Command | Description |
|---|---|
new NAME -d DESC |
Create a new skill |
validate PATH |
Validate skill against spec |
list |
List discovered skills |
info PATH |
Show skill details |
pack PATH |
Package into .skill file |
unpack FILE |
Extract a .skill file |
Ruby API
require 'agent_skills' # Load and parse a skill skill = AgentSkills::Skill.load('./my-skill') skill.name # => "my-skill" skill.description # => "What it does..." # Validate against spec validator = AgentSkills::Validator.new(skill) validator.valid? # => true validator.errors # => [] # Discover skills from paths loader = AgentSkills::Loader.new(paths: ['./skills']) loader.discover loader['my-skill'] # => #<AgentSkills::Skill> # Generate prompt XML for LLM injection skill.to_prompt_xml # => "<skill name=\"my-skill\"><description>...</description>...</skill>" # Create a new skill programmatically AgentSkills::Generator.create( path: './skills', name: 'my-skill', description: 'What this skill does' ) # Package and distribute AgentSkills::Packager.pack('./my-skill') AgentSkills::Packager.unpack('my-skill.skill', output: './extracted')
SKILL.md Format
--- name: my-skill description: What this skill does and when to use it. license: MIT # optional compatibility: Requires Python 3.x # optional --- # My Skill Instructions for the agent go here...
See the full specification for details.
Development
git clone https://github.com/rubyonai/agent_skills.git cd agent_skills bundle install bundle exec rspec
Contributing
Bug reports and pull requests are welcome on GitHub.
License
MIT License. See LICENSE for details.