Agent Skills

CI Gem Version License: MIT

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/

Installation

Add to your Gemfile:

gem 'agent_skills'

Or install directly:

gem install agent_skills

Quick Start

Create a skill

agent-skills new my-skill -d "Description of what this skill does"

Validate a skill

agent-skills validate ./my-skill

Package for distribution

agent-skills pack ./my-skill
# Creates: my-skill.skill

CLI Commands

Command Description
agent-skills new NAME -d DESC Create a new skill
agent-skills validate PATH Validate skill against spec
agent-skills list List discovered skills
agent-skills info PATH Show skill details
agent-skills pack PATH Package into .skill file
agent-skills 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')              # => "my-skill.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.

Resources