From f02de6e188788cee28055aa58c2714d0cf5b9f5c Mon Sep 17 00:00:00 2001 From: Lucas Braga <130006732+LucasBraga2@users.noreply.github.com> Date: Fri, 3 Jul 2026 16:43:46 -0300 Subject: [PATCH 1/2] feat: add docker-compose-dev-generator skill and devops-infinity-loop agent --- .../devops-infinity-loop-specialist.agent.md | 21 +++++ skills/docker-compose-dev-generator/SKILL.md | 78 +++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 agents/devops-infinity-loop-specialist.agent.md create mode 100644 skills/docker-compose-dev-generator/SKILL.md diff --git a/agents/devops-infinity-loop-specialist.agent.md b/agents/devops-infinity-loop-specialist.agent.md new file mode 100644 index 000000000..60cb8bba6 --- /dev/null +++ b/agents/devops-infinity-loop-specialist.agent.md @@ -0,0 +1,21 @@ +--- +name: devops-infinity-loop-specialist +description: A Senior DevOps Engineer guiding you through CI/CD, containerization, and the entire Plan to Monitor loop. +model: gpt-4 +tools: [] +--- + +You are a Senior DevOps and Site Reliability Engineer (SRE). Your goal is to help developers implement the DevOps Infinity Loop (Plan → Code → Build → Test → Release → Deploy → Operate → Monitor). + +Your expertise includes: +- Containerization (Docker, Kubernetes) +- CI/CD Pipelines (GitHub Actions, GitLab CI, Azure DevOps) +- Infrastructure as Code (Terraform, Ansible) +- Monitoring & Observability (Prometheus, Grafana, OpenTelemetry) + +When interacting with the user: +1. Always identify which phase of the DevOps loop their question belongs to. +2. Provide secure, scalable, and automated solutions. +3. Emphasize "Shift-Left" security and automated testing. +4. Give practical, copy-pasteable code snippets for pipelines or IaC when applicable. +5. Keep responses concise, highly technical, and focused on operational excellence. diff --git a/skills/docker-compose-dev-generator/SKILL.md b/skills/docker-compose-dev-generator/SKILL.md new file mode 100644 index 000000000..932e6e9fc --- /dev/null +++ b/skills/docker-compose-dev-generator/SKILL.md @@ -0,0 +1,78 @@ +--- +name: docker-compose-dev-generator +description: Generates a complete docker-compose.yml tailored for local development with hot-reload and healthchecks +--- + +# Docker Compose Dev Generator + +This skill instructs GitHub Copilot to analyze your project stack and generate a highly optimized `docker-compose.yml` file specifically designed for local development. + +## When to Use This Skill + +Use this skill when you need to: +- Set up a local development environment for a new or existing project. +- Configure hot-reloading (volume mapping) so code changes reflect immediately without rebuilding containers. +- Add local infrastructure dependencies like databases (PostgreSQL, MySQL, MongoDB) or caching (Redis) with proper healthchecks. + +## Prerequisites + +- Docker Desktop or Docker Engine installed. +- A basic understanding of the project's stack (e.g., Node.js, Python, React). +- GitHub Copilot Chat active in your IDE. + +## Core Capabilities + +### 1. Stack Detection +Analyzes your current workspace (e.g., `package.json`, `requirements.txt`) to automatically determine the required services and base images. + +### 2. Hot-Reloading Configuration +Maps local directories to container volumes, allowing developers to see changes in real-time without restarting the container. + +### 3. Service Orchestration & Healthchecks +Automatically configures `depends_on` and `healthcheck` blocks to ensure services (like an API) only start after their dependencies (like a database) are fully ready to accept connections. + +## Usage Examples + +### Example 1: Standard Web Stack +**User prompt:** +> "@workspace Generate a docker-compose file for local development for this project. It uses Node.js and needs a PostgreSQL database." + +### Example 2: Frontend with Hot-Reload +**User prompt:** +> "Create a docker-compose.yml for my React application with hot-reloading enabled and map it to port 3000." + +## Guidelines + +1. **Use Alpine or Slim images** - Default to lightweight base images for faster build times in local environments. +2. **Implement Named Volumes** - Always use named volumes for database data persistence so data isn't lost when containers stop. +3. **Explicit Port Mapping** - Clearly map container ports to host ports to avoid conflicts (e.g., `5432:5432`). + +## Common Patterns + +### Pattern: API + Database +```yaml +services: + api: + build: . + ports: + - "8080:8080" + volumes: + - .:/usr/src/app + - /usr/src/app/node_modules + depends_on: + db: + condition: service_healthy + + db: + image: postgres:15-alpine + environment: + POSTGRES_USER: devuser + POSTGRES_PASSWORD: devpassword + POSTGRES_DB: devdb + ports: + - "5432:5432" + healthcheck: + test: ["CMD-SHELL", "pg_isready -U devuser"] + interval: 5s + timeout: 5s + retries: 5 From a82608fe9a6ddd025405ba73741ec3a53ca50d98 Mon Sep 17 00:00:00 2001 From: Lucas Braga <130006732+LucasBraga2@users.noreply.github.com> Date: Fri, 3 Jul 2026 16:56:15 -0300 Subject: [PATCH 2/2] docs: add reference template as extra asset --- .../examples/template-node-postgres.yml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 skills/docker-compose-dev-generator/examples/template-node-postgres.yml diff --git a/skills/docker-compose-dev-generator/examples/template-node-postgres.yml b/skills/docker-compose-dev-generator/examples/template-node-postgres.yml new file mode 100644 index 000000000..35426fc93 --- /dev/null +++ b/skills/docker-compose-dev-generator/examples/template-node-postgres.yml @@ -0,0 +1,25 @@ +# Reference template generated by the docker-compose-dev-generator skill +services: + app: + build: . + ports: + - "3000:3000" + volumes: + - .:/usr/src/app + - /usr/src/app/node_modules + depends_on: + db: + condition: service_healthy + db: + image: postgres:15-alpine + environment: + POSTGRES_USER: devuser + POSTGRES_PASSWORD: devpassword + POSTGRES_DB: devdb + ports: + - "5432:5432" + healthcheck: + test: ["CMD-SHELL", "pg_isready -U devuser"] + interval: 5s + timeout: 5s + retries: 5