/r-package-skills:r-package-skillfrom r-package-skills
Creates, edits, or validates R package skills by gathering CRAN docs, pkgdown sites, and vignettes. Runs parallel test iterations until pass rate >= 90%.
Ships in r-package-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generates a new r-{package} skill from an R package's documentation. Core loop: capture intent → gather docs → draft skill → run test cases (with-skill + baseline in parallel) → grade → iterate until pass_rate >= 90% and no improvement for 2 iterations → optimize description.
Always ask before creating files. No silent defaults. If the user already specified a path, use it. See references/installation-paths.md for the prompt and agent-specific paths.
{install-path}/r-{package}/
SKILL.md # <500 words
references/
API.md # REQUIRED: Complete CRAN reference manual
vignette-name.md # Include all CRAN vignettes
references/API.md is required for every package skill.references/{vignette}.md.references/API.md before writing code."(opt) optional, (adv) advanced. Never hide parameters that affect performance or output size (zoom levels, batch sizes, etc.).references/doc-gathering.md.references/API.md, and vignettes.benchmark.json. See references/testing.md.pass_rate < 90% or it's still improving, analyze failures, edit the skill, rerun. Remove guidance transcripts show agents ignoring (YAGNI). Stop when pass_rate >= 90% AND no improvement for 2 iterations.references/description-optimization.md.Descriptions MUST include library({pkg}) and {pkg}:: tokens plus file-extension and domain triggers. Without the package-name tokens, descriptions that read as action-oriented ("Use when creating interactive maps") miss user prompts that contain library(mapgl) or mapgl::.
# Good
description: Use when code loads or uses freestiler, working with .pmtiles files, or preparing tiles for mapgl/MapLibre in R
# Bad: no recognition tokens
description: Use when creating PMTiles vector tilesets from large spatial datasets
See references/description-optimization.md for the train/held-out test method.
Domain assertions call R validators in lib/r-validators/ at repo root via Rscript:
plot-validator.R -- ggplot2/mapgl visualizationsspatial-validator.R -- sf/spatial operationshtml-validator.R -- flextable/Shiny outputsnumerical-validator.R -- collapse/regression resultsEach returns JSON (valid, message, domain fields) for use as grading evidence.
Rscript -e "code" or mcptools MCP.temp_*.R or use tempfile(), clean up with on.exit(unlink(...)) or file.remove().| Mistake | Fix |
|---|---|
Missing references/API.md | REQUIRED. Extract from CRAN reference manual. |
| Missing vignettes | Include every CRAN vignette as references/*.md. |
| Quick Reference hides parameters | Show ALL params that affect performance/output. Mark optional with (opt). |
| Running with-skill first, baseline later | Spawn both in the same turn so timing is comparable. |
| Assertion schema drift | Use text / passed / evidence in grading.json, not name / met / details. |
| Description too generic | Include library({pkg}) and {pkg}:: tokens. |
| Skipping baseline | Without a baseline, you can't tell whether the skill helped. |
| Optimizing description before skill works | Fix functionality first; tune triggering last. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 skills in this plugin
/r-aiUse when code loads ellmer, btw, mcptools, ragnar, or vitals, building LLM-powered R applications, implementing RAG workflows, or choosing between R AI packages (meta-skill for ellmer/btw/mcptools/ragnar/vitals)/r-btwUse when code loads or uses btw (library(btw), btw::), providing R session context to LLMs, registering tools for ellmer chat, or copying R object descriptions to clipboard/r-collapseUse when code loads or uses collapse (library(collapse), collapse::), performing fast grouped or weighted statistics in R, or seeking faster alternatives to dplyr aggregation/r-duckplyrUse when code loads or uses duckplyr (library(duckplyr), duckplyr::), processing large datasets with dplyr syntax, working with Parquet files in R, or needing lazy evaluation for bigger-than-memory data/r-duckspatialUse when code loads or uses duckspatial (library(duckspatial), duckspatial::), performing spatial joins or areal interpolation on large vector datasets in R, or needing faster spatial operations than sf/r-ellmerUse when code loads or uses ellmer (library(ellmer), chat_openai, chat_claude, chat_ollama), chatting with LLMs from R, building chatbots, or extracting structured data from text with LLMsnpx claudepluginhub arthurgailes/r-package-skills --plugin r-package-skillsOther plugins' skills for the same job