go-containers

go-containers is a skill for Claude Code from laurigates/claude-plugins. It costs 47 tokens per session (3,029 once invoked), scanned B, original, MIT.

A guide to making small Docker images for Go programs by compiling static binaries and using minimal runtime images. A static binary includes what it needs to run without extra system libraries.

In plain words
What is it for?
Building and reviewing Go Dockerfiles, choosing minimal base images, and handling static linking or CGO.
Why use it?
It reduces image size and removes runtime components that a compiled Go program does not need.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool; positional $N argument.

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

Good fit Building and reviewing Go Dockerfiles, choosing minimal base images, and handling static linking or CGO.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laurigates/claude-plugins/go-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 go-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 go-containers

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/laurigates/claude-plugins/go-containers"><img src="https://agentmods.dev/badge/skills/laurigates/claude-plugins/go-containers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,029 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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: 3 findings, up to high

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 →

  • high Privilege Escalation · line 296
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 298
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Privilege Escalation · line 410
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
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.00047 $0.03029
Opus 5.5 $0.00019 $0.01212
Sonnet 5.5 $0.00009 $0.00606
Haiku 4.5 $0.00005 $0.00303

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

Security

Grade B, and why

go-containers scanned grade B 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 1mo 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Run as root user (even in scratch, use `USER 65534`)
container-plugin/skills/go-containers/SKILL.md · 417 lines

How it starts

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

Go Container Optimization

Expert knowledge for building minimal, secure Go container images using static compilation, scratch/distroless base images, and Go-specific build optimizations.

When to Use This Skill

Use this skill when... Use container-development instead when...
Building or auditing a Dockerfile for a Go application Writing language-agnostic multi-stage build patterns
Choosing between scratch, distroless, and Alpine for a Go binary Hardening any container against non-root / least-privilege standards
Driving down a Go image from hundreds of MB to single-digit MB Composing services with Docker Compose
Resolving CGO / static-link issues specific to Go Optimizing a Node.js (nodejs-containers) or Python (python-containers) image

Core Expertise

Go's Unique Advantages:

  • Compiles to single static binary (no runtime dependencies)
  • Can run on scratch base (literally empty image)
  • No interpreter, VM, or system libraries needed at runtime
  • Enables smallest possible container images (2-5MB)

Key Capabilities:

  • Static binary compilation with CGO_ENABLED=0
  • Binary stripping with ldflags (-w, -s)
  • Scratch and distroless base images
  • CA certificate handling for HTTPS
  • CGO considerations when C libraries are required

The Optimization Journey: 846MB → 2.5MB

This demonstrates systematic optimization achieving 99.7% size reduction:

Step 1: The Problem - Full Debian Base (846MB)

# ❌ BAD: Includes full Go toolchain, Debian system, unnecessary tools
FROM golang:1.23
WORKDIR /app
COPY . .
RUN go build -o main .
EXPOSE 8080
CMD ["./main"]

Issues:

  • Full Debian base (~116MB)
  • Complete Go compiler and toolchain (~730MB)
  • System libraries, package managers, shells
  • None of this is needed at runtime

Image size: 846MB

Step 2: Switch to Alpine (312MB)

# ✅ BETTER: Alpine reduces OS overhead
FROM golang:1.23-alpine
WORKDIR /app
COPY . .
RUN go build -o main .
EXPOSE 8080
CMD ["./main"]

Read the full file on GitHub · 417 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. 1mo ago First seen · 417 lines · 47 tokens per session scan B 76683bd3215c

Subscribe to this mod's changes

go-containers is a skill published in the GitHub repository laurigates/claude-plugins (59 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 3,029 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). 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

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

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

go-build-release

Build and release Go binaries that are reproducible and verifiable: version stamping, -trimpath builds, cross-compilation, GoReleaser, checksums, SBOMs, cosign signing, build provenance attestations, and container images with ko or a multi-stage Dockerfile. Use when: "release a Go binary", "set up GoReleaser"…

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

go-deploy

Build and deploy Go applications — version detection, static binaries, CGO, workspaces, and Dockerfile patterns. Use when deploying a Go project, or when go.mod is detected.

nixopus/nixopus · 41 tokens

kubernetes-operator-development

Designs, implements, reviews, tests, and operates Kubernetes operators and controllers in Go with Kubebuilder and controller-runtime. Use when defining CRDs, reconciliation loops, status conditions, finalizers, admission webhooks, external-provider controllers, operator upgrades, envtest suites, or controller-runtime…

d-padmanabhan/agent-engineering-handbook · 72 tokens