Guide · Agent skill
How to use the Docker Container Forensics agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The analyzing-docker-container-forensics skill gives an AI agent a structured playbook for investigating a Docker container that may have been compromised. It is aimed at incident responders, security engineers auditing container setups, and students learning the method. After following this guide, you will know how to install the skill, ask for an investigation in plain language, and review what the agent does at each stage.
Quick start
- 1Download and unzip the skill. Download the ZIP from this page and unzip it into ~/.claude/skills/ for a personal install or into a project's .claude/skills/ folder.
- 2Or upload it in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP instead.
- 3Check your requirements. Confirm Docker CLI access, Python 3, dive and container-diff are available, and that you can reach the Docker host filesystem.
- 4Describe the incident. Ask the agent in plain language, giving the container ID and whether it is still running.
- 5Preserve evidence first. Let the agent export the filesystem, save logs and inspect output, and hash the evidence before any analysis.
- 6Review layers and configuration. Ask for image layer analysis and a configuration check for privileged mode, capabilities, mounts and networking.
- 7Record your findings. Keep the case folder, hashes and reports together so your team can review what was done.
What does the skill make the agent do?
Agent skills are folders of instructions and optional scripts that an AI agent loads when a request matches them. This one covers Docker container forensics. The agent follows a workflow taken from the skill's SKILL.md file rather than improvising.
The workflow has four main stages: preserving evidence from the container, analyzing image layers, examining artifacts on the Docker host, and reviewing filesystem changes. Along the way it flags risky container settings such as privileged mode, host networking, dangerous Linux capabilities and sensitive mounts.
- Preserve state: export the container filesystem, save logs and inspect output, and hash the exported files.
- Analyze image layers with tools such as dive and container-diff.
- Check the Docker host data directory and container configuration files.
- Review filesystem changes with docker diff and flag suspicious added files.
- Run a bundled Python helper (scripts/agent.py) that can run Docker commands and report security misconfigurations.
How do you install the skill?
Download the skill ZIP from this page. Then choose one of the following options, depending on whether you want the skill available everywhere or only in one project.
For a personal install, unzip the file into ~/.claude/skills/. For a single project, unzip it into that project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.
- Personal: unzip into ~/.claude/skills/
- Project only: unzip into the project's .claude/skills/ folder
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
What do you need before you start?
The skill assumes you already have working Docker access and some forensic background. The source lists these requirements, and the agent cannot provide them for you.
Access to the Docker host filesystem matters most. You can work from a forensic image of the host or from the live host, but the live option carries the risks described in the safety section.
- Docker CLI and access to the Docker daemon
- Python 3
- dive and container-diff for image analysis
- Trivy or Grype for vulnerability scanning (optional)
- Access to the Docker host filesystem, either a forensic image or the live host
- Familiarity with Docker's layered filesystem (overlay2, aufs) and daemon socket security
How do you trigger the skill with a natural request?
You do not need to type a command to use the skill. Describe the situation in plain language and mention containers, Docker or the container ID. The agent should match the request to the skill's description: investigating compromised containers, analyzing images, layers, volumes, logs and runtime artifacts.
Give the agent as much context as you can, such as the container ID, whether it is still running, and where your case folder is. Requests like these fit the skill's use cases in the source.
- "Investigate container abc123def456 on this host. It may have been compromised. Start by preserving its state."
- "Check whether this nginx-based image has any unexpected files compared with the base image."
- "Audit our docker-compose containers for privileged mode, host networking and risky mounts."
- "Analyze the layers of this suspicious image pulled from a registry."
What does an investigation look like in practice?
A typical run starts with evidence collection. The skill's first step saves the container list, the docker inspect output, the filesystem export, the logs and the process list into a case folder, then hashes the exported files with sha256sum. Only after that does it move on to analysis.
Next, the agent checks the image layers and the host data directory. It then reads the container's configuration and runs a security check on the inspect output. The check reports mounts, privileged mode, added capabilities, PID and network namespace sharing, the container user, and environment variable names that look like secrets, with values redacted.
docker inspect $CONTAINER_ID > /cases/case-2024-001/docker/container_inspect.jsonWhat are the safety limits?
Some commands in the workflow change or interact with a running workload. The source lists docker commit, docker cp and docker exec among them. Do not run the skill against a live production system without a change plan that accounts for these effects.
The skill is a guide, not a certified process. If the investigation may lead to legal action, have a qualified forensic examiner review the method and the chain of custody. The skill also lists network use, and the install steps for dive and container-diff download files from the internet, so review those downloads before running them. Bundled scripts run on your machine, so read scripts/agent.py before you run it.
- Get a change plan approved before running docker commit, docker cp or docker exec on live systems.
- Prefer a forensic image of the host where possible.
- Have a qualified examiner review any investigation that may go to court.
What people use it for
- Responding to a suspected breach in a containerized web application.
- Checking a container image pulled from a registry for unexpected files or tools.
- Auditing Docker Compose or container configurations for privileged mode, host networking or sensitive mounts.
- Learning the method of container forensics through a step-by-step workflow.
Frequently asked questions
Is the Docker Container Forensics skill free?
The skill is licensed under Apache-2.0, as listed on this page. Check the license file in the ZIP for the full terms. Tools it recommends, such as dive, container-diff, Trivy or Grype, have their own licenses.
What do I need to run the analyzing-docker-container-forensics skill?
You need Docker CLI access to the Docker daemon, Python 3, dive and container-diff, and access to the Docker host filesystem. Trivy or Grype is optional for vulnerability scanning. The skill runs scripts and uses the network.
Where do I put the skill folder so my agent can find it?
For a personal install, unzip it into ~/.claude/skills/. For one project, use the project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.
Can I use this skill on a live production container?
Only with a change plan. The workflow includes docker commit, docker cp and docker exec, which alter or interact with running workloads. Using a forensic image of the host reduces this risk.
Is the output legally admissible evidence?
Not on its own. The skill is a guide rather than a certified process. For investigations that may go to court, have a qualified forensic examiner review the method and chain of custody.
How does this compare with other container security tools?
This skill is a workflow for an agent, not a scanner. It uses dive and container-diff for layers, docker inspect and docker diff for configuration and changes, and optionally Trivy or Grype for vulnerability scanning. If you only need a vulnerability scan, run Trivy or Grype directly.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you are an incident responder, security engineer or student who needs a repeatable, well-documented method for investigating Docker containers and reviewing their configuration. Pick something else if you need a certified forensic process, or if you want to work on live production systems without a change plan.
Download the skill