
wf manages skills for AI coding agents. Skills are
reusable instruction sets that extend what an agent can do. They live in
a conventional directory for each agent (e.g.,
.claude/skills/ for Claude Code) and can be installed from
GitHub or a local path.
# install.packages('pak')
pak::pak('christopherkenny/wf')Set WF_AGENT in your .Renviron so every
wf function knows which agent you use:
usethis::edit_r_environ()Add a line like:
WF_AGENT='claude_code'Supported agents: 'claude_code' (alias:
'claude'), 'openclaw', 'codex',
'cursor', 'gemini_cli',
'github_copilot' (alias: 'copilot'),
'posit_ai' (alias: 'posit').
Skills can be scoped to a project (.agent/skills/) or
installed globally (~/.agent/skills/):
library(wf)
skill_path('claude_code', 'project') # project-local
#> [1] ".claude/skills"
skill_path('claude_code', 'global') # user-global
#> [1] "~/.claude/skills"
skill_path() # auto-detected from WF_AGENT or directory
#> [1] ".claude/skills"Install a skill from GitHub using its owner/repo
shorthand or a full URL:
add_skill('some-user/some-skill')For repos that bundle multiple skills, use the skill
argument:
add_skill('some-user/skills', skill = 'proofread')List, check, and update installed skills:
list_skills()
#> name
#> .claude/skills/cran-extrachecks cran-extrachecks
#> .claude/skills/tidy-argument-checking types-check
#> .claude/skills/tidy-deprecate-function tidy-deprecate-function
#> description
#> .claude/skills/cran-extrachecks Prepare R packages for CRAN submission by checking for common ad-hoc requirements not caught by devtools::check(). Use when: (1) Preparing a package for first CRAN release, (2) Preparing a package update for CRAN resubmission, (3) Reviewing a package to ensure CRAN compliance, (4) Responding to CRAN reviewer feedback. Covers documentation requirements, DESCRIPTION field standards, URL validation, examples, and administrative requirements.\n
#> .claude/skills/tidy-argument-checking Validate function inputs in R using a standalone file of check_* functions. Use when writing exported R functions that need input validation, reviewing existing validation code, or when creating new input validation helpers.
#> .claude/skills/tidy-deprecate-function Guide for deprecating R functions/arguments. Use when a user asks to deprecate a function or parameter, including adding lifecycle warnings, updating documentation, adding NEWS entries, and updating tests.
#> source
#> .claude/skills/cran-extrachecks https://github.com/posit-dev/skills/tree/HEAD/r-lib/cran-extrachecks
#> .claude/skills/tidy-argument-checking <NA>
#> .claude/skills/tidy-deprecate-function <NA>
#> installed_at
#> .claude/skills/cran-extrachecks 2026-03-11T13:56:50Z
#> .claude/skills/tidy-argument-checking <NA>
#> .claude/skills/tidy-deprecate-function <NA>
check_skills()
#> name installed_sha
#> 1 cran-extrachecks bf0fc0d480209a2f5f7fdf32eabb9c7546e53ee5
#> latest_sha update_available
#> 1 bf0fc0d480209a2f5f7fdf32eabb9c7546e53ee5 FALSE
update_skills()
#> All skills are up to date.Search GitHub for community skills tagged with
claude-skill:
find_skill('quarto')
#> name description owner
#> 1 skills [WIP] Claude Skills for Political Scientists christopherkenny
#> url stars
#> 1 https://github.com/christopherkenny/skills 3Scaffold a new skill with a template SKILL.md:
tmp <- tempfile()
init_skill('my-skill', tmp)
#> Created skill "my-skill" at
#> 'C:/Users/chris/AppData/Local/Temp/RtmpgfUC99/file69c48977e8/my-skill'.