reticulate

reticulate is a skill for Claude Code, Codex from LeoLin990405/r-analytics-skill. It costs 28 tokens per session (1,107 once invoked), scanned A, original, MIT.

An R interface to Python, a general-purpose programming language with libraries such as NumPy, pandas, and scikit-learn. It can run Python code and convert data between the two languages.

In plain words
What is it for?
Use it to choose a Python environment, import modules, run scripts or functions, and exchange data between R and Python.
Why use it?
It allows an R project to use Python packages without moving the whole project to Python.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to choose a Python environment, import modules, run scripts or functions, and exchange data between R and Python.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leolin990405/r-analytics-skill/reticulate
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LeoLin990405/r-analytics-skill --skill reticulate
Clone the repo
git clone --depth 1 https://github.com/LeoLin990405/r-analytics-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for reticulate

README.md
[![agentmods](https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/reticulate/github.svg)](https://agentmods.dev/skills/leolin990405/r-analytics-skill/reticulate)
Your own site
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/reticulate"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/reticulate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for reticulate

Your own site · 80×15
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/reticulate"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/reticulate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,107 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.01107
Opus 5 $0.00014 $0.00553
Sonnet 5 $0.00006 $0.00221
Haiku 4.5 $0.00003 $0.00111

Measured 7d ago against content hash 92a328231303, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

reticulate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

sub-skills/r-language-api/reticulate/SKILL.md · 232 lines

How it starts

The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.

reticulate

R interface to Python.

Setup

library(reticulate)

# Use specific Python
use_python("/usr/bin/python3")
use_virtualenv("myenv")
use_condaenv("myenv")

# Check configuration
py_config()
py_available()

Import Modules

# Import Python modules
np <- import("numpy")
pd <- import("pandas")
sklearn <- import("sklearn")

# Import with conversion disabled
np <- import("numpy", convert = FALSE)

# Import submodules
preprocessing <- import("sklearn.preprocessing")

Call Python

# Run Python code
py_run_string("x = 1 + 1")
py_run_file("script.py")

# Access Python objects
py$x
py$my_function(arg1, arg2)

# Execute in main module
py_run_string("
import pandas as pd
df = pd.DataFrame({'a': [1,2,3]})
")
py$df

Data Conversion

# R to Python
py_df <- r_to_py(mtcars)

# Python to R
r_df <- py_to_r(py$df)

# Automatic conversion (default)
np$array(c(1, 2, 3))  # Returns R vector

# Disable conversion
np <- import("numpy", convert = FALSE)
arr <- np$array(c(1, 2, 3))  # Returns Python object
py_to_r(arr)  # Explicit conversion

NumPy Integration

np <- import("numpy")

# Create arrays
arr <- np$array(matrix(1:9, 3, 3))
arr <- np$zeros(c(3L, 3L))
arr <- np$ones(c(3L, 3L))

# Array operations
np$sum(arr)
np$mean(arr)
np$dot(arr, arr)

# Convert to R
as.matrix(arr)

Pandas Integration

pd <- import("pandas")

# Create DataFrame
py_df <- pd$DataFrame(list(
  a = 1:3,
  b = c("x", "y", "z")
))

# Read files
py_df <- pd$read_csv("data.csv")
py_df <- pd$read_excel("data.xlsx")

# Convert to R
r_df <- py_to_r(py_df)

# R data frame to pandas
py_df <- r_to_py(mtcars)

Scikit-learn

sklearn <- import("sklearn")
preprocessing <- import("sklearn.preprocessing")
model_selection <- import("sklearn.model_selection")

# Preprocessing
scaler <- preprocessing$StandardScaler()
X_scaled <- scaler$fit_transform(X)

# Train/test split
split <- model_selection$train_test_split(X, y, test_size = 0.2)
X_train <- split[[1]]
X_test <- split[[2]]

# Models
linear_model <- import("sklearn.linear_model")
model <- linear_model$LogisticRegression()
model$fit(X_train, y_train)
predictions <- model$predict(X_test)

Read the full file on GitHub · 232 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 232 lines · 28 tokens per session scan A 92a328231303

Subscribe to this mod's changes

reticulate is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 28 tokens to every session and 1,107 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fused-overview

Orientation to what Fused is and when to use it. Use when deciding whether to use Fused for a task, planning a new Fused project, or understanding Fused's capabilities as a remote Python execution platform.

fusedio/skills · 49 tokens

algo-avl-trees

Implement a self-balancing AVL binary search tree in Python with rotation-based rebalancing (LL/RR/LR/RL) guaranteeing O(log n) insert/delete/search. Use when a user asks to build/implement an AVL tree, keep a sorted index balanced under insert/delete, explain balance factor or tree rotations, or avoid O(n)…

Pavel-Kravchenko/Bioinformatics · 97 tokens

algo-hash-tables-bloom

Implement Python hash tables (chaining, open addressing, rehashing) and Bloom filters for set membership. Use when building a hash table from scratch, resolving hash collisions, sizing a Bloom filter, or checking k-mer/key set membership under memory limits.

Pavel-Kravchenko/Bioinformatics · 59 tokens

bio-applied-bio-data-formats

Parse/write FASTA, FASTQ, SAM/BAM, VCF, BED, GFF/GTF with pysam and pure Python; decode SAM FLAG/CIGAR; reconcile 0-based vs 1-based coordinates. Use for custom format parsers or off-by-one coordinate bugs.

Pavel-Kravchenko/Bioinformatics · 67 tokens

python-advanced-sql

Write Python decorators/context managers/dataclasses and query gene/variant tables with sqlite3/pandas SQL (JOIN, GROUP BY, HAVING). Use for retry/caching/validation wrappers or SQL against Ensembl/UCSC-style schemas.

Pavel-Kravchenko/Bioinformatics · 52 tokens

python-bio-classes

Build Python classes for Gene/DNA/RNA/Protein records with eq/lt/hash, @property validation, ABCs, and @classmethod parsers (fromfastastring). Use when modeling genes/FASTA/GFF as objects or asked about Python OOP, inheritance, dataclasses.

Pavel-Kravchenko/Bioinformatics · 69 tokens