/agent-almanac:manage-renv-dependenciesfrom agent-almanac
Manages R package dependencies with renv: init, snapshot, restore, update, and CI/CD integration. Use when setting up reproducible R environments or troubleshooting restore failures.
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.
Set up and maintain reproducible R package environments using renv.
renv.lock file (for restore)renv::init()
This creates:
renv/ directory (library, settings, activation script)renv.lock (dependency snapshot).Rprofile to activate renv on loadExpected: Project-local library created. renv/ directory and renv.lock present. .Rprofile updated with activation script.
On failure: If it hangs, check network connectivity. If it fails on a specific package, install that package manually first with install.packages() and then rerun renv::init().
Install packages as usual:
install.packages("dplyr")
renv::install("github-user/private-pkg")
Then snapshot to record the state:
renv::snapshot()
Expected: renv.lock updated with new packages and their versions. renv::status() shows no out-of-sync packages.
On failure: If renv::snapshot() reports validation errors, run renv::dependencies() to check which packages are actually used, then renv::snapshot(force = TRUE) to bypass validation.
renv::restore()
Expected: All packages installed at the exact versions in renv.lock.
On failure: Common issues: GitHub packages fail (set GITHUB_PAT in .Renviron), system dependencies missing (install with apt-get on Linux), timeouts on large packages (set options(timeout = 600) before restore), or binaries not available (renv compiles from source; ensure build tools are installed).
# Update a specific package
renv::update("dplyr")
# Update all packages
renv::update()
# Snapshot after updates
renv::snapshot()
Expected: Target packages are updated to their latest compatible versions. renv.lock reflects the new versions after snapshot.
On failure: If renv::update() fails for a specific package, try installing it directly with renv::install("package@version") and then snapshot.
renv::status()
Expected: "No issues found" or a clear list of out-of-sync packages with actionable guidance.
On failure: If status reports packages used but not recorded, run renv::snapshot(). If packages are recorded but not installed, run renv::restore().
.Rprofile for Conditional Activationif (file.exists("renv/activate.R")) {
source("renv/activate.R")
}
This ensures the project works even if renv isn't installed (CI environments, collaborators).
Expected: R sessions activate renv automatically when starting in the project directory. Sessions without renv installed still start without errors.
On failure: If .Rprofile causes errors, ensure the file.exists() guard is present. Never call source("renv/activate.R") unconditionally.
Track these files:
renv.lock # Always commit
renv/activate.R # Always commit
renv/settings.json # Always commit
.Rprofile # Commit (contains renv activation)
Ignore these (already in renv's .gitignore):
renv/library/ # Machine-specific
renv/staging/ # Temporary
renv/cache/ # Machine-specific cache
Expected: renv.lock, renv/activate.R, and renv/settings.json are tracked by Git. Machine-specific directories (renv/library/, renv/cache/) are ignored.
On failure: If renv/library/ accidentally gets committed, remove it with git rm -r --cached renv/library/ and add it to .gitignore.
In GitHub Actions, use the renv cache action:
- uses: r-lib/actions/setup-renv@v2
This automatically restores from renv.lock with caching.
Expected: CI pipeline restores packages from renv.lock with caching enabled. Subsequent runs are faster due to cached packages.
On failure: If CI restore fails, check that renv.lock is committed and up to date. For private GitHub packages, ensure GITHUB_PAT is set as a repository secret.
renv::status() reports no issuesrenv.lock is committed to version controlrenv::restore() works on a clean checkout.Rprofile conditionally activates renvrenv.lock for dependency resolutionrenv::init() in wrong directory: Always verify getwd() firstrenv::init(), only use the project libraryrenv::snapshot()--vanilla flag: Rscript --vanilla skips .Rprofile, so renv won't activaterenv.lock is designed to be diffable JSONrenv::install("bioc::PackageName") and ensure BiocManager is configuredcreate-r-package - includes renv initializationsetup-github-actions-ci - CI integration with renvsubmit-to-cran - dependency management for CRAN packagesWhat 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