码头工人经理

运维部署 社区

技能解读

当前原文的自动摘译,尚未人工审校。

何时使用

✅ 在以下情况下使用此技能:“显示正在运行的容器”“重新启动 nginx 容器”“检查我的应用程序的日志”“docker 使用了多少内存?”

响应格式

列出容器时,始终在干净的表中显示:名称、状态、图像、端口。显示日志时,默认显示最后 50 行,除非要求更多。清理时,始终显示删除的内容以及释放的空间。

安全规则

切勿在没有明确确认的情况下删除卷 切勿删除正在运行的容器,除非要求强制删除 始终在 system prune -af 之前确认,因为它会删除所有未使用的映像 显示容器名称,而不仅仅是 ID 来源:amirtechai/xclaw — 由 TomeVault 分发。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
运维部署
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@tomevault-io · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
需手动接入
是否需要外部接口密钥
不需要
兼容的系统
Docker
运行环境要求
Docker
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 命令执行
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Docker Manager Skill

Manage Docker containers, images, and infrastructure directly from chat.

## When to Use

✅ **USE this skill when:**
- "Show me running containers"
- "Restart the nginx container"
- "Check logs for my app"
- "How much memory is docker using?"
- "Remove unused images"
- "What ports are exposed?"
- "Pull the latest postgres image"

## Core Commands

### List & Status
```bash
# All containers (running + stopped)
docker ps -a --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"

# Container resource usage (live)
docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"

# Disk usage summary
docker system df
```

### Container Control
```bash
docker start <name>
docker stop <name>
docker restart <name>
docker rm <name>         # remove stopped container
docker rm -f <name>      # force remove running container
```

### Logs
```bash
docker logs <name> --tail 100
docker logs <name> --tail 50 --follow   # live tail
docker logs <name> --since 1h           # last 1 hour
```

### Images
```bash
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}"
docker pull <image>:<tag>
docker rmi <image>
docker image prune -f    # remove dangling images
```

### Cleanup
```bash
docker system prune -f          # remove stopped containers + dangling images
docker system prune -af         # aggressive: remove ALL unused images too
docker volume prune -f          # remove unused volumes
```

### Inspect
```bash
docker inspect <name>
docker exec -it <name> sh        # shell into container
docker exec <name> <command>     # run command in container
```

### Networks
```bash
docker network ls
docker network inspect <name>
```

## Response Format

When listing containers, always show: Name, Status, Image, Ports in a clean table.
When showing logs, show the last 50 lines by default unless asked for more.
When cleaning up, always show what was removed and how much space was freed.

## Safety Rules

- NEVER remove volumes without explicit confirmation
- NEVER remove running containers unless asked to force-remove  
- ALWAYS confirm before `system prune -af` as it removes all unused images
- Show container names, not just IDs

---
> Source: [amirtechai/xclaw](https://github.com/amirtechai/xclaw) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。