learnr

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

A framework for creating interactive tutorials for R, a programming language often used for statistics and data analysis. Tutorials run as web pages using Shiny, R's web-application system.

In plain words
What is it for?
Use it to build and run browser-based R courses, exercises, and practice tutorials.
Why use it?
It turns lessons into guided exercises with starter code, hints, solutions, and checks.

Skill for Claude CodeCodex

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

Good fit Use it to build and run browser-based R courses, exercises, and practice tutorials.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leolin990405/r-analytics-skill/learnr
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 learnr
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 learnr

README.md
[![agentmods](https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/learnr/github.svg)](https://agentmods.dev/skills/leolin990405/r-analytics-skill/learnr)
Your own site
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/learnr"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/learnr/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 learnr

Your own site · 80×15
<a href="https://agentmods.dev/skills/leolin990405/r-analytics-skill/learnr"><img src="https://agentmods.dev/badge/skills/leolin990405/r-analytics-skill/learnr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 881 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.00021 $0.00881
Opus 5 $0.00010 $0.00441
Sonnet 5 $0.00004 $0.00176
Haiku 4.5 $0.00002 $0.00088

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

Security

Grade A, and why

learnr 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-learning/learnr/SKILL.md · 206 lines

How it starts

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

learnr

Interactive tutorials with Shiny.

Running Tutorials

library(learnr)

# Run built-in tutorial
run_tutorial("hello", package = "learnr")

# Run from package
run_tutorial("tutorial_name", package = "package_name")

# List available tutorials
available_tutorials()
available_tutorials("package_name")

Creating Tutorials

# Create new tutorial (in RStudio)
# File > New File > R Markdown > From Template > Interactive Tutorial

# Or manually create .Rmd file with:
# output: learnr::tutorial

Tutorial Structure

---
title: "My Tutorial"
output: learnr::tutorial
runtime: shiny_prerendered
---

```{r setup, include=FALSE}
library(learnr)
knitr::opts_chunk$set(echo = FALSE)
```

## Topic 1

### Exercise

Write code to create a vector:

```{r vector, exercise=TRUE}

```

```{r vector-hint}
# Use c() or :
```

```{r vector-solution}
c(1, 2, 3, 4, 5)
```

Exercise Chunks

```{r exercise-name, exercise=TRUE}
# Starter code here
```

```{r exercise-name-hint-1}
# First hint
```

```{r exercise-name-hint-2}
# Second hint
```

```{r exercise-name-solution}
# Solution code
```

```{r exercise-name-check}
# Custom checking code
```

Exercise Options

```{r ex, exercise=TRUE, exercise.lines=10}
# 10 lines of space
```

```{r ex, exercise=TRUE, exercise.timelimit=60}
# 60 second time limit
```

```{r ex, exercise=TRUE, exercise.cap="Try it"}
# Custom caption
```

```{r ex, exercise=TRUE, exercise.eval=TRUE}
# Evaluate starter code
```

Quiz Questions

```{r quiz}
quiz(
  question("What is 2 + 2?",
    answer("3"),
    answer("4", correct = TRUE),
    answer("5"),
    allow_retry = TRUE
  ),
  question("Select all prime numbers",
    answer("2", correct = TRUE),
    answer("3", correct = TRUE),
    answer("4"),
    answer("5", correct = TRUE),
    type = "multiple"
  )
)
```

Question Types

# Single choice
question("Question text",
  answer("A"),
  answer("B", correct = TRUE),
  answer("C")
)

# Multiple choice
question("Select all that apply",
  answer("A", correct = TRUE),
  answer("B", correct = TRUE),
  answer("C"),
  type = "multiple"
)

# Text input
question_text("Enter your answer",
  answer("correct answer", correct = TRUE),
  allow_retry = TRUE
)

# Numeric input
question_numeric("What is 2 + 2?",
  answer(4, correct = TRUE),
  allow_retry = TRUE
)

Read the full file on GitHub · 206 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 · 206 lines · 21 tokens per session scan A 087ea9943c64

Subscribe to this mod's changes

learnr is a skill published in the GitHub repository LeoLin990405/r-analytics-skill (5 stars, last pushed 5mo ago), licensed MIT. It adds 21 tokens to every session and 881 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

add-educational-comments

Add educational comments to code files to transform them into effective learning resources. Explains the "why" behind syntax, idioms, and design choices, aligned with the learner's knowledge level and educational goals.

VincentChuWaiChow/vanguard-frontier-agentic · 47 tokens

liu-xiaoyan-english

An English-teaching guide based on Liu Xiaoyan's approach, aimed at Chinese learners preparing for CET-4, CET-6, or graduate-school English exams. CET-4 and CET-6 are China's national college English tests.

tong666-bit/liu-xiaoyan-skill · 272 tokens

infographic

Turn text, a document, or a topic into a graphic-first explainer: an imaginative schoolbook-style HTML page where full-page drawings, diagrams and legends carry the ideas and the text is titles only (a print-ready PDF only when asked). Use for an infographic, visual explainer, one-pager, data poster, concept or…

remybroun/infographic · 98 tokens

algo-bfs-dfs

BFS (queue) and DFS (stack/recursion) traversal in pure Python for shortest unweighted path, k-hop neighborhood, connected components, cycle detection on PPI/regulatory networks. Use for shortest path or cycle detection.

Pavel-Kravchenko/Bioinformatics · 53 tokens

algo-comparison-sorts

Implement bubble/merge/shell/quicksort in Python; compare Big-O time/space/stability. Use when asked to sort an array, code a sort from scratch, explain quicksort complexity, or fix O(n^2) worst case on sorted input.

Pavel-Kravchenko/Bioinformatics · 59 tokens

algo-dijkstra

Compute single-source shortest paths in a non-negative-weight graph with Dijkstra's algorithm (binary-heap priority queue, O((V+E) log V)); reconstruct paths and find network diameter. Use when finding shortest/cheapest/most-reliable path, routing, weighted PPI/interaction-network distance, or ranking paths by…

Pavel-Kravchenko/Bioinformatics · 74 tokens