apko-generator

apko-generator is a skill for Claude Code from chainguard-demo/claude-plugins. It costs 17 tokens per session (961 once invoked), scanned A, original, Apache-2.0.

A configuration generator for apko, a tool that builds minimal container images from Wolfi operating-system packages using YAML files.

In plain words
What is it for?
Use it to generate apko YAML for Wolfi-based images, including package lists, non-root users, startup commands, and environment settings.
Why use it?
It helps define the packages, user accounts, entry command, and environment needed for a custom container image in one configuration.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the chainguard-codegen plugin — 6 skills, 1 MCP server shipped together

Good fit Use it to generate apko YAML for Wolfi-based images, including package lists, non-root users, startup commands, and environment settings.

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

Made for: Claude Code.

Or install chainguard-codegen, the plugin that ships this one along with the rest of its 6 skills, 1 MCP server.

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 apko-generator

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/chainguard-demo/claude-plugins/apko-generator"><img src="https://agentmods.dev/badge/skills/chainguard-demo/claude-plugins/apko-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 961 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.
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.00017 $0.00961
Opus 5 $0.00009 $0.00481
Sonnet 5 $0.00003 $0.00192
Haiku 4.5 $0.00002 $0.00096

Measured 9d ago against content hash ca1f780f7d42, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

apko-generator 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 9d 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.

Makes network callslowCapability

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

- `curl`
chainguard-codegen/skills/apko-generator/SKILL.md · 155 lines

How it starts

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

You are an expert at creating apko configurations for building minimal, secure container images using Wolfi packages. When generating apko YAML files:

What is apko?

apko is a tool for building container images from APK packages using a declarative YAML configuration. It creates minimal, distroless-style images with only the packages you need.

Finding Packages

Use the mapping-os-packages-to-chainguard skill if available to find the correct Wolfi package name for a given dependency. You can also use the ai-docs MCP server:

search_docs("wolfi package <name>")

Or search inside a Wolfi container:

docker run --rm -it --entrypoint sh cgr.dev/chainguard/wolfi-base
# apk search -q <package>
# apk search -q cmd:<command>

Basic Structure:

contents:
  repositories:
    - https://packages.wolfi.dev/os
  keyring:
    - https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
  packages:
    - wolfi-base
    - python-3.12
    - py3.12-pip

entrypoint:
  command: /usr/bin/python3

accounts:
  groups:
    - groupname: nonroot
      gid: 65532
  users:
    - username: nonroot
      uid: 65532
      gid: 65532
  run-as: 65532

environment:
  PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

work-dir: /app

Key Sections:

1. Contents

  • repositories: Wolfi package repository URL
  • keyring: Public key for package verification
  • packages: List of Wolfi packages to include

2. Entrypoint

  • command: Full path to the binary to run
  • type: Optional, use "service" for long-running processes

3. Accounts

  • Always create a non-root user (UID 65532 is standard)
  • Set run-as to the non-root UID

4. Environment

  • Set necessary environment variables
  • Always include a sane PATH

5. Annotations

  • Add OCI annotations for metadata (optional but recommended)

Common Wolfi Packages:

Languages:

  • python-3.12, py3.12-pip
  • nodejs-22, npm
  • ruby-3.3
  • go-1.22
  • openjdk-17, openjdk-17-default-jvm

Read the full file on GitHub · 155 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. 9d ago First seen · 155 lines · 17 tokens per session scan A ca1f780f7d42

Subscribe to this mod's changes

apko-generator is a skill published in the GitHub repository chainguard-demo/claude-plugins (7 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 17 tokens to every session and 961 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

build-mcpb

This skill should be used when the user wants to "package an MCP server", "bundle an MCP", "make an MCPB", "ship a local MCP server", "distribute a local MCP", discusses ".mcpb files", mentions bundling a Node or Python runtime with their MCP server, or needs an MCP server that interacts with the local filesystem…

anthropics/claude-plugins-official · 98 tokens

escaping-hardened-containers

Escape containers that drop capabilities, enforce seccomp profiles, and run behind AppArmor or SELinux — enumerating residual capabilities, analyzing seccomp filters, abusing single-capability escapes, cgroup release agents, filesystem mounts, and runtime CVEs. Use when a container has no --privileged flag but retains…

trilwu/secskills · 105 tokens

opencode-sandbox

Run OpenCode in a docker-dev sandbox (SSH/gh on by default; --no-ssh/--no-github to isolate). Prints docker exec attach; kept until you confirm rm. Don't use for opencode.ai (opencode-runner), Herdr, or the app.

luongnv89/skills · 63 tokens

pentest-cloud-infrastructure

Cloud security posture management and container security assessment for AWS, Azure, GCP, and Kubernetes.

jd-opensource/JoySafeter · 25 tokens

configure-log-aggregation

Set up centralized log aggregation with Loki and Promtail (or ELK stack), including log parsing, label extraction, retention policies, and integration with metrics for correlation. Use when consolidating logs from multiple services into a searchable system, replacing local log files with centralized queryable storage…

pjt222/agent-almanac · 86 tokens

hermes-diagnostic-review

Use when running a read-only diagnostic review of recent Hermes sessions to find recurring mistakes, failed tool calls, and repeated fixes, then propose suggestion-only improvements and reusable skills. Human-gated; never auto-applies.

AtlasOmnia/hermes-custom-pack · 49 tokens