/r-package-skills:r-aifrom r-package-skills
Meta-skill for navigating the R AI ecosystem: ellmer (LLM chat), btw (R context for LLMs), mcptools (agent access to R), ragnar (RAG), vitals (LLM output testing). Helps choose the right package.
Ships in r-package-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This is a meta-skill that helps you choose the right R AI package. The R AI stack consists of 5 specialized packages, each with its own skill.
Install all: install.packages(c("ellmer", "btw", "mcptools", "ragnar", "vitals"))
API keys: Set OPENAI_API_KEY or ANTHROPIC_API_KEY in .Renviron
references/integration-patterns.md - How packages work together in workflowsFor per-package API docs, invoke the corresponding package skill (/r-ellmer, /r-btw, /r-mcptools, /r-ragnar, /r-vitals).
| Package | Use When | Skill |
|---|---|---|
| ellmer | Chat with any LLM from R | /r-ellmer |
| btw | Provide R context (docs, data) to LLMs | /r-btw |
| mcptools | Let agents (Claude Code) run R code | /r-mcptools |
| ragnar | LLM searches your documents (RAG) | /r-ragnar |
| vitals | Test LLM output quality | /r-vitals |
Navigation: When you know which package you need, invoke the specific skill above.
btw vs mcptools:
ellmer vs ragnar:
library(ellmer)
library(btw)
chat <- chat_openai()
chat$set_tools(btw_tools())
library(ellmer)
library(ragnar)
chat <- chat_openai()
ragnar_register_tool_retrieve(chat, store)
library(mcptools)
mcp_session() # In console, each startup
# Now Claude Code can run R code
library(ellmer)
chat <- chat_ollama(model = "llama3.2")
library(ragnar)
store <- ragnar_store_create("local.duckdb",
embed = ragnar_embed_ollama(model = "nomic-embed-text"))
library(vitals)
library(ellmer)
library(ragnar)
chat <- chat_openai()
ragnar_register_tool_retrieve(chat, store)
task <- Task$new(
dataset = test_cases,
solver = function(input) chat$chat(input, echo = "none"),
scorer = model_graded_qa()
)
task$run()
See references/ for:
For package-specific documentation, invoke the individual package skills above.
What SKILL.md sets; muted values are Claude Code's defaults
14 skills in this plugin
/r-btwUse when code loads or uses btw (library(btw), btw::), providing R session context to LLMs, registering tools for ellmer chat, or copying R object descriptions to clipboard/r-collapseUse when code loads or uses collapse (library(collapse), collapse::), performing fast grouped or weighted statistics in R, or seeking faster alternatives to dplyr aggregation/r-duckplyrUse when code loads or uses duckplyr (library(duckplyr), duckplyr::), processing large datasets with dplyr syntax, working with Parquet files in R, or needing lazy evaluation for bigger-than-memory data/r-duckspatialUse when code loads or uses duckspatial (library(duckspatial), duckspatial::), performing spatial joins or areal interpolation on large vector datasets in R, or needing faster spatial operations than sf/r-ellmerUse when code loads or uses ellmer (library(ellmer), chat_openai, chat_claude, chat_ollama), chatting with LLMs from R, building chatbots, or extracting structured data from text with LLMs/r-flextableUse when code loads or uses flextable (library(flextable), flextable::), creating formatted tables for Word (.docx), PowerPoint (.pptx), HTML, or PDF in R, or needing merged cells and conditional formattingnpx claudepluginhub arthurgailes/r-package-skills --plugin r-package-skillsOther plugins' skills for the same job