From r-package-skills
Use 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
How this skill is triggered — by the user, by Claude, or both
Slash command
/r-package-skills:r-btwThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**btw connects R's context to LLMs.** Provides tools that describe R objects, fetch documentation, and expose R information to chat sessions.
btw connects R's context to LLMs. Provides tools that describe R objects, fetch documentation, and expose R information to chat sessions.
btw vs mcptools: btw gives tools TO ellmer (R → LLM). mcptools lets agents INTO R (LLM → R).
Install: install.packages("btw")
Read references/API.md before writing code.
references/API.md - Complete function referencereferences/package-docs.md - Tool registration and usage patternsprint() or str())library(btw)
# Copy description to clipboard
btw(mtcars) # Describe data frame
btw("ggplot2") # Package documentation
btw_this(model) # For LLM consumption
# Register tools with ellmer
library(ellmer)
chat <- chat_openai()
chat$set_tools(btw_tools())
# Now chat can call R documentation
chat$chat("What functions does dplyr have?")
# Project context
use_btw_md() # Create btw.md
edit_btw_md() # Edit context file
| Issue | Solution |
|---|---|
| btw vs mcptools confusion | btw = tools TO chat; mcptools = agent INTO R |
| Tools not registered | Must call chat$set_tools(btw_tools()) |
| Using in scripts vs console | btw() for clipboard works in console |
| Expecting code execution | btw describes, doesn't execute (use mcptools) |
Description:
btw(): Generate plain-text descriptions (copies to clipboard)btw_this(): Create LLM-optimized descriptionsIntegration:
btw_tools(): Register with ellmerbtw_client(): btw-enhanced ellmer chatbtw_app(): btw-enhanced ellmer appProject Context:
use_btw_md(): Create project context fileedit_btw_md(): Modify context fileSkills:
btw_agent_tool(): Create agent tool from markdown filebtw_task_create_skill(): Create a new skill via taskbtw_skill_install_github(): Install skill from GitHubbtw_skill_install_package(): Install skill from R packageSee references/ for:
With ellmer: chat$set_tools(btw_tools())
Cross-package patterns: See r-ai meta-skill
npx claudepluginhub arthurgailes/r-package-skills --plugin r-package-skillsUse 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
Modern R operations for data analysis, statistics, and reproducible work. Use for: R, Rstats, tidyverse, dplyr, tidyr, ggplot2, the native pipe |>, tibbles, data wrangling (filter/mutate/summarise/group_by/across/joins/pivot), reading and writing data (readr, readxl, arrow/Parquet, DBI/dbplyr databases, data.table::fread, rvest scraping), strings (stringr) and regex, dates/times (lubridate), factors (forcats), iteration and functional programming (purrr map family, list-columns), statistics and modeling (t.test/lm/glm, formulas, broom, tidymodels), high-performance data.table, time series (tsibble/fable, zoo/xts), and project workflow (renv, Quarto, here, testthat, styler, RStudio/Posit Projects). Covers tidyverse-first idioms with base R and data.table as named alternatives.
Writes roxygen2 documentation for R package functions, datasets, and classes. Covers all standard tags, cross-references, examples, and NAMESPACE entries. Use when documenting new exports, internal helpers, S3/S4/R6 classes, or fixing R CMD check notes.