swirl

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

An interactive R tutorial system that teaches programming through lessons and questions inside the R console.

In plain words
What is it for?
Use it to take courses on R programming, data cleaning, regression, statistics, and exploratory data analysis.
Why use it?
It gives beginners guided practice and immediate exercises instead of requiring them to learn R only from documentation.

Skill for Claude CodeCodex

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

Good fit Use it to take courses on R programming, data cleaning, regression, statistics, and exploratory data analysis.

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

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

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

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

Security

Grade A, and why

swirl 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/swirl/SKILL.md · 151 lines

How it starts

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

swirl

Learn R, in R.

Getting Started

library(swirl)

# Start swirl
swirl()

# Follow prompts to:
# 1. Enter your name
# 2. Select a course
# 3. Select a lesson

Course Management

# Install courses from swirl repository
install_course("R Programming")
install_course("Getting and Cleaning Data")
install_course("Regression Models")

# Install from GitHub
install_course_github("swirldev", "R_Programming_E")

# Install from URL
install_course_url("http://example.com/course.zip")

# Install from local zip
install_course_zip("path/to/course.zip")

# List installed courses
list_courses()

# Uninstall course
uninstall_course("Course Name")

Available Courses

# Official courses from swirldev:
# - R Programming
# - R Programming E (enhanced)
# - Getting and Cleaning Data
# - Regression Models
# - Statistical Inference
# - Exploratory Data Analysis

# Community courses available at:
# https://swirlstats.com/scn/

During a Lesson

# Commands during swirl:
# - Type answer and press Enter
# - skip() - Skip current question
# - play() - Exit swirl temporarily
# - nxt() - Return to swirl after play()
# - bye() - Exit swirl
# - main() - Return to main menu
# - info() - Display options again

Progress

# Progress is saved automatically
# Resume where you left off by running swirl()

# Delete progress
delete_progress("Course Name")

Creating Courses

# Initialize new course
new_course("My Course")

# Add lesson
new_lesson("Lesson 1", "My Course")

# Lesson structure:
# - lesson.yaml: Lesson content
# - initLesson.R: Setup code
# - customTests.R: Custom test functions
# - dependson.txt: Required packages

Lesson YAML Format

# lesson.yaml example
- Class: meta
  Course: My Course
  Lesson: Lesson 1
  Author: Your Name
  Type: Standard
  Organization: Your Org
  Version: 1.0.0

- Class: text
  Output: Welcome to this lesson!

- Class: cmd_question
  Output: Create a vector from 1 to 10.
  CorrectAnswer: 1:10
  AnswerTests: omnitest(correctExpr='1:10')
  Hint: Use the colon operator.

- Class: mult_question
  Output: What is 2 + 2?
  AnswerChoices: 3;4;5
  CorrectAnswer: 4
  AnswerTests: omnitest(correctVal='4')

Read the full file on GitHub · 151 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 · 151 lines · 20 tokens per session scan A 95298d586379

Subscribe to this mod's changes

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