Skip to contents

{ally} helps R users get the most out of AI coding tools. It is the companion package to Ally, a subscription product from R for the Rest of Us aimed at R users navigating the AI transition.

The first feature is skill installation: a simple, R-native way to install AI coding assistant skills without requiring npm or any non-R tooling.

Installation

# install.packages("pak")
pak::pak("rfortherestofus/ally")

Quick start

Paste the link to a skill’s SKILL.md straight from GitHub:

ally::install_skill(
  "https://github.com/posit-dev/skills/blob/main/r-lib/r-cli-app/SKILL.md"
)
#> ✔ Installed "r-cli-app" to .agents/skills/r-cli-app
#> ℹ Codex and other agents read .agents/skills/ directly.
#> ✔ Copied to "Claude Code" (.claude/skills)

The skill is installed in two places: .agents/skills/<skill>, which Codex and a growing number of agents read directly, and .claude/skills/<skill> for Claude Code. Nothing else to configure.

This project or every project

By default a skill is installed into the current working directory, so it travels with the project. Pass scope = "user" to install it into your home folder instead, where every project on the computer can use it:

ally::install_skill("posit-dev/skills/r-lib/r-cli-app", scope = "user")
#> ✔ Installed "r-cli-app" to ~/.agents/skills/r-cli-app
#> ℹ Every project on this computer can use skills in ~/.agents/skills/.
#> ✔ Copied to "Claude Code" (~/.claude/skills)

See what is installed

installed_skills() lists every skill an agent can load, in the project and in your home folder, whether {ally} installed it or not:

ally::installed_skills()
#> # A tibble: 3 × 10
#>   name  description installed_by installed_from installed           updated_on_github   edited scope
#>   <chr> <chr>       <chr>        <chr>          <dttm>              <dttm>              <lgl>  <chr>
#> 1 my-n… How I like… <NA>         <NA>           2026-09-23 12:14:57 NA                  NA     user
#> 2 quar… Use when t… ally         posit-dev/ski… 2026-09-23 12:14:56 2026-05-01 08:28:25 FALSE  user
#> 3 r-cl… Build comm… ally         posit-dev/ski… 2026-09-23 12:14:57 2026-04-20 13:43:24 FALSE  user
#> # ℹ 2 more variables: found_in <chr>, path <chr>

It shows what installed each skill, where from, when, when the skill last changed on GitHub, and whether you have edited it. Skills that were copied in by hand have no record of where they came from, so those columns are NA.

Your edits are safe

install_skill() records a fingerprint of each skill’s files. If you edit a skill, update_skill(), install_skill() and link_skills() stop rather than overwrite your changes, and tell you which files changed. Pass force = TRUE to overwrite them anyway.

Agent instructions

Each AI coding assistant reads its own instruction file, where you tell it how you like to work: CLAUDE.md for Claude Code, AGENTS.md for Codex and Posit Assistant, some in your home folder and some in the project. list_agent_instructions() shows which ones you have, and edit_agent_instructions() opens the one you pick in Positron or RStudio:

ally::list_agent_instructions()
#> ── Agent instructions ───────────────────────────────────────────
#>
#> ── User (all projects) ──
#>
#> 1: Claude Code                          ~/.claude/CLAUDE.md           24 lines
#> 2: Posit Assistant                      ~/.posit/assistant/AGENTS.md  not found
#>
#> ── Project (report) ──
#>
#> 3: Codex, Posit Assistant, Claude Code  AGENTS.md                     12 lines
#> 4: Claude Code                          CLAUDE.md                     not found

ally::edit_agent_instructions()          # pick from the numbered list
ally::edit_agent_instructions("claude")  # or name the agent

How it works

Path What it is
.agents/skills/<skill>/ The canonical copy. Codex and other agents read it directly.
.claude/skills/<skill>/ A second copy for Claude Code.

With scope = "user" the same two folders sit in your home directory.

Prefer a single set of files? Pass link = TRUE and {ally} puts a relative symlink at .claude/skills/<skill> pointing back to the canonical copy instead of a second copy. Where symlinks aren’t supported (typically Windows without developer mode) it falls back to copying and tells you so.

Skills are fetched from the repository’s zip archive on GitHub: a single download that needs no token and never counts against the GitHub API rate limit, so a room full of people on one network can install at once. Public repositories only.

Sources

# Full GitHub URL, pasted straight from the browser
install_skill(
  "https://github.com/posit-dev/skills/tree/main/posit-dev/critical-code-reviewer"
)
# URLs ending in /SKILL.md also work (the parent dir is used)
install_skill(
  "https://github.com/posit-dev/skills/blob/main/posit-dev/critical-code-reviewer/SKILL.md"
)
# A repository whose SKILL.md sits at the top level is named after the repository
install_skill("https://github.com/statzhero/tidy-r-skill")

# GitHub shorthand: owner/repo/path/to/skill[@ref]
install_skill("ab604/claude-code-r-skills/.claude/skills/r-style-guide")
install_skill("owner/repo/skills/my-skill@dev")

# Local path, handy for skill development
install_skill("~/my-skills/r-style-guide")

Other functions

installed_skills()                # every skill, with its source and dates
update_skill("r-style-guide")     # re-fetch from the original source
link_skills()                     # refresh the Claude Code copies
remove_skill("r-style-guide")     # delete canonical copy + Claude copy
supported_agents()                # introspect agents that get their own copy

Every one of these takes the same scope argument as install_skill(). installed_skills() looks in the project and your home folder unless you pick one.

Code of Conduct

Please note that the {ally} project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.