AgentSkillsCN

dev

管理Docker Compose开发环境。

SKILL.md
--- frontmatter
name: dev
description: Manage Docker Compose dev environment

Dev Skill

Manage the Docker Compose development stack.

Usage

code
/dev <command>

Commands:

  • /dev start - Build and start all services
  • /dev stop - Stop all services
  • /dev clean - Full reset (stop + remove volumes)
  • /dev status - Show running containers and URLs
  • /dev logs [service] - Tail recent logs (optionally for a specific service)
  • /dev restart [service] - Restart all or a specific service
  • /dev migrate - Run pending Alembic migrations
  • /dev test - Run backend pytest suite

Cross-Platform Notes

All commands use docker compose directly (no make dependency). Works on Linux, macOS, and Windows with Docker Desktop.

Windows (PowerShell): Do not chain commands with &&. Use ; or run commands sequentially.

Commands

/dev start

Build and start all services:

bash
docker compose up --build -d

Then verify and show status:

bash
docker compose ps

Show the user the service URLs:

Note: First start will be slow (Docker builds + dependency installs). Subsequent starts reuse caches.

/dev stop

Stop all containers (preserves volumes for faster restart):

bash
docker compose down

/dev clean

Full reset — stop containers and remove all volumes:

bash
docker compose down -v --remove-orphans

/dev status

Show running containers and their status:

bash
docker compose ps

Then display the URL summary for the user.

/dev logs [service]

Show recent logs. Always use --tail to protect the context window.

bash
# All services
docker compose logs --tail 50

# Specific service
docker compose logs --tail 50 <service>

Common service names: fastapi_server, frontend, caddy_reverse_proxy, database

/dev restart [service]

Restart all or a specific service:

bash
# All services
docker compose restart

# Specific service
docker compose restart <service>

# If Dockerfile changed, rebuild
docker compose up --build <service> -d

/dev migrate

Run pending Alembic migrations:

bash
docker compose exec fastapi_server alembic upgrade head

/dev test

Run the backend test suite:

bash
docker compose exec fastapi_server uv run pytest