create-r-dockerfile

create-r-dockerfile is a skill for Claude Code from pjt222/agent-almanac. It costs 79 tokens per session (1,678 once invoked), scanned C, original, MIT.

A Dockerfile setup for R projects using Rocker base images. It installs R packages and system libraries, can use renv for locked dependencies, and supports R applications and services.

In plain words
What is it for?
Containerizing R analyses, Shiny applications, Plumber APIs, MCP servers, and other R-based services for development or production.
Why use it?
It helps make an R environment repeatable across development and deployment. It also keeps dependency installation and Docker build layers organized for faster rebuilds.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agent-almanac plugin — 122 skills, 77 agents shipped together

Good fit Containerizing R analyses, Shiny applications, Plumber APIs, MCP servers, and other R-based services for development or production.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pjt222/agent-almanac/create-r-dockerfile
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pjt222/agent-almanac --skill create-r-dockerfile
Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 77 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for create-r-dockerfile

README.md
[![agentmods](https://agentmods.dev/badge/skills/pjt222/agent-almanac/create-r-dockerfile/github.svg)](https://agentmods.dev/skills/pjt222/agent-almanac/create-r-dockerfile)
Your own site
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/create-r-dockerfile"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/create-r-dockerfile/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for create-r-dockerfile

Your own site · 80×15
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/create-r-dockerfile"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/create-r-dockerfile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,678 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00079 $0.01678
Opus 5.5 $0.00032 $0.00671
Sonnet 5.5 $0.00016 $0.00336
Haiku 4.5 $0.00008 $0.00168

Measured 3mo ago against content hash 4ae31fa3caec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

create-r-dockerfile scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

&& rm -rf /var/lib/apt/lists/*

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl \
i18n/caveman-lite/skills/create-r-dockerfile/SKILL.md · 206 lines

How it starts

The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create R Dockerfile

Build a Dockerfile for R projects using rocker base images with proper dependency management.

When to Use

  • Containerizing an R application or analysis
  • Creating reproducible R environments
  • Deploying R-based services (Shiny, Plumber, MCP server)
  • Setting up consistent development environments

Inputs

  • Required: R project with dependencies (DESCRIPTION or renv.lock)
  • Required: Purpose (development, production, or service)
  • Optional: R version (default: latest stable)
  • Optional: Additional system libraries needed

Procedure

Step 1: Choose Base Image

Use Case Base Image Size
Minimal R runtime rocker/r-ver:4.5.0 ~800MB
With tidyverse rocker/tidyverse:4.5.0 ~1.8GB
With RStudio Server rocker/rstudio:4.5.0 ~1.9GB
Shiny server rocker/shiny-verse:4.5.0 ~2GB

Got: A base image is selected that matches the project's requirements without unnecessary bloat.

If fail: If unsure which image to use, start with rocker/r-ver (minimal) and add packages as needed. Check rocker-org for the full image catalog.

Step 2: Write Dockerfile

FROM rocker/r-ver:4.5.0

# Install system dependencies
# Group by purpose for clarity
RUN apt-get update && apt-get install -y \
    # HTTP/SSL
    libcurl4-openssl-dev \
    libssl-dev \
    # XML processing
    libxml2-dev \
    # Git integration
    libgit2-dev \
    libssh2-1-dev \
    # Graphics
    libfontconfig1-dev \
    libharfbuzz-dev \
    libfribidi-dev \
    libfreetype6-dev \
    libpng-dev \
    libtiff5-dev \
    libjpeg-dev \
    # Utilities
    git \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Install R packages
# Order: least-changing first for cache efficiency
RUN R -e "install.packages(c( \
    'remotes', \
    'devtools', \
    'renv' \
    ), repos='https://cloud.r-project.org/')"

# Set working directory
WORKDIR /workspace

# Copy renv files first (cache layer)
COPY renv.lock renv.lock
COPY renv/activate.R renv/activate.R

# Restore packages from lockfile
RUN R -e "renv::restore()"

# Copy project files
COPY . .

# Default command
CMD ["R"]

Read the full file on GitHub · 206 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 206 lines · 79 tokens per session scan C 4ae31fa3caec

Subscribe to this mod's changes

create-r-dockerfile is a skill published in the GitHub repository pjt222/agent-almanac (46 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 1,678 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

create-r-dockerfile compared with skills from other repositories

create-r-dockerfile next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
create-r-dockerfilepjt222/agent-almanacSkill46yesterdayMITC79Claude Code
wranglercloudflare/skillsSkill3.6ktodayApache-2.0A60Claude Code
managing-astro-local-envastronomer/agentsSkill465yesterdayApache-2.0A63Claude Code
loom-kubernetescosmix/loomSkill662d agoMITA35Claude Code
loom-kustomizecosmix/loomSkill662d agoMITA15Claude Code
loom-dockercosmix/loomSkill662d agoMITA9Claude Code
clawteam.system.setupjavimosch/supercliSkill58todayMITA21Claude Code, Codex