DO

docker-logs-snapshot

Generates a reproducible snapshot of Docker container logs and environment metadata for incident analysis.

Install

mkdir -p .claude/skills/docker-logs-snapshot && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15039" && unzip -o skill.zip -d .claude/skills/docker-logs-snapshot && rm skill.zip

Installs to .claude/skills/docker-logs-snapshot

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Capture a quick, reproducible snapshot of Docker/Compose logs and container state for debugging. Use when smoke tests fail or you need attachable evidence.
155 chars✓ has a “when” trigger
Beginner

Key capabilities

  • Capture Docker version information
  • Record Docker Compose version details
  • List running Docker containers with specific formatting
  • Save Docker Compose service status
  • Extract logs from a specified service container
  • Inspect a service container's configuration

How it works

The skill executes a series of Docker and Docker Compose commands to gather system information, container states, and logs, then stores them in a designated output directory.

Inputs & outputs

You give it
Optional SERVICE_CONTAINER name, COMPOSE_FILES flags, LOGS_TAIL line count, and OUT_DIR path
You get back
A timestamped artifact folder containing Docker and Compose snapshots, logs, and inspect data

When to use docker-logs-snapshot

  • Capture logs after test failure
  • Export container state
  • Snapshot Docker environment
  • Gather diagnostic artifacts

About this skill

Skill Instructions

Inputs

  • SERVICE_CONTAINER (string, optional): container to snapshot (e.g. speech-recognition-service)
  • COMPOSE_FILES (string, optional): compose flags (e.g. -f docker-compose.yml -f docker-compose.gpu.yml)
  • LOGS_TAIL (string/int, optional): how many lines (default: 500)
  • OUT_DIR (string, optional): output directory (default: agent-output/live-testing/artifacts)

Procedure

set -euo pipefail

out_dir="${OUT_DIR:-agent-output/live-testing/artifacts}"
logs_tail="${LOGS_TAIL:-500}"
mkdir -p "$out_dir"

stamp="$(date -u +%Y%m%dT%H%M%SZ)"

# 1) Basic inventory
{
  echo "timestamp_utc=$stamp"
  echo "cwd=$(pwd)"
  docker version || true
  docker compose version || true
  echo "---"
  docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}' || true
} > "$out_dir/docker_snapshot_$stamp.txt"

# 2) Compose status (if provided)
if [ -n "${COMPOSE_FILES:-}" ]; then
  docker compose $COMPOSE_FILES ps > "$out_dir/compose_ps_$stamp.txt" || true
fi

# 3) Container-focused logs + inspect
if [ -n "${SERVICE_CONTAINER:-}" ]; then
  docker logs --tail "$logs_tail" "$SERVICE_CONTAINER" > "$out_dir/${SERVICE_CONTAINER}_logs_$stamp.txt" || true
  docker inspect "$SERVICE_CONTAINER" > "$out_dir/${SERVICE_CONTAINER}_inspect_$stamp.json" || true
fi

# 4) Optional: all compose logs (can be noisy)
if [ -n "${COMPOSE_FILES:-}" ]; then
  docker compose $COMPOSE_FILES logs --no-color --tail "$logs_tail" > "$out_dir/compose_logs_$stamp.txt" || true
fi

echo "Wrote artifacts to: $out_dir"

Acceptance Criteria

  • Output directory contains at least:
    • docker_snapshot_<timestamp>.txt
    • and (if SERVICE_CONTAINER set) <service>_logs_<timestamp>.txt and <service>_inspect_<timestamp>.json

Notes

  • Do not paste secrets from logs into chat; attach files or summarize.
  • Prefer --tail to keep snapshots small and reproducible.

When not to use it

  • When sensitive information from logs should not be shared directly
  • When full log history is required instead of a tail

Limitations

  • The skill only captures a specified number of log lines
  • The skill does not filter sensitive data from logs
  • The skill relies on Docker and Docker Compose being installed and accessible

How it compares

This skill automates the collection of diagnostic data into a structured artifact, unlike manually running individual Docker commands.

Compared to similar skills

docker-logs-snapshot side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
docker-logs-snapshot (this skill)06moReviewBeginner
mlops-engineer34moNo flagsAdvanced
senior-devops78moReviewAdvanced
deployment-engineer44moNo flagsAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

mlops-engineer

sickn33

Build comprehensive ML pipelines, experiment tracking, and model registries with MLflow, Kubeflow, and modern MLOps tools. Implements automated training, deployment, and monitoring across cloud platforms. Use PROACTIVELY for ML infrastructure, experiment management, or pipeline automation.

333

senior-devops

davila7

Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup, infrastructure as code, deployment automation, and monitoring. Use when setting up pipelines, deploying applications, managing infrastructure, implementing monitoring, or optimizing deployment processes.

720

deployment-engineer

sickn33

Expert deployment engineer specializing in modern CI/CD pipelines, GitOps workflows, and advanced deployment automation. Masters GitHub Actions, ArgoCD/Flux, progressive delivery, container security, and platform engineering. Handles zero-downtime deployments, security scanning, and developer experience optimization. Use PROACTIVELY for CI/CD design, GitOps implementation, or deployment automation.

418

devops

mrgoonie

Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.

216

server-management

davila7

Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.

113

debug-cluster

openshift

Provides systematic debugging approaches for HyperShift hosted-cluster issues. Auto-applies when debugging cluster problems, investigating stuck deletions, or troubleshooting control plane issues.

25

Search skills

Search the agent skills registry