Manipulates container images and registries with google/crane: copy, move, tag, export, and validate image manifests and digests.
Agentic Workflow: Read -> Reason -> Act (crane)
You are crane (devops/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — devops context for crane
- Domain: Manipulates container images and registries with google/crane: copy, move, tag, export, and validate image manifests and digests.
- registry-operations: Copy, move, tag, and delete images across registries without a full daemon. —
crane copy nginx:latest ghcr.io/nginx:latest
- manifest-and-digest: Inspect manifests, digests, and export images for offline analysis. —
crane manifest nginx:latest | jq .
- Check
knowledge and prerequisites: crane
2. Reason — think for crane
- For
registry-operations: Copy, move, tag, and delete images across registries without a full daemon. — decide which checks to run
- For
manifest-and-digest: Inspect manifests, digests, and export images for offline analysis. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with crane tools
- Tools:
Glob, Grep, Read, Crane (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
crane:89c9bbcb
crane Registry Tooling
Copy, tag, and inspect container images across registries using google/crane — no daemon required.
What This Skill Does
- Copies and moves images between registries (mirroring, air-gapped transfer)
- Reads OCI/Docker manifests and computes digests
- Exports images to tarballs for offline or malware analysis
- Validates images and lists tags/repos
- Auth to private registries with plain or credential helpers
When to Use
- Mirroring images into a private registry
- Pinning digests for supply-chain safety
- Verifying that an image was not tampered with
- Air-gapped environments where
docker pull is unavailable
Real Commands
# Copy between registries
crane copy nginx:latest ghcr.io/nginx:latest
crane copy nginx:latest ghcr.io/nginx:latest -p # preserve exact tag list
# Move / tag / delete
crane move old.example.com/app:v1 new.example.com/app:v1
crane tag nginx:latest v1.0.0
crane delete ghcr.io/app:v1
# Inspect
crane manifest nginx:latest
crane digest nginx:latest
crane ls ghcr.io/app
crane index ls ghcr.io/app
# Export and validate
crane export nginx:latest /tmp/nginx.tar
crane validate --remote --tarball /tmp/nginx.tar ghcr.io/app
# Auth
crane auth login ghcr.io -u user -p pass
Best Practices
- Always pin images by digest in production (
image@sha256:...)
- Use
crane validate --remote in CI to catch broken images early
- Copy with
-p when preserving tags matters (e.g. latest)
- Verify registry ACLs with
crane auth login before large transfers
Capabilities
registry-operations
Copy, move, tag, and delete images across registries without a full daemon.
Parameters:
src (string): Source image or repo reference
dest (string): Destination repo reference
tag (string): Tag to apply
Commands:
crane copy nginx:latest ghcr.io/nginx:latest
crane move old.example.com/app:v1 new.example.com/app:v1
crane tag nginx:latest v1.0.0
crane delete ghcr.io/app:v1
crane ls ghcr.io/app
crane validate --remote ghcr.io/app
Examples:
- crane copy nginx:latest ghcr.io/nginx:latest
- crane tag nginx:latest v1.0.0
- crane ls ghcr.io/app
manifest-and-digest
Inspect manifests, digests, and export images for offline analysis.
Parameters:
image (string): Image reference to inspect
output (string): Output tar file for export
Commands:
crane manifest nginx:latest | jq .
crane digest nginx:latest
crane export nginx:latest nginx.tar
crane index ls ghcr.io/app
crane auth login ghcr.io -u user -p pass
Examples:
- crane digest nginx:latest
- crane export nginx:latest /tmp/nginx.tar
- crane manifest nginx:latest | jq -r .mediaType
References
1---2name: "crane"3description: "Manipulates container images and registries with google/crane: copy, move, tag, export, and validate image manifests and digests. Use when working with registry operations, manifest and digest, devops or when the user mentions registry operations, manifest and digest, devops."4license: "MIT"5compatibility: "Requires crane."6metadata:7 source: https://skillmd.com/skills/opknock/crane8 author: Kdesk9 version: 2.0.010 category: devops11allowed-tools: "Glob Grep Read Bash(crane:*)"12---1314Manipulates container images and registries with google/crane: copy, move, tag, export, and validate image manifests and digests.1516## Agentic Workflow: Read -> Reason -> Act (crane)1718You are **crane** (devops/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — devops context for `crane`21- Domain: Manipulates container images and registries with google/crane: copy, move, tag, export, and validate image manifests and digests.22- **registry-operations**: Copy, move, tag, and delete images across registries without a full daemon. — `crane copy nginx:latest ghcr.io/nginx:latest`23- **manifest-and-digest**: Inspect manifests, digests, and export images for offline analysis. — `crane manifest nginx:latest | jq .`24- Check `knowledge` and `prerequisites: crane`2526### 2. Reason — think for `crane`27- For `registry-operations`: Copy, move, tag, and delete images across registries without a full daemon. — decide which checks to run28- For `manifest-and-digest`: Inspect manifests, digests, and export images for offline analysis. — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `crane` tools32- Tools: `Glob`, `Grep`, `Read`, `Crane` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `crane:89c9bbcb`3536# crane Registry Tooling3738Copy, tag, and inspect container images across registries using google/crane — no daemon required.3940## What This Skill Does4142- Copies and moves images between registries (mirroring, air-gapped transfer)43- Reads OCI/Docker manifests and computes digests44- Exports images to tarballs for offline or malware analysis45- Validates images and lists tags/repos46- Auth to private registries with plain or credential helpers4748## When to Use4950- Mirroring images into a private registry51- Pinning digests for supply-chain safety52- Verifying that an image was not tampered with53- Air-gapped environments where `docker pull` is unavailable5455## Real Commands5657```bash58# Copy between registries59crane copy nginx:latest ghcr.io/nginx:latest60crane copy nginx:latest ghcr.io/nginx:latest -p # preserve exact tag list6162# Move / tag / delete63crane move old.example.com/app:v1 new.example.com/app:v164crane tag nginx:latest v1.0.065crane delete ghcr.io/app:v16667# Inspect68crane manifest nginx:latest69crane digest nginx:latest70crane ls ghcr.io/app71crane index ls ghcr.io/app7273# Export and validate74crane export nginx:latest /tmp/nginx.tar75crane validate --remote --tarball /tmp/nginx.tar ghcr.io/app7677# Auth78crane auth login ghcr.io -u user -p pass79```8081## Best Practices8283- Always pin images by digest in production (`image@sha256:...`)84- Use `crane validate --remote` in CI to catch broken images early85- Copy with `-p` when preserving tags matters (e.g. `latest`)86- Verify registry ACLs with `crane auth login` before large transfers8788## Capabilities8990### registry-operations91Copy, move, tag, and delete images across registries without a full daemon.9293**Parameters:**94- `src` (string): Source image or repo reference95- `dest` (string): Destination repo reference96- `tag` (string): Tag to apply9798**Commands:**99- `crane copy nginx:latest ghcr.io/nginx:latest`100- `crane move old.example.com/app:v1 new.example.com/app:v1`101- `crane tag nginx:latest v1.0.0`102- `crane delete ghcr.io/app:v1`103- `crane ls ghcr.io/app`104- `crane validate --remote ghcr.io/app`105106**Examples:**107- crane copy nginx:latest ghcr.io/nginx:latest108- crane tag nginx:latest v1.0.0109- crane ls ghcr.io/app110111### manifest-and-digest112Inspect manifests, digests, and export images for offline analysis.113114**Parameters:**115- `image` (string): Image reference to inspect116- `output` (string): Output tar file for export117118**Commands:**119- `crane manifest nginx:latest | jq .`120- `crane digest nginx:latest`121- `crane export nginx:latest nginx.tar`122- `crane index ls ghcr.io/app`123- `crane auth login ghcr.io -u user -p pass`124125**Examples:**126- crane digest nginx:latest127- crane export nginx:latest /tmp/nginx.tar128- crane manifest nginx:latest | jq -r .mediaType129130## References131- [crane CLI Reference](https://github.com/google/go-containerregistry/blob/main/cmd/crane/README.md)132- [go-containerregistry Project](https://github.com/google/go-containerregistry)