Broccolito

Gptr — AI skill for Claude Code

AI community

R-native AI agent harness for scientific computing: LLM agents in your live R session with Claude, OpenAI, Gemini, Ollama, Claude Code or Codex; typed decisions, runnable records and MCP.

How to install Gptr

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

What Gptr does

R-native AI agent harness for scientific computing: LLM agents in your live R session with Claude, OpenAI, Gemini, Ollama, Claude Code or Codex; typed decisions, runnable records and MCP.

Alternatives in AI

  • FreeHand — Freehand is an agent harness that leaves the decisions to the model: a ~200-word prompt, one bash tool, a cont 811 ★
  • Ovo Local LLM — A private Claude-Code-style coding agent for Apple Silicon — run chat, code, and local model workflows on-devi 105 ★
  • Brenner Bot — Harness the scientific methods of Sydney Brenner using AI Agents 77 ★

README

gptr gptr logo

gptr runs large language model (LLM) agents in your current R session, with Claude, OpenAI, Gemini, local Ollama models or a Claude Code or Codex login. Agents can analyze objects already in memory and create R objects that you can inspect, reuse or modify.

  • Work with live R objects. Continue an analysis across prompts using the same data and intermediate results.
  • Use agents or typed decisions. Conversational models return an agent session; decision models return R vectors of logical answers, labels or scores.
  • Keep a record you can rerun. Record agent calls and their executed R code alongside your analysis, then replay the code with the required inputs and packages.
  • Improve the agent on your own task. Models revise the agent's instructions from runs of your task; gptr keeps only revisions that pass its checks and any of yours, round after round.

Installation

gptr is on CRAN. It requires R 4.2 or later and has no compiled code.

install.packages("gptr")

The development version on GitHub gets fixes and features before they reach CRAN:

if (!requireNamespace("pak", quietly = TRUE)) install.packages("pak")
pak::pak("Broccolito/gptr")

This README describes gptr 1.3.2; `packageVersion("gptr")` shows yours. After installation, load the package:

library(gptr)

Connect a model

Choose one of the following routes before running the analysis examples.

**API key.** Put your provider's key in a private `.env` file. For example, the Anthropic route needs `ANTHROPIC_API_KEY`:

gptr_env("~/keys/.env")