Btw banner
posit-dev posit-dev

Btw

Development community

Description

A complete toolkit for connecting R and LLMs

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

btw btw website

A complete toolkit for connecting R and LLMs

[![CRAN status](https://www.r-pkg.org/badges/version/btw)](https://CRAN.R-project.org/package=btw) [![R-universe version](https://posit-dev.r-universe.dev/btw/badges/version)](https://posit-dev.r-universe.dev/btw) [![R-CMD-check](https://github.com/posit-dev/btw/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/posit-dev/btw/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/posit-dev/btw/graph/badge.svg)](https://app.codecov.io/gh/posit-dev/btw)

Overview

btw helps R users work with Large Language Models, whether you’re pasting context into ChatGPT, chatting with an AI assistant in your IDE, or building LLM-powered applications.

The challenge: LLMs need context about your R environment to be helpful—your data structures, the packages you’re using, relevant documentation.

btw provides a flexible toolkit that works across different workflows:

  • Copy-paste to external LLMs: Quickly gather context from your R session and copy it to your clipboard for pasting into ChatGPT, Claude, or any other chat interface.
  • Interactive chat in R: Launch a full-featured AI assistant directly in your IDE that can explore your environment, read documentation, and help you write code.
  • Build LLM-powered tools: Integrate btw’s capabilities into your own applications, whether you’re creating custom chat interfaces or connecting R to coding agents.

Quick Start

Copy-paste workflow

Use `btw()` to gather context from your R session and copy it to your clipboard:

library(btw)

# Describe a data frame
btw(mtcars)

# Include package or function documentation
btw("{dplyr}", ?dplyr::across)

# Combine multi