r-session
Skill0 starsChanged 45 days agoMITView on GitHub
Work with the user's live R session in RStudio through the r-session MCP server (Posit's btw package) - inspect data frames and objects in memory, read help pages of installed packages, check session info and CRAN. Use when the user mentions "mes données", "ma session R", "l'objet X", a data frame by name, an R package, or asks for analysis on data already loaded in RStudio.
- Reads credentials
In this repository24 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analystSkill
- build-appSkill
- build-websiteSkill
- business-setupSkill
- content-pipelineSkill
- content-writerSkill
- email-assistantSkill
- email-digestSkill
- ksuite-setupSkill
- meeting-prepSkill
- memorySkill
- odooSkill
- plugin-builderSkill
- qfieldcloudSkill
- qgisSkill
- quarto-slidesSkill
- research-leadSkill
- researchSkill
- schedulerSkill
- scrum-masterSkill
- skill-creatorSkill
- task-managerSkill
- weekly-reviewSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
If several R sessions are open, use the session-selection tools the server offers and confirm with the user which one to use.
- Very specific: line 33
Default: docs, pkg, env, sessioninfo, cran (read-only, no code execution in the session).
- Distinctive: line 40
Never print large objects: summarize (dimensions, column types, a few rows).
- Very specific: line 42
Prefer writing a script in R/ or a .qmd the user runs themselves.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Live R session (RStudio)
The r-session MCP server runs btw::btw_mcp_server() (Posit, CRAN). It connects to the
interactive RStudio session that called btw::btw_mcp_session() (done automatically by the
project .Rprofile when AIGORA_R_MCP=1). Its tools are prefixed mcp__r-session__.
When to use it
- The user refers to an object that lives in their R session ("le data frame
ventes", "mon modèle", "ce que j'ai chargé") -> describe it with the env tools before writing code. - Questions about a package or function -> read the installed help page (docs tools), so the answer matches the version the user has, not memory.
- Writing code for the user -> check
sessioninfo(R version, loaded packages) first.
Setup (if the tools are missing)
aigora_verifier()in the R console: the "Paquet R btw" line must be "ok". Otherwise:aigora_installer_r_mcp()(installs btw + mcptools from CRAN).aigora_r_mcp(TRUE): writesAIGORA_R_MCP=1to.env, makes the session visible, registers the server in Claude Code (scope local).- Restart Claude Code in the Terminal (
/exit, thenclaude). - If several R sessions are open, use the session-selection tools the server offers and confirm with the user which one to use.
Tool groups
Default: docs, pkg, env, sessioninfo, cran (read-only, no code execution in the session).
AIGORA_R_MCP_TOOLS in .env changes the list. Adding run lets you execute R code inside
the user's live session (it can modify or delete their objects): propose it only if the user
asks, explain the risk, and re-register with aigora_mcp(simulation = FALSE).
Rules
- Never print large objects: summarize (dimensions, column types, a few rows).
- Data can be personal or confidential: do not copy it into memory files, logs or kChat.
- Prefer writing a script in
R/or a.qmdthe user runs themselves; withrun, show the code and get a yes before executing anything that changes the session. - Without the MCP server you can still run
Rscriptin the terminal, but that is a separate, empty session: say so if the user expects their in-memory objects.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

