Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ Configure the other providers used by the examples as needed: Gemini for files,
Give your coding assistant the RubyLLM API and documentation that match your application. From your application directory, install the skill packaged with your gem:

```bash
gem exec skill add "$(bundle show ruby_llm)" --skill rubyllm --agent claude-code
gem exec skill add "$(bundle show ruby_llm)" --skill rubyllm --agents coding
```

Name your coding assistant with `--agent`: `claude-code`, `codex`, `cursor`, and more. See [AI Coding Assistants](https://rubyllm.com/ai-coding-assistants/) for setup and updates.
`--agents coding` installs it for the coding assistants your project uses, not into your app's `app/skills`. See [AI Coding Assistants](https://rubyllm.com/ai-coding-assistants/) for setup and updates.

## Documentation

Expand Down
8 changes: 6 additions & 2 deletions docs/_core_features/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,14 @@ The [`skill`](https://github.com/crmne/skill) gem does the copying for you. Run
```sh
gem exec skill find pdf # search skills.sh
gem exec skill add anthropics/skills --list # what a repository holds
gem exec skill add anthropics/skills@pdf --agent rubyllm # install one into app/skills
gem exec skill add anthropics/skills@pdf --agents ruby_llm # install one into app/skills
```

It reads GitHub repositories (`owner/repo`, `owner/repo@skill`, `owner/repo#tag`), plugin marketplaces, and local folders, and checks every `SKILL.md` with the same rules as `RubyLLM::Skill`. It records each skill's source and commit in `skills.lock` at the root of your application, so commit that file with the skills. `gem exec skill update` shows the commits and files that changed and applies them only after you say yes, and `gem exec skill list` names any skill you edited since. Without `--agent`, it installs into `app/skills` and into the folders of the coding agents your project uses, such as `.claude/skills`; `--agent rubyllm` keeps a skill for your application out of your coding agent's folders. Pass `--dir` to install into another root, such as `vendor/skills`.
Name a GitHub repository (`owner/repo`, `owner/repo@skill`, `owner/repo#tag`), a plugin marketplace, or a local folder. `skill` checks every `SKILL.md` with the same rules as `RubyLLM::Skill`.

Choose where a skill goes with `--agents`. Without it, `skill` installs into `app/skills` and into the folders of the coding agents your project uses, such as `.claude/skills`. Pass `--agents ruby_llm` for a skill your application uses, and `--agents coding` for one your coding agent uses. Pass `--dir` to install into another root, such as `vendor/skills`.

Commit `skills.lock` with the skills: it records each skill's source and commit. On a fresh clone, `gem exec skill install` installs what it records, at those commits. `gem exec skill update` shows the commits and files that changed and applies them only after you say yes. `gem exec skill list` names any skill you edited since you installed it.

A skill's instructions steer the model and its scripts run with what your sandbox grants, so review a skill written elsewhere like any other code you add to your project, and commit it so you see every change in a diff.

Expand Down
8 changes: 4 additions & 4 deletions docs/_getting_started/ai-coding-assistants.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ The RubyLLM gem includes an [Agent Skill](https://agentskills.io/) for building
From your application directory, install the skill packaged with your RubyLLM version with the [`skill`](https://github.com/crmne/skill) installer:

```bash
gem exec skill add "$(bundle show ruby_llm)" --skill rubyllm --agent claude-code
gem exec skill add "$(bundle show ruby_llm)" --skill rubyllm --agents coding
```

`--agent` names your coding assistant: `claude-code`, `codex`, `cursor`, `gemini-cli`, `github-copilot`, or several separated by commas. `gem exec skill agents` lists them all. Name it rather than letting `skill` detect it, so the skill goes only to your coding assistant: in a RubyLLM application `skill` also installs into `app/skills`, where your own chats would load it. Installing from the gem keeps the skill aligned with the version in your bundle. `gem exec` needs RubyGems 3.5 or newer; with an older RubyGems, run `gem install skill` once and use `skill add`.
`--agents coding` installs the skill for every coding assistant your project shows signs of, such as Claude Code (`.claude`), Codex (`AGENTS.md`), or Cursor (`.cursor`), and never into `app/skills`, where your own chats would load it. Without it, `skill` installs into `app/skills` too. To name assistants instead, pass them separated by commas, like `--agents claude-code,cursor`; `gem exec skill agents` lists them all. `--agents` needs `skill` 0.2 or newer, which `gem exec` fetches. Installing from the gem keeps the skill aligned with the version in your bundle. `gem exec` needs RubyGems 3.5 or newer; with an older RubyGems, run `gem install skill` once and use `skill add`.

You can also install the skill from the repository:

```bash
gem exec skill add crmne/ruby_llm@rubyllm --agent claude-code
gem exec skill add crmne/ruby_llm@rubyllm --agents coding
```

The repository version follows RubyLLM development. For an application pinned to a released version, prefer the skill packaged with that gem, or name the tag of your version, like `crmne/ruby_llm#v2.1.1@rubyllm`. `skill` records the source and commit in `skills.lock`. To install without the installer, copy the gem's `skills/rubyllm` directory into the skill directory supported by your coding assistant.
Expand All @@ -49,7 +49,7 @@ The skill asks the assistant to check your installed version and consult the rel
After updating RubyLLM, install the skill from your new version, with `--force`:

```bash
gem exec skill add "$(bundle show ruby_llm)" --skill rubyllm --agent claude-code --force
gem exec skill add "$(bundle show ruby_llm)" --skill rubyllm --agents coding --force
```

The gem's folder changes with its version, and `skill` replaces a skill installed from another folder, or one you edited since, only with `--force`. Keep your own conventions in your project's instructions rather than in the skill, so nothing is lost. If you installed from the repository's `main`, `gem exec skill update` shows what changed and asks before applying it. Review skill updates alongside dependency updates.
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -640,14 +640,14 @@ SupportAgent.find(chat_id).ask "Where's my refund?"
<div class="home-skill-install home-code-grid home-code-grid--bare" markdown="1">

```sh
gem exec skill add "$(bundle show ruby_llm)" --skill rubyllm --agent claude-code
gem exec skill add "$(bundle show ruby_llm)" --skill rubyllm --agents coding
```
{: .home-code-card }

</div>

<p class="home-small-note">
Run this from your application after installing RubyLLM. Name your coding assistant with <code>--agent</code>: <code>claude-code</code>, <code>codex</code>, <code>cursor</code>, and more.
Run this from your application after installing RubyLLM. <code>--agents coding</code> installs it for the coding assistants your project uses, and keeps it out of your app's <code>app/skills</code>.
<a href="{% link _getting_started/ai-coding-assistants.md %}">Skill setup and updates</a>
</p>
</div>
Expand Down
Loading