---
title: "Author a Skill for your Ruby gem · skilld"
description: "Draft a Skill for your Ruby API, include its files in the gemspec, and inspect the gem before publishing."
canonical_url: "https://skilld.dev/learn/author-ruby-package-skills"
last_updated: "2026-09-08T05:45:32.742Z"
meta:
  "og:description": "Draft a Skill for your Ruby API, include its files in the gemspec, and inspect the gem before publishing."
  "og:image": "https://skilld.dev/_og/d/a_~c2tpbGxkLCBhZ2VudCBza2lsbHMgd3JpdHRlbiBieSByZWFsIG1haW50YWluZXJz%2Cc_Page.takumi%2Cdescription_~Q3VyYXRlZCBhZ2VudCBza2lsbHMgYnkgaHVtYW5zLCB3cml0dGVuIGJ5IHJlYWwgbWFpbnRhaW5lcnMgaW4gdGhlaXIgb3duIEdpdEh1YiByZXBvcw%2Cp_Ii9sZWFybi9hdXRob3ItcnVieS1wYWNrYWdlLXNraWxscyI%2Cs_J8Go7sr6rAK8ldgI.png"
  "og:image:alt": "skilld, agent skills written by real maintainers"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Author a Skill for your Ruby gem"
  "twitter:image": "https://skilld.dev/_og/d/a_~c2tpbGxkLCBhZ2VudCBza2lsbHMgd3JpdHRlbiBieSByZWFsIG1haW50YWluZXJz%2Cc_Page.takumi%2Cdescription_~Q3VyYXRlZCBhZ2VudCBza2lsbHMgYnkgaHVtYW5zLCB3cml0dGVuIGJ5IHJlYWwgbWFpbnRhaW5lcnMgaW4gdGhlaXIgb3duIEdpdEh1YiByZXBvcw%2Cp_Ii9sZWFybi9hdXRob3ItcnVieS1wYWNrYWdlLXNraWxscyI%2Cs_J8Go7sr6rAK8ldgI.png"
  "twitter:image:alt": "skilld, agent skills written by real maintainers"
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

# **Author a Skill for your Ruby gem**

Draft a Skill for your Ruby API, include its files in the gemspec, and inspect the gem before publishing.

Authoring guide

## 1. Draft your Skill

RubyGems

[Choose your package](https://skilld.dev/make-skill?ecosystem=rubygems)

Open your agent in the package repository. Give it these instructions to draft your Skill.

[Read the authoring Skill](https://raw.githubusercontent.com/skilld-dev/skilld/main/skills/generate-package-skill/SKILL.md)

Read https://raw.githubusercontent.com/skilld-dev/skilld/main/skills/generate-package-skill/SKILL.md. Draft a Skill for the package I maintain, published through RubyGems, using this repository. Read .gemspec, the public API, and the current official documentation. Show the draft for review before replacing existing Skills.

Point your agent at the gem repository and its `**.gemspec**` file. Ask it to save the draft in `**skills/your-skill/SKILL.md**`.

Cover public require paths, supported Ruby versions, dependencies, and configuration. If the gem integrates with Rails, state supported Rails versions and initialization steps.

## 2. Review the draft

Run the examples using your gem's supported Ruby versions. Use [**the cross-Agent selection and task checks**](https://skilld.dev/learn/create-agent-skills#check-selection-and-task-completion-separately) before publishing the Skill. Check require paths and public method names against the release you plan to publish. Remove generic Ruby advice and cite package documentation for version limits. Review the draft before committing it.

## 3. Include the Skill in your gemspec

Check the `**files**` list in your `**.gemspec**`. Add the Skill directory and every linked local file to the existing release files. For a gemspec that uses Git to build this list, ensure Git tracks the new files. The [**RubyGems specification reference**](https://guides.rubygems.org/specification-reference/#files) explains this list.

Build the gem from the package directory:

```bash
gem build your_gem.gemspec
```

Inspect the file list in the built gem:

```bash
gem specification your_gem-1.0.0.gem files
```

Replace the example names with your gemspec and build output. Confirm the list includes `**skills/your-skill/SKILL.md**` and its references. See the [**gem build**](https://guides.rubygems.org/command-reference/#gem-build) and [**gem specification**](https://guides.rubygems.org/command-reference/#gem-specification) references.

## 4. Publish and share

Commit the reviewed Skill and publish through your normal RubyGems release process. Link to its repository directory from the gem README. Installing the gem does not automatically install the Skill into an agent. Review the Skill when public methods, dependencies, or supported Ruby versions change.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://skilld.dev/#website","@type":"WebSite","description":"Curated agent skills by humans, written by real maintainers in their own GitHub repos","name":"skilld","url":"https://skilld.dev/"},{"@id":"https://skilld.dev/learn/author-ruby-package-skills#webpage","@type":"WebPage","description":"Draft a Skill for your Ruby API, include its files in the gemspec, and inspect the gem before publishing.","name":"Author a Skill for your Ruby gem","url":"https://skilld.dev/learn/author-ruby-package-skills","isPartOf":{"@id":"https://skilld.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://skilld.dev/learn/author-ruby-package-skills"]}]}]}
```