Help us improve
Share bugs, ideas, or general feedback.
From ai-skills
Use this skill when a local container won't start, a service is unreachable from the host, a local docker-compose stack is misbehaving, or as the Docker-layer diagnosis step of a local bugfix flow — including when the user describes the symptom without naming Docker — to run a Docker-specific local diagnostic that collects container status, logs, networking, and resource usage and diagnoses issues, applying the SRE or DevOps role for investigation. For multi-scope environment analysis (Docker + Kubernetes + CI runner + drift snapshot + optional auto-fix) use `/env-analyze` instead.
npx claudepluginhub alex-voloshin-dev/ai-skills --plugin ai-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/ai-skills:analyze-local container name, symptom, or issue descriptioncontainer name, symptom, or issue descriptionThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Systematic analysis of the local Docker environment. Collects container status, logs, networking, resource usage, and diagnoses issues. Works standalone or as an entry point for local bugfixing.
Measures whether skills, rules, and agent definitions are actually followed by auto-generating test scenarios at 3 strictness levels and reporting compliance rates with full tool call timelines.
Share bugs, ideas, or general feedback.
Systematic analysis of the local Docker environment. Collects container status, logs, networking, resource usage, and diagnoses issues. Works standalone or as an entry point for local bugfixing.
Read CLAUDE.md (or AGENTS.md) at the project root to identify expected services, tech stack, and local development setup (docker-compose files, service dependencies).
Ask the user:
If invoked as part of a bugfix flow — extract the problem statement from the parent context instead of asking.
Select and apply the role based on the problem type:
| Problem Type | Primary Role | Rationale |
|---|---|---|
| Container crashes, restarts, health checks | Agent(sre-engineer) | Reliability, observability, troubleshooting |
| Networking, DNS, port conflicts, connectivity | Agent(sre-engineer) | K8s/Docker networking diagnostics |
| Dockerfile, image builds, compose config | Agent(devops-engineer) | Container orchestration, Docker expertise |
| CI/CD pipeline failures in local env | Agent(devops-engineer) | Build and deploy pipeline expertise |
| Resource exhaustion (CPU, memory, disk) | Agent(sre-engineer) | Capacity, resource management |
| Application errors visible in logs | Stack-specific role | Agent(java-engineer), Agent(python-engineer), Agent(frontend-engineer) based on service stack |
| General / unclear | Agent(software-engineer) | Broad debugging methodology |
Announce the applied role to the user. If multiple problem types are present, apply multiple roles.
Run the following diagnostic commands to gather the current state. Present results as a structured summary.
// turbo
docker version
docker info --format '{{.OperatingSystem}} | Containers: {{.Containers}} (Running: {{.ContainersRunning}}, Stopped: {{.ContainersStopped}}) | Images: {{.Images}}'
docker system df
Record: Docker version, OS, total containers, disk usage.
// turbo
docker ps -a --format "table {{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}\t{{.State}}"
Record: For each container — name, image, status (Up/Exited/Restarting), ports, uptime.
Flag issues:
Exited or Restarting stateunhealthy health statusIf a docker-compose.yml or compose.yaml is present in the project:
// turbo
docker compose ps -a
docker compose config --services
Record: Compose project name, service list, which services are up/down.
For each container flagged in 3b (or the user-specified service):
docker logs --tail 100 --timestamps <container_name>
Record: Last 100 lines of logs. Look for:
// turbo
docker network ls
docker network inspect <network_name>
For connectivity issues:
docker exec <container> ping -c 2 <target_host>
docker exec <container> nslookup <service_name>
docker port <container>
Record: Networks, container IP assignments, port mappings, DNS resolution.
// turbo
docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}"
Record: CPU %, memory usage/limit, network I/O, block I/O per container.
Flag issues:
// turbo
docker volume ls
docker inspect --format '{{range .Mounts}}{{.Type}}: {{.Source}} -> {{.Destination}} ({{.Mode}}){{"\n"}}{{end}}' <container_name>
Record: Volume mounts, bind mounts, permissions (ro/rw).
Even on a single Docker host, name the methodology applied — this matches the production approach and surfaces gaps:
docker stats reads: Utilization (CPU%, MemPerc), Saturation (memory at limit, swap usage, blocked I/O), Errors (restart count, OOMKilled flag). Reference.analyze-prod skill, Step 4h.Docker-specific telemetry commands beyond Step 3:
// turbo
docker stats --no-stream
docker compose logs -f --since 10m
docker inspect --format='{{json .State.Health}}' <container>
docker inspect --format='{{.State.OOMKilled}} {{.State.ExitCode}} {{.State.RestartCount}}' <container>
If the local stack mirrors prod observability (Promtail/Loki + Grafana, Prometheus + cadvisor, Jaeger/Tempo via OTel collector) — query those directly using the same patterns documented in analyze-prod Step 4i.
Using the applied role's expertise, analyze the collected data:
<common_issues>
docker inspect for OOMKilled), health check failing, application crash loop, dependency not readyStructure the diagnosis as:
## Environment Summary
- Docker: [version], [OS]
- Containers: [running]/[total] | Compose: [yes/no]
- Disk usage: [used/available]
## Findings
### [Issue 1: title]
- **Symptom**: what was observed
- **Evidence**: specific log lines, metrics, or status
- **Root cause**: why it's happening
- **Severity**: critical / warning / info
### [Issue 2: title]
...
## Recommendations
1. [Fix for issue 1] — [command or config change]
2. [Fix for issue 2] — [command or config change]
...
## Environment Health: [HEALTHY | DEGRADED | CRITICAL]
Based on the diagnosis:
Agent(devops-engineer) patternsAfter applying any fix, re-run the relevant diagnostic commands from Step 3 to verify the fix resolved the issue.
Present the completed analysis:
/bugfix (environment diagnostics step)Agent(devops-engineer), Agent(sre-engineer)