nodejs-containers

nodejs-containers is a skill for Claude Code from laurigates/claude-plugins. It costs 43 tokens per session (1,935 once invoked), scanned A, original, MIT.

A guide to reducing the size of Docker images for Node.js applications. It covers Alpine images, multi-stage builds, dependency handling, and build caches.

In plain words
What is it for?
Writing and reviewing Node.js Dockerfiles, handling native modules, and improving image build efficiency.
Why use it?
It helps avoid shipping unnecessary build tools and development dependencies in production images.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

Part of the container-plugin plugin — 9 skills, 1 agent shipped together

Good fit Writing and reviewing Node.js Dockerfiles, handling native modules, and improving image build efficiency.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laurigates/claude-plugins/nodejs-containers
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 laurigates/claude-plugins --skill nodejs-containers
Clone the repo
git clone --depth 1 https://github.com/laurigates/claude-plugins

Made for: Claude Code.

Or install container-plugin, the plugin that ships this one along with the rest of its 9 skills, 1 agent.

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 nodejs-containers

README.md
[![agentmods](https://agentmods.dev/badge/skills/laurigates/claude-plugins/nodejs-containers/github.svg)](https://agentmods.dev/skills/laurigates/claude-plugins/nodejs-containers)
Your own site
<a href="https://agentmods.dev/skills/laurigates/claude-plugins/nodejs-containers"><img src="https://agentmods.dev/badge/skills/laurigates/claude-plugins/nodejs-containers/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 nodejs-containers

Your own site · 80×15
<a href="https://agentmods.dev/skills/laurigates/claude-plugins/nodejs-containers"><img src="https://agentmods.dev/badge/skills/laurigates/claude-plugins/nodejs-containers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,935 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 162
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • medium MCP Rug Pull · line 164
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
How audits are shown
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.00043 $0.01935
Opus 5.5 $0.00017 $0.00774
Sonnet 5.5 $0.00009 $0.00387
Haiku 4.5 $0.00004 $0.00194

Measured 28d ago against content hash 354f3c5a3559, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nodejs-containers scanned grade A with 1 finding 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 28d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

## Distroless runtime: no shell, so no `child_process` to CLI tools
container-plugin/skills/nodejs-containers/SKILL.md · 218 lines

How it starts

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

Node.js Container Optimization

Expert knowledge for building optimized Node.js container images using Alpine variants, multi-stage builds, and Node.js-specific dependency management patterns.

When to Use This Skill

Use this skill when... Use container-development instead when...
Building Node.js-specific Dockerfiles General multi-stage build patterns
Optimizing Node.js image sizes Language-agnostic container security
Handling npm/yarn/pnpm in containers Docker Compose configuration
Dealing with native module builds Non-Node.js container optimization

Core Expertise

Node.js Container Challenges:

  • Large node_modules directories (100-500MB)
  • Full base images include build tools (~900MB)
  • Separate dev and production dependencies
  • Different package managers (npm, yarn, pnpm)
  • Native modules requiring build tools

Key Capabilities:

  • Alpine-based images (~100MB vs ~900MB full)
  • Multi-stage builds separating build and runtime
  • BuildKit cache mounts for node_modules
  • Production-only dependency installation
  • Non-root user configuration

Optimized Multi-Stage Pattern (Node Servers)

The recommended pattern achieves ~100-150MB images:

# Dependencies stage - production only
FROM node:20-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production

# Build stage - includes devDependencies
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

# Runtime stage - minimal
FROM node:20-alpine
WORKDIR /app

# Create non-root user
RUN addgroup -g 1001 -S nodejs && \
    adduser -u 1001 -S nodejs -G nodejs

# Copy dependencies and built app
COPY --from=deps --chown=nodejs:nodejs /app/node_modules ./node_modules
COPY --from=build --chown=nodejs:nodejs /app/dist ./dist
COPY --chown=nodejs:nodejs package.json ./

USER nodejs
EXPOSE 3000

HEALTHCHECK --interval=30s CMD node healthcheck.js || exit 1

CMD ["node", "dist/server.js"]

Read the full file on GitHub · 218 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 28d ago Changed · +35 lines 354f3c5a3559
  2. 1mo ago First seen · 183 lines · 43 tokens per session scan A 082ab42f73d7

Subscribe to this mod's changes

nodejs-containers is a skill published in the GitHub repository laurigates/claude-plugins (59 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 1,935 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

notebook.fix_packages

Keep the Docker container aligned with the template and install Python packages directly in the notebook.

causify-ai/helpers · 16 tokens

audit-release-go-version

Audit the effective Go builder versions used by images in an OpenShift Container Platform release image or payload against a requested Go version. Use when the user asks which OCP release images were built with a different Go version, wants a concise payload Go-version audit, or needs Dockerfile builder evidence for…

openshift-eng/ai-helpers · 68 tokens

go-install-skill

A Go installation helper for installing Go, a programming language and its development tools. It supports package managers, official binaries, or Docker, and checks whether Go is already installed.

jiushiwon/wg-skills · 48 tokens

nodejs-install-skill

A Node.js installation helper for installing Node.js, the runtime used to run JavaScript programs outside a web browser. It checks the system first and supports package managers or Docker.

jiushiwon/wg-skills · 56 tokens

python-install-skill

An installation helper for Python 3, a programming language and runtime. It checks whether Python is already installed and supports package-manager or Docker-based installation on common operating systems.

jiushiwon/wg-skills · 49 tokens

go-binary-size

Reduce the size of compiled Go binaries and container images: linker flags, inlining budget, CGO and build tags, embedded assets, dependency weight, and measuring what actually costs bytes. Use when a binary or image is too large, when shrinking a CLI for distribution, or when auditing what a dependency adds to the…

eduardo-sl/go-agent-skills · 147 tokens