Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

R Pro

ASecurity

Professional R: tidyverse workflows, vectorization, packaging, R Markdown reporting, and Shiny apps. Use when writing, reviewing, or structuring R code for analysis or production.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsrustgoreactexpressdebugginggitapiperformancedocumentation

Works with

api

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add aicodedecode/awesome-muse-skills --skill r-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of R Pro?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for R Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-r-pro/badge)](https://www.skillsdirectory.com/skills/aicodedecode-r-pro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: r-pro
description: Professional R: tidyverse workflows, vectorization, packaging, R Markdown reporting, and Shiny apps. Use when writing, reviewing, or structuring R code for analysis or production.
category: development
---

# R Pro

## Overview

R's strength — **expressive data analysis with a massive statistical ecosystem** — turns into a
liability when scripts grow into unmaintainable notebooks. Professional R means writing *programs*,
not just scripts: vectorized operations, functions over copy-paste, packages over loose files,
reproducible environments (renv), and reports that regenerate from raw data with one command.

The through-line: reproducible, vectorized, and packaged — analysis you can rerun and trust.

## When to use

- Writing or reviewing R code for analysis, modeling, or reporting.
- Structuring R projects (packages, targets pipelines, renv).
- Choosing between base R and tidyverse idioms.
- Building Shiny apps or R Markdown/Quarto reports.
- Debugging performance or reproducibility issues.

## Core concepts

- **Vectorization is the language.** Operations apply to whole vectors — `x * 2`, `ifelse`,
  `dplyr::mutate` — loops over rows are almost always wrong (slow and unidiomatic). Think in
  columns and transformations, not iterations.
- **Tidyverse as a dialect.** `dplyr` (manipulation), `tidyr` (reshaping), `ggplot2` (visualization),
  `purrr` (functional iteration), `readr`/`tibble` (I/O). The pipe (`|>`) chains verbs readably.
  Pick tidyverse *or* base/data.table per project and stay consistent — mixing dialects confuses.
- **Tidy data.** Each variable a column, each observation a row, each value a cell. Half of "R is
  hard" is fighting untidy data — `pivot_longer`/`pivot_wider` first, analysis second.
- **Functions and packages.** Repeated analysis → functions; shared functions → a package
  (`usethis::create_package`) with documentation (roxygen2) and tests (testthat). Scripts are for
  exploration; packages are for reuse.
- **Reproducibility.** `renv` locks package versions; Quarto/R Markdown weaves code + narrative so
  reports regenerate; `targets` builds dependency-aware pipelines (changed upstream → rebuild only
  downstream). "It worked on my laptop" is not reproducibility.
- **Factors and types deliberately.** Strings vs factors (know when each bites — modeling vs
  display), dates as dates (`lubridate`), missing values (`NA`) handled explicitly, not ignored.

## Practical workflow

1. **Scaffold the project.** RStudio project or plain dir + `renv::init()`; `data/` (raw, read-only),
   `R/` (functions), `reports/` (Quarto docs), `tests/` (testthat). Never modify raw data in place.
2. **Explore interactively, then codify.** Notebook exploration is fine — but promote repeated
   logic into functions in `R/` as soon as it's used twice.
3. **Write vectorized pipelines.** `read → clean (tidyr) → transform (dplyr) → model → visualize
   (ggplot2)`, each step a pipe chain or function. Avoid row loops; use `purrr::map` family for
   iteration that must happen.
4. **Build the pipeline with `targets`.** Declare dependencies between steps; `tar_make()` rebuilds
   only what's stale. Your analysis becomes a build system, not a prayer.
5. **Report with Quarto.** Narrative + code + figures in one document; parameterized reports for
   repeated variants (per-region, per-month). The report *is* the analysis artifact.
6. **Test and review.** testthat for package functions (edge cases: empty data, all-NA columns,
   unexpected types); code review for analysis code catches methodology bugs tests can't.

Idiomatic snippets:

```r
library(dplyr)

orders |>
  filter(!is.na(total), status != "cancelled") |>
  mutate(month = lubridate::floor_date(created_at, "month")) |>
  group_by(month, region) |>
  summarise(
    revenue = sum(total),
    n_orders = n(),
    .groups = "drop"
  ) |>
  arrange(month)

# purrr instead of loops for model-per-group
models <- orders |>
  split(.$region) |>
  purrr::map(~ lm(total ~ discount, data = .x))
```

## Common pitfalls

- **Row-wise loops.** `for (i in 1:nrow(df))` — slow and unidiomatic. Vectorize, or use
  `purrr`/`dplyr` verbs. (data.table is the legitimate fast alternative for huge data.)
- **Copy-paste analysis.** The same 40 lines with different filters, diverging silently. Extract
  functions; parameterize reports.
- **No environment lock.** "Install latest tidyverse" in a README is not reproducibility.
  `renv::snapshot()` and commit the lockfile.
- **Modifying raw data.** Overwriting `data/raw.csv` with cleaned data destroys provenance. Raw
  is immutable; cleaning is code.
- **Factors biting.** Unexpected level ordering in plots/models, or `read.csv` coercing strings.
  Be deliberate: set levels explicitly, use `stringsAsFactors` intentionally.
- **Growing vectors in loops.** `x <- c(x, new)` reallocates every iteration — quadratic. Preallocate
  or collect in a list and combine once.
- **Shiny reactivity spaghetti.** Observers triggering observers, no modularization. Shiny modules
  for reusable components; keep server logic in functions testable outside Shiny.

Attribution

aicodedecodeaicodedecode
View sourceSee grades on GitHubMore from aicodedecode →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →