snap-oci-analyzer

Analyzes OCI container images and writes a snap-analysis.json packaging specification.

7|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/rascheel/scheel-skills --skill snap-oci-analyzer-rascheel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: snap-oci-analyzer
Source: https://github.com/rascheel/scheel-skills/tree/main/snap-oci-analyzer
Command: npx skills add https://github.com/rascheel/scheel-skills --skill snap-oci-analyzer-rascheel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Converting a Docker or OCI container into a snap requires manually inspecting the image's config, capabilities, mounts, binaries, and glibc details to determine interfaces, layouts, and overrides. This Skill automates that fact-gathering and produces a structured snap-analysis.json that the snap-packager skill consumes to generate snapcraft.yaml. ## Core Features & Use Cases - Flexible OCI input handling: Accepts Docker Hub URLs, image references, docker save tarballs, or pre-extracted config.json plus rootfs directories, downloading with skopeo and extracting via docker-to-snap. - Deep packaging fact extraction: Derives target architecture from OCI metadata, detects non-root users, merged-/usr layouts, and glibc mismatches, and records interfaces, layouts, override steps, content interfaces, and snap config options in an oci block. - Use Case: Point the Skill at nginx:1.27 from Docker Hub; it downloads and extracts the image, analyzes the entrypoint and capabilities, and writes /tmp/snap-analysis-*.json ready for snap-packager to render snapcraft.yaml. ## Quick Start Analyze the Docker image nginx:1.27 and produce the snap packaging specification for it.

Frequently Asked Questions about snap-oci-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a Docker image to a snap package?▼

Provide a Docker Hub URL, image reference, or docker save tarball; the Skill downloads it with skopeo, extracts it via docker-to-snap, and writes a snap-analysis.json specification. The snap-packager skill then consumes that file to generate snapcraft.yaml and build the snap.

What input formats does OCI container analysis support?▼

It accepts Docker Hub URLs, pullable image references like nginx:1.27, docker-archive tarballs from docker save, and pre-extracted directories containing config.json plus a rootfs folder. Docker Hub links are normalized to pullable references automatically.

Does this skill generate snapcraft.yaml directly?▼

No. It performs analysis and fact-gathering only, writing results to snap-analysis.json with an oci block. Generating and modifying snapcraft.yaml is exclusively the snap-packager skill's responsibility.

How is the snap build architecture determined from a container image?▼

The Skill reads OCI architecture annotations from config.json and normalizes them to snapcraft names, mapping values like amd64, arm64, arm/v7 to armhf, and ppc64le to ppc64el. If no supported architecture is found, it stops and reports the missing metadata.

What happens when the container runs as a non-root user?▼

The Skill detects non-root process.user values and records a system_usernames fact with the configurability method, such as env_var, cli_flag, or setpriv_wrapper. The packager later renders the system-usernames stanza and privilege-drop wrapper from these facts.

Why does a snapped container fail with GLIBC version errors?▼

A glibc mismatch between the OCI image and the base snap causes snapcraft to inject LD_LIBRARY_PATH, crashing base-snap shells and hooks. The Skill detects this and records an rpath_embed mitigation so the packager neutralizes LD_LIBRARY_PATH and embeds RPATH instead.