codingby brycewang-stanford
Modern Tidyverse Patterns
brycewang-stanford/tidyverse-patterns
Modern tidyverse patterns for R including pipes, joins, grouping, purrr, and stringr.
What it changes
Passed 21 of 22 test cases with the skill, and 14 of 22 without it.
Without skill64%
With skill95%
Checks it passed that the model alone missed
- Uses `in_parallel()` inside `map()`.
- Uses `.by = department` for grouping.
- Uses native pipe `|>` for chaining steps.
and 8 more in the full report
8 fixed13 passed either way0 still failing1 broke
- Pass-rate lift
- +32 pp
- Tokens
- +163%
- Agent turns
- 0%
- Response time
- -46%
Model gemini-3.6-flashMeasured 8/8/2026v121 of 22 cases passed with skill
See it in action
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
PromptWrite an R snippet using dplyr to filter a data frame `df` to rows where any of the columns `a`, `b`, or `c` exceed 100.
What was checked, without and with the skill| Checked | Without skill | With skill |
|---|
| Uses `when_any()` inside `filter()` for multi-column OR conditions. | Missed | Passed |
|---|
What's inside
The instructions your model reads when the skill loads.
SKILL.md412 linessingle file
Modern Tidyverse Patterns
Best practices for modern tidyverse development with dplyr 1.1+ and R 4.3+
Core Principles
- Use modern tidyverse patterns - Prioritize dplyr 1.1+ features, native pipe, and current APIs
- Profile before optimizing - Use profvis and bench to identify real bottlenecks
- Write readable code first - Optimize only when necessary and after profiling
- Follow tidyverse style guide - Consistent naming, spacing, and structure
Pipe Usage (|> not %>%)
- Always use native pipe
|> instead of magrittr %>%
- R 4.3+ provides all needed features
# Good - Modern native pipe
data |>
filter(year >= 2020) |>
summarise(mean_value = mean(value))
# Avoid - Legacy magrittr pipe
data %>%
filter(year >= 2020) %>%
summarise(mean_value = mean(value))
Join Syntax (dplyr 1.1+)
- Use
join_by() instead of character vectors for joins
- Support for inequality, rolling, and overlap joins
# Good - Modern join syntax
transactions |>
inner_join(companies, by = join_by(company == id))
# Good - Inequality joins
transactions |>
Track record
Benchmark
21 / 22
test cases passed, vs 14 / 22 without
Adoption
- Users
- 0
- Times used
- 0
Safety and source details
SkillSafety
✓ 3 of 3 passed✓Code scan15 of 15 checks clean
0 critical · 0 warning · 0 info — scanner v4 — 8/2/2026
View 15 scanner checks
live_secretremote_code_executionreverse_shelldata_exfiltrationssrf_metadataagent_snoopinganti_refusaldestructive_commandsobfuscated_unicodeunicode_homoglyphopaque_blobsuspicious_urltool_overreachtrigger_abuseprompt_injection_phrasing
✓IntentSafe
LLM judge · does the skill do what it claims
✓ContentClean
LLM judge · policy & harmful-content review
Source
Importedbrycewang-stanford / Auto-Empirical-Research-Skills
skills/55-ab604-claude-code-r-skills/skills/tidyverse-patterns/SKILL.md
View on GitHub ↗License NOASSERTIONImported 8/2/2026Version v1