# Docker Destructive Guardrails

Use this skill before running, or recommending, any Docker command that deletes, wipes...

- Repository: https://github.com/docker/skills (609 stars)
- Category: DevOps
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add docker/skills --skill docker-destructive-guardrails -g -a claude-code -y`
Codex: `npx skills add docker/skills --skill docker-destructive-guardrails -g -a codex -y`
Cursor: `npx skills add docker/skills --skill docker-destructive-guardrails -g -a cursor -y`
Gemini CLI: `npx skills add docker/skills --skill docker-destructive-guardrails -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add docker/skills`

## Description

Use this skill before running, or recommending, any Docker command that deletes, wipes, resets, or otherwise irreversibly changes state, even if the user just says to "clean up", "clear the cache", "start fresh", "wipe everything", "nuke it", "reset", "force remove", or "tear down" Docker resources. Covers generic Docker CLI destructive operations not owned by a more specific skill, `docker rm`, `docker rm -f`, `docker container prune`, `docker kill`, `docker system prune`, `docker rmi`/`docker image rm`, `docker image prune -a`, `docker network rm`, `docker network prune`, `docker builder prune`, `docker buildx rm`, `docker context rm`, and standalone (non-Compose) `docker volume rm`/`docker volume prune`. Also indexes destructive commands owned by other Docker skills (Compose, sandbox, Desktop). Core rule, state exactly what will be lost and get explicit confirmation first, except narrow, low-friction Tier 1 container cleanup.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Docker Destructive Command Guardrails

## Overview

This skill provides the cross-product policy for handling destructive or irreversible Docker CLI operations: commands that delete data, remove resources, or otherwise cannot be undone. Use it whenever a task could reasonably lead to running one of these commands, even if the user never names the command directly. It covers the generic Docker CLI commands with no home in a more specific skill, and it indexes where other destructive commands (Compose, sandbox, Desktop) are documented.

## When to use this skill

Activate this skill when:

- The user asks to "clean up", "clear the cache", "start fresh", "wipe everything", "nuke it", "reset", "force remove", or "tear down" Docker resources without naming a specific command
- The agent is considering `docker rm`, `docker rm -f`, `docker container prune`, `docker kill`, `docker stop`, `docker system prune`, `docker rmi`, `docker image rm`, `docker image prune -a`, `docker network rm`, `docker network prune`, `docker builder prune`, `docker buildx rm`, `docker context rm`, or standalone (non-Compose) `docker volume rm`/`docker volume prune` as a fix for an unrelated problem (disk space, a stuck container, a stale network, a broken build cache, an old builder or volume)
- The user wants a cross-product overview of destructive commands across Docker skills

## Do not use this skill when

Do not use this skill when:

- The destructive command in question is Compose-specific (`docker compose down -v`, `docker compose rm -v`, `docker volume rm`/`docker volume prune` in a Compose project), use `docker-compose-patterns` directly, which owns that guidance in full detail
- The task is authoring or reviewing a Dockerfile or `compose.yaml` with no cleanup or deletion involved
- The operation is non-Docker (git, filesystem, cloud resources), this skill covers Docker CLI operations only

## Core guidance

The rest: https://github.com/docker/skills/blob/HEAD/skills/docker-destructive-guardrails/SKILL.md
