/agent-almanac:create-r-packagefrom agent-almanac
Scaffolds a new R package with DESCRIPTION, NAMESPACE, testthat, roxygen2, renv, Git, and GitHub Actions CI. Follows usethis conventions and tidyverse style. Use when starting a new R package from scratch or converting loose scripts into a structured package.
Ships in agent-almanac. 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.
None: SKILL.md is the whole skill.
Scaffold a fully configured R package with modern tooling and best practices.
.)usethis::create_package("packagename")
setwd("packagename")
Expected: Directory created with DESCRIPTION, NAMESPACE, R/, and man/ subdirectories.
On failure: Ensure usethis is installed (install.packages("usethis")). Check that the directory does not already exist.
Edit DESCRIPTION with accurate metadata:
Package: packagename
Title: What the Package Does (Title Case)
Version: 0.1.0
Authors@R:
person("First", "Last", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0000-0000-0000"))
Description: One paragraph describing what the package does. Must be more
than one sentence. Avoid starting with "This package".
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
URL: https://github.com/username/packagename
BugReports: https://github.com/username/packagename/issues
Expected: Valid DESCRIPTION that passes R CMD check with no metadata warnings.
On failure: If R CMD check warns about DESCRIPTION fields, verify that Title is in Title Case, Description is more than one sentence, and Authors@R uses valid person() syntax.
usethis::use_mit_license()
usethis::use_readme_md()
usethis::use_news_md()
usethis::use_testthat(edition = 3)
usethis::use_git()
usethis::use_github_action("check-standard")
Expected: LICENSE, README.md, NEWS.md, tests/ directory, .git/ initialized, and .github/workflows/ created.
On failure: If any usethis::use_*() function fails, install the missing dependency and rerun. If .git/ already exists, use_git() will skip initialization.
Create .Rprofile:
if (file.exists("renv/activate.R")) {
source("renv/activate.R")
}
if (requireNamespace("mcptools", quietly = TRUE)) {
mcptools::mcp_session()
}
Create .Renviron.example:
RSTUDIO_PANDOC="C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools"
# GITHUB_PAT=your_github_token_here
Create .Rbuildignore entries:
^\.Rprofile$
^\.Renviron$
^\.Renviron\.example$
^renv$
^renv\.lock$
^CLAUDE\.md$
^\.github$
^.*\.Rproj$
Expected: .Rprofile, .Renviron.example, and .Rbuildignore are created. Development files are excluded from the built package.
On failure: If .Rprofile causes errors on startup, check for syntax issues. Ensure requireNamespace() guards prevent failures when optional packages are missing.
renv::init()
Expected: renv/ directory and renv.lock created. Project-local library is active.
On failure: Install renv with install.packages("renv"). If renv hangs during initialization, check network connectivity or set options(timeout = 600).
Create R/packagename-package.R:
#' @keywords internal
"_PACKAGE"
## usethis namespace: start
## usethis namespace: end
NULL
Expected: R/packagename-package.R exists with the "_PACKAGE" sentinel. Running devtools::document() generates package-level help.
On failure: Ensure the filename matches the pattern R/<packagename>-package.R. The "_PACKAGE" string must be a standalone expression, not inside a function.
Create CLAUDE.md in the project root with project-specific instructions for AI assistants.
Expected: CLAUDE.md exists in the project root with project-specific editing conventions, build commands, and architecture notes.
On failure: If unsure what to include, start with the package name, a one-line description, common dev commands (devtools::check(), devtools::test()), and any non-obvious conventions.
devtools::check() returns 0 errors, 0 warnings.Rprofile loads without errorsrenv::status() shows no issues.gitignoreavailable::available("packagename") before committing to a name.Rprofile, .Renviron, renv/) must be excluded from the built packageEncoding: UTF-8 in DESCRIPTION# Minimal creation
usethis::create_package("myanalysis")
# Full setup in one session
usethis::create_package("myanalysis")
usethis::use_mit_license()
usethis::use_testthat(edition = 3)
usethis::use_readme_md()
usethis::use_git()
usethis::use_github_action("check-standard")
renv::init()
write-roxygen-docs - document the functions you createwrite-testthat-tests - add tests for your packagesetup-github-actions-ci - detailed CI/CD configurationmanage-renv-dependencies - manage package dependencieswrite-claude-md - create effective AI assistant instructionsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (pjt222/agent-almanac) — no native marketplace selected
npx claudepluginhub p/pjt222-agent-almanac377 skills in this plugin
/adapt-architectureExecute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.
/adapticMaster skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.
/add-puzzle-typeScaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.
Other plugins' skills for the same job