/agent-almanac:setup-container-registryfrom agent-almanac
Configures container image registries (ghcr.io, Docker Hub, Harbor) with automated scanning, tagging, retention policies, and CI/CD integration. Use for private registry setup, migration, or vulnerability scanning.
Ships in agent-almanac. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Configure production-ready container registries with security scanning, access control, and automated CI/CD integration.
See Extended Examples for complete configuration files and templates.
Set up GitHub Container Registry with personal access tokens and CI/CD integration.
# Create GitHub Personal Access Token
# Go to: Settings → Developer settings → Personal access tokens → Tokens (classic)
# Required scopes: write:packages, read:packages, delete:packages
# Login to ghcr.io
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
# Verify login
docker info | grep -A 5 "Registry:"
# Tag image for ghcr.io
docker tag myapp:latest ghcr.io/USERNAME/myapp:latest
docker tag myapp:latest ghcr.io/USERNAME/myapp:v1.0.0
# Push image
docker push ghcr.io/USERNAME/myapp:latest
docker push ghcr.io/USERNAME/myapp:v1.0.0
# Configure in GitHub Actions
cat > .github/workflows/docker-build.yml <<'EOF'
name: Build and Push Docker Image
on:
push:
branches: [main]
tags: ['v*']
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix={{branch}}-
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
EOF
# Make package public (default is private)
# Go to: github.com/USERNAME?tab=packages → Select package → Package settings → Change visibility
# Pull image (public packages don't require authentication)
docker pull ghcr.io/USERNAME/myapp:latest
Expected: GitHub token has package permissions. Docker login succeeds. Images push to ghcr.io with proper tagging. GitHub Actions workflow builds multi-architecture images with automated tagging. Package visibility configured correctly.
On failure: For authentication errors, verify token has write:packages scope and hasn't expired. For push failures, check repository name matches image name (case-sensitive). For workflow failures, verify permissions: packages: write is set. For public packages not accessible, wait up to 10 minutes for visibility change to propagate.
Set up Docker Hub repository with access tokens and vulnerability scanning.
# Create Docker Hub access token
# Go to: hub.docker.com → Account Settings → Security → New Access Token
# Login to Docker Hub
echo $DOCKERHUB_TOKEN | docker login -u USERNAME --password-stdin
# Create repository
# Go to: hub.docker.com → Repositories → Create Repository
# Select: public or private, enable vulnerability scanning (Pro/Team plan)
# Tag for Docker Hub
docker tag myapp:latest USERNAME/myapp:latest
docker tag myapp:latest USERNAME/myapp:v1.0.0
# Push to Docker Hub
docker push USERNAME/myapp:latest
docker push USERNAME/myapp:v1.0.0
# Configure automated builds (legacy feature, deprecated)
# Modern approach: Use GitHub Actions with Docker Hub
cat > .github/workflows/dockerhub.yml <<'EOF'
name: Docker Hub Push
on:
push:
branches: [main]
tags: ['v*']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/myapp:latest
${{ secrets.DOCKERHUB_USERNAME }}/myapp:${{ github.ref_name }}
build-args: |
BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
VCS_REF=${{ github.sha }}
- name: Update Docker Hub description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/myapp
readme-filepath: ./README.md
EOF
# View vulnerability scan results
# Go to: hub.docker.com → Repository → Tags → View scan results
# Configure webhook for automated triggers
# Go to: Repository → Webhooks → Add webhook
WEBHOOK_URL="https://example.com/webhook"
curl -X POST https://hub.docker.com/api/content/v1/repositories/USERNAME/myapp/webhooks \
-H "Authorization: Bearer $DOCKERHUB_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"name\":\"CI Trigger\",\"webhook_url\":\"$WEBHOOK_URL\"}"
Expected: Docker Hub access token created with read/write permissions. Images push successfully with multi-architecture support. Vulnerability scans run automatically (if enabled). README syncs from GitHub. Webhooks trigger on image push.
On failure: For rate limit errors, upgrade to Pro plan or implement pull-through cache. For scan failures, verify plan includes scanning (not available on free tier). For multi-arch build failures, ensure QEMU installed with docker run --privileged --rm tonistiigi/binfmt --install all. For webhook failures, verify endpoint is publicly accessible and returns 200 OK.
Install Harbor with Helm for enterprise registry with RBAC and replication.
# Add Harbor Helm repository
helm repo add harbor https://helm.gopharbor.io
helm repo update
# Create namespace
kubectl create namespace harbor
# Create values file
cat > harbor-values.yaml <<EOF
expose:
type: ingress
tls:
enabled: true
certSource: secret
secret:
secretName: harbor-tls
ingress:
hosts:
core: harbor.example.com
className: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
externalURL: https://harbor.example.com
persistence:
enabled: true
persistentVolumeClaim:
registry:
size: 200Gi
storageClass: gp3
database:
size: 10Gi
storageClass: gp3
harborAdminPassword: "ChangeMe123!"
database:
type: internal # Use external: postgres for production
redis:
type: internal # Use external: redis for production
trivy:
enabled: true
skipUpdate: false
notary:
enabled: true # Image signing
chartmuseum:
enabled: true # Helm chart storage
EOF
# Install Harbor
helm install harbor harbor/harbor \
--namespace harbor \
--values harbor-values.yaml \
--timeout 10m
# Wait for pods to be ready
kubectl get pods -n harbor -w
# Get admin password
kubectl get secret -n harbor harbor-core -o jsonpath='{.data.HARBOR_ADMIN_PASSWORD}' | base64 -d
# Access Harbor UI
echo "Harbor UI: https://harbor.example.com"
echo "Username: admin"
# Login via Docker CLI
docker login harbor.example.com
# Username: admin
# Password: (from above)
# Create project via API
curl -u "admin:$HARBOR_PASSWORD" -X POST \
https://harbor.example.com/api/v2.0/projects \
-H "Content-Type: application/json" \
-d '{
"project_name": "myapp",
"public": false,
"metadata": {
"auto_scan": "true",
"severity": "high",
"enable_content_trust": "true"
}
}'
# Tag and push to Harbor
docker tag myapp:latest harbor.example.com/myapp/app:latest
docker push harbor.example.com/myapp/app:latest
# Configure robot account for CI/CD
# UI: Administration → Robot Accounts → New Robot Account
# Permissions: Pull, Push to specific projects
# Use robot account in CI/CD
docker login harbor.example.com -u 'robot$myapp-ci' -p "$ROBOT_TOKEN"
Expected: Harbor deploys to Kubernetes with PostgreSQL and Redis. Ingress configured with TLS. Admin UI accessible. Projects created with vulnerability scanning enabled. Robot accounts provide CI/CD authentication. Trivy scans images on push.
On failure: For database connection errors, check PostgreSQL pod logs with kubectl logs -n harbor harbor-database-0. For Ingress issues, verify DNS points to LoadBalancer and cert-manager issued certificate. For Trivy failures, check if vulnerability database downloaded successfully. For storage issues, verify PVCs bound with kubectl get pvc -n harbor.
Configure semantic versioning, immutable tags, and automatic cleanup.
# Tagging best practices
# 1. Semantic versioning
docker tag myapp:latest harbor.example.com/myapp/app:v1.2.3
docker tag myapp:latest harbor.example.com/myapp/app:v1.2
docker tag myapp:latest harbor.example.com/myapp/app:v1
docker tag myapp:latest harbor.example.com/myapp/app:latest
# ... (see EXAMPLES.md for complete configuration)
Expected: Images tagged with semantic versions, commit SHAs, and environment labels. Retention policies automatically clean old images based on age, pull activity, or count limits. Production tags (v* pattern) retained longer than development branches. Untagged images deleted to save storage.
On failure: For retention not triggering, verify cron schedule syntax and Harbor timezone settings. For accidental deletion of production images, implement immutable tags with Harbor tag immutability rules. For storage still growing, check artifact retention includes Helm charts and other OCI artifacts. For policy conflicts, ensure retention rules use or algorithm and don't contradict each other.
Set up registry authentication for Kubernetes clusters.
# Create Docker registry secret
kubectl create secret docker-registry ghcr-secret \
--docker-server=ghcr.io \
--docker-username=USERNAME \
--docker-password=$GITHUB_TOKEN \
[email protected] \
# ... (see EXAMPLES.md for complete configuration)
Expected: Image pull secrets created in target namespaces. Pods successfully pull images from private registries. Service accounts include imagePullSecrets. No ImagePullBackOff errors.
On failure: For authentication errors, verify credentials with docker login manually. For secret not found, check namespace matches Pod namespace. For still failing, decode secret and verify JSON structure with kubectl get secret ghcr-secret -o jsonpath='{.data.\.dockerconfigjson}' | base64 -d | jq. For token expiration, rotate credentials and update secrets.
Integrate Trivy scanning and Cosign for image provenance.
# Install Trivy CLI
wget https://github.com/aquasecurity/trivy/releases/latest/download/trivy_0.47.0_Linux-64bit.tar.gz
tar zxvf trivy_0.47.0_Linux-64bit.tar.gz
sudo mv trivy /usr/local/bin/
# Scan local image
# ... (see EXAMPLES.md for complete configuration)
Expected: Trivy scans detect vulnerabilities with severity ratings. SARIF results upload to GitHub Security tab. Critical vulnerabilities fail CI/CD builds. Cosign signs images with keypair or keyless (Fulcio). Verification succeeds for signed images. Kyverno blocks unsigned images in Kubernetes.
On failure: For Trivy database download failures, run trivy image --download-db-only. For false positives, create .trivyignore file with CVE IDs and justifications. For Cosign signature failures, verify image digest hasn't changed (signatures apply to specific digest, not tags). For Kyverno policy failures, check image reference pattern matches actual image names. For keyless signing, verify OIDC token has sufficient permissions.
Public images by default: GitHub packages are private by default, Docker Hub public. Verify visibility settings match security requirements.
Token expiration: Personal access tokens expire, breaking CI/CD. Use non-expiring tokens for automation or implement rotation.
Untagged image accumulation: Build process creates untagged images consuming storage. Enable automatic cleanup of untagged artifacts.
Missing multi-arch support: Builds only amd64, fails on ARM instances. Use docker buildx with --platform flag for cross-platform builds.
No rate limit protection: Free Docker Hub accounts limited to 100 pulls/6h. Implement pull-through cache or upgrade plan.
Mutable tags: latest tag overwritten breaks reproducibility. Use immutable tags (commit SHA, semantic version) for production.
Insecure registry communication: Self-hosted registry without TLS. Always use HTTPS with valid certificates.
No access control: Single credential shared across teams. Implement RBAC with project-specific robot accounts.
create-r-dockerfile - Building container images for registryoptimize-docker-build-cache - Efficient image builds for registry pushbuild-ci-cd-pipeline - Automated registry push in CI/CDdeploy-to-kubernetes - Pulling images from registryimplement-gitops-workflow - Image promotion between registriesWhat SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (pjt222/agent-almanac) — no native marketplace selected
npx claudepluginhub p/pjt222-agent-almanac377 skills in this plugin
/adapt-architectureExecute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.
/adapticMaster skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.
/add-puzzle-typeScaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.
Other plugins' skills for the same job