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
npx claudepluginhub arthurgailes/r-package-skills --plugin r-package-skillsThis skill uses the workspace's default tool permissions.
**btw connects R's context to LLMs.** Provides tools that describe R objects, fetch documentation, and expose R information to chat sessions.
Use 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 style guide covering naming conventions, spacing, layout, and function design best practices. Use when writing R code.
Share bugs, ideas, or general feedback.
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