bazel-oci-expert

bazel-oci-expert is a skill for Claude Code, Codex from kinhluan/rules-quarkus-skills. It costs 42 tokens per session (3,573 once invoked), scanned A, original, MIT.

A build guide for creating OCI container images with Bazel and rules_oci. OCI images are the standard container format used by tools such as Docker and Kubernetes.

In plain words
What is it for?
Use it to package Quarkus or Java applications into container images, create AMD64 and ARM64 images, and optimize image contents and layers.
Why use it?
It helps keep image builds reproducible, support different processor types, and organize layers for better reuse.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Codex.

Good fit Use it to package Quarkus or Java applications into container images, create AMD64 and ARM64 images, and optimize image contents and layers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kinhluan/rules-quarkus-skills/bazel-oci-expert
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 kinhluan/rules-quarkus-skills --skill bazel-oci-expert
Clone the repo
git clone --depth 1 https://github.com/kinhluan/rules-quarkus-skills

Made for: Claude Code, Codex.

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 bazel-oci-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/kinhluan/rules-quarkus-skills/bazel-oci-expert/github.svg)](https://agentmods.dev/skills/kinhluan/rules-quarkus-skills/bazel-oci-expert)
Your own site
<a href="https://agentmods.dev/skills/kinhluan/rules-quarkus-skills/bazel-oci-expert"><img src="https://agentmods.dev/badge/skills/kinhluan/rules-quarkus-skills/bazel-oci-expert/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 bazel-oci-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/kinhluan/rules-quarkus-skills/bazel-oci-expert"><img src="https://agentmods.dev/badge/skills/kinhluan/rules-quarkus-skills/bazel-oci-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00042 $0.03573
Opus 5 $0.00021 $0.01786
Sonnet 5 $0.00008 $0.00715
Haiku 4.5 $0.00004 $0.00357

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

Security

Grade A, and why

bazel-oci-expert scanned grade A with 0 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 12d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agent-skills/bazel-oci-expert/SKILL.md · 529 lines

How it starts

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

bazel-oci-expert

Keyword: oci | Platforms: gemini,claude,codex

Bazel OCI Container Expert Skill - Building, optimizing, and publishing OCI-compliant container images using rules_oci for Quarkus and Java applications.

Core Mandates

  • rules_oci First: Use rules_oci (not rules_docker) for OCI-compliant image builds. rules_docker is deprecated.
  • Hermetic Images: All image layers must be built hermetically within Bazel - no docker build.
  • Distroless Base: Prefer distroless or minimal base images (e.g., gcr.io/distroless/java21-debian12) for security.
  • Multi-Arch: Build for both AMD64 and ARM64 using platform transitions.
  • Layer Caching: Separate application code from dependencies to maximize layer cache hits.

Setup (Bzlmod)

MODULE.bazel

bazel_dep(name = "rules_oci", version = "2.0.0")

oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")

# Pull base images
oci.pull(
    name = "distroless_java21",
    digest = "sha256:abc123...",  # Pin by digest, not tag
    image = "gcr.io/distroless/java21-debian12",
    platforms = [
        "linux/amd64",
        "linux/arm64",
    ],
)

oci.pull(
    name = "ubi_minimal",
    digest = "sha256:def456...",
    image = "registry.access.redhat.com/ubi9/ubi-minimal",
    platforms = [
        "linux/amd64",
        "linux/arm64",
    ],
)

use_repo(oci, "distroless_java21", "ubi_minimal")

WORKSPACE.bazel (Legacy - avoid if using Bzlmod)

load("@rules_oci//oci:pull.bzl", "oci_pull")

oci_pull(
    name = "distroless_java21",
    digest = "sha256:abc123...",
    image = "gcr.io/distroless/java21-debian12",
)

Building Container Images

Basic Java Application Image

# services/user/BUILD.bazel
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_tarball")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")

# Package the JAR into a tar layer
pkg_tar(
    name = "app_layer",
    srcs = [":user-service_deploy.jar"],  # java_binary with deploy_env
    package_dir = "/app",
)

# Package dependencies into a separate layer
pkg_tar(
    name = "deps_layer",
    srcs = [":user-service-deps.jar"],
    package_dir = "/app/lib",
)

# Build the OCI image
oci_image(
    name = "user-service_image",
    base = "@distroless_java21",
    tars = [
        ":deps_layer",
        ":app_layer",
    ],
    entrypoint = ["/usr/bin/java", "-jar", "/app/user-service_deploy.jar"],
    env = {
        "JAVA_TOOL_OPTIONS": "-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0",
    },
)

# Create a tarball for docker load
oci_tarball(
    name = "user-service_tar",
    image = ":user-service_image",
    repo_tags = ["user-service:latest"],
)

Read the full file on GitHub · 529 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. 12d ago First seen · 529 lines · 42 tokens per session scan A b98ec9063f10

Subscribe to this mod's changes

bazel-oci-expert is a skill published in the GitHub repository kinhluan/rules-quarkus-skills (3 stars, last pushed 3mo ago), licensed MIT. It adds 42 tokens to every session and 3,573 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. 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

buildah

Buildah OCI container image builder reference. Build container images without Docker daemon. Covers Containerfile builds, scripted builds with shell commands, direct filesystem mount, rootless operation, multi-arch manifests, and CI/CD integration.

bytesagain/ai-skills · 47 tokens

docker-registry

Container image registry workflows — GHCR, Docker Hub, and private registry auth, tagging strategies, CI push pipelines, image pruning, and multi-platform manifest publishing.

LuuOW/meridian-mcp · 35 tokens

container-manager-kubernetes-operations

Full operational Kubernetes surface via the container-manager-mcp MCP server — workloads (pods/rollouts/StatefulSets/DaemonSets/ReplicaSets/Jobs/CronJobs), config (ConfigMaps/Secrets/Namespaces/CRDs/patch), networking (Ingress/native Services/NetworkPolicy/DNS), storage (PV/PVC/StorageClass/snapshots/CSI), RBAC…

Knuckles-Team/container-manager-mcp · 189 tokens

container-manager-config-walkthrough

End-user setup guide for the container-manager-mcp MCP server — choosing CONTAINERMANAGERTYPE (docker/podman/kubernetes/multi), wiring .env / mcpconfig toggles, connecting remote Docker/Podman hosts via the tunnel-manager inventory versus remote Kubernetes clusters via kubeconfig contexts, and a first-run verification…

Knuckles-Team/container-manager-mcp · 119 tokens

container-manager-kg-ingestion

Snapshot a host's Docker/Podman/Swarm inventory into the epistemic-graph knowledge graph as typed OWL nodes via the container-manager-mcp MCP server — containers, images, volumes, networks, swarm services and nodes, with their :usesImage / :runsOn / :builtFrom links. Use when the agent must record live container state…

Knuckles-Team/container-manager-mcp · 116 tokens

container-manager-multi-context

Operate several container backends and contexts at once — Kubernetes, Docker, Podman, and Swarm — via the container-manager-mcp MCP server's cmmulticontext tool, with per-call backend/context selection and parallel fan-out across a configured pool of contexts. Use when the agent must compare, migrate between, or…

Knuckles-Team/container-manager-mcp · 118 tokens