home / skills / openclaw / skills / moltbot-docker

moltbot-docker skill

/skills/mkrdiop/moltbot-docker

This skill helps you manage Docker containers, images, and stacks by executing trusted commands and summarizing results.

npx playbooks add skill openclaw/skills --skill moltbot-docker

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1000 B
---
name: Docker Manager
description: Enables the bot to manage Docker containers, images, and stacks.
author: YourName
version: 1.0.0
bins: ["docker"]
---

# 🐳 Docker Management Skill

You are a Docker expert. Use the `exec` tool to run Docker commands to help the user manage their containers and images.

## Common Operations

### Container Management
- **List running:** `docker ps`
- **List all:** `docker ps -a`
- **Start/Stop:** `docker start <name>` or `docker stop <name>`
- **View Logs:** `docker logs <name> --tail 100`
- **Stats:** `docker stats --no-stream`

### Image Management
- **List images:** `docker images`
- **Cleanup:** `docker system prune -f`

## Safety Rules
1. **Always** ask for confirmation before running `docker rm`, `docker rmi`, or `docker system prune`.
2. If a command returns a massive wall of text, summarize it for the user.
3. If the user asks "What's wrong with my container?", run `docker logs` and `docker inspect` to diagnose.

Overview

This skill enables the bot to manage Docker containers, images, and stacks so you can inspect, control, and clean up your Docker environment quickly. It provides the common commands and safe workflows needed to list, start, stop, log, and prune Docker resources. The skill emphasizes confirmation for destructive actions and produces concise summaries for long outputs.

How this skill works

The skill runs standard Docker CLI operations to inspect container state, fetch logs, show stats, and manipulate images and containers. For diagnostics it combines docker logs and docker inspect to identify errors and configuration issues. For cleanup, it performs controlled prune and remove actions only after explicit user confirmation.

When to use it

  • You need to list running or stopped containers and their status.
  • You want to view recent container logs to diagnose failures.
  • You need to start, stop, or restart a container quickly.
  • You want to check resource usage with docker stats.
  • You need to remove unused images, containers, or prune the system safely.

Best practices

  • Always confirm before running destructive commands like docker rm, docker rmi, or docker system prune.
  • Capture only the relevant portion of logs (tail) and summarize large outputs.
  • Inspect containers with docker inspect before removing to verify volumes or network attachments.
  • Use descriptive container and image names to avoid accidental operations.
  • Run docker system prune with awareness of dangling images and unused volumes to prevent data loss.

Example use cases

  • Diagnose a failing web service by fetching the last 100 lines of logs and running docker inspect to check environment variables and mounts.
  • List all containers and restart a specific one that is in an unhealthy state.
  • Show current resource usage across containers to identify a memory- or CPU-hungry service.
  • Clean up dangling images and stopped containers after confirming which resources will be removed.
  • Provide step-by-step guidance to snapshot an image and remove an old version safely.

FAQ

How will you handle very large outputs like long logs?

I will show the most relevant tail of the output and provide a concise summary. I can always provide more detail on request.

Will you remove containers or images without asking?

No. I always ask for explicit confirmation before any destructive command such as docker rm, docker rmi, or docker system prune.