Agent skill
docker-compose
Install this agent skill to your Project
npx add-skill https://github.com/cuba6112/skillfactory/tree/main/skills/docker-compose
SKILL.md
Docker Compose Orchestration
Overview
Docker Compose simplifies the management of multi-container applications. It enables service discovery through internal hostnames and provides mechanisms for environment-specific configurations using profiles.
When to Use
- Local Development: Spinning up a full stack (frontend, backend, DB) with one command.
- CI/CD Integration: Running isolated integration tests in containerized environments.
- Microservices: Orchestrating communication between multiple independent services.
Decision Tree
- Do you have services only needed for debugging?
- YES: Use
profilesto keep them optional.
- YES: Use
- Do you need to hide a database from the public proxy?
- YES: Create isolated custom
networks.
- YES: Create isolated custom
- Do you need to connect to a service outside the current YAML file?
- YES: Use
external: truefor that network.
- YES: Use
Workflows
1. Isolating Internal Services
- Define
frontendandbackendcustom networks in the top-levelnetworkskey. - Assign the
proxyservice to thefrontendnetwork. - Assign the
appservice to bothfrontendandbackend. - Assign the
dbservice only to thebackendnetwork to isolate it from the proxy.
2. Environment-Specific Overrides with Profiles
- Add
profiles: [debug]to an optional service (e.g.,phpmyadmin) incompose.yaml. - Run
docker compose upfor standard operations; debug services stay off. - Run
docker compose --profile debug upto include the debugging tools.
3. Using Existing External Networks
- Declare a network in
compose.yamlwithexternal: true. - Link local services to this external network in their
networkssection. - This allows the Compose stack to communicate with containers managed outside the current project.
Non-Obvious Insights
- Service Name as Hostname: Within the default network, you don't need IPs; containers connect via service names (e.g.,
db:5432). - IP Persistence: Configurations changes cause containers to get new IPs, but the hostname (service name) remains consistent, which is why service discovery is essential.
- Implicit Enablement: Services without a
profilesattribute are always enabled regardless of which profiles are requested.
Evidence
- "Each container for a service joins the default network and is... discoverable by the service's name." - Docker Docs
- "Profiles help you adjust your Compose application for different environments... by selectively activating services." - Docker Docs
- "Instead of just using the default app network, you can specify your own networks..." - Docker Docs
Scripts
scripts/docker-compose_tool.py: Python script to generate dynamic Compose YAML files.scripts/docker-compose_tool.js: Node.js script for checking service connectivity within a network.
Dependencies
docker-composedockerengine
References
- references/README.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
prompt-engineering
Comprehensive prompt engineering techniques for Claude models. Use this skill when crafting, optimizing, or debugging prompts for Claude API, Claude Code, or any Claude-powered application. Covers system prompts, role prompting, multishot examples, chain of thought, XML structuring, long context handling, extended thinking, prompt chaining, Claude 4.x-specific best practices, and agentic orchestration including subagents, agent loops, skills, MCP integration, and multi-agent workflows.
adk-rag-agent
Build RAG (Retrieval-Augmented Generation) agents with Google ADK and Vertex AI RAG Engine. Use when implementing document Q&A, knowledge base search, or citation-backed responses. Covers VertexAiRagRetrieval tool, corpus setup, and citation formatting.
headless-cli-agents
Build agentic systems using Claude CLI in headless mode or the Claude Agent SDK. Use when building automation pipelines, CI/CD integrations, multi-agent orchestration, or programmatic Claude interactions. Covers CLI flags (-p, --output-format), session management (--resume, --continue), Python SDK (claude-agent-sdk), custom tools, and agent loop patterns.
notion-knowledge-capture
Capture conversations and decisions into structured Notion pages; use when turning chats/notes into wiki entries, how-tos, decisions, or FAQs with proper linking.
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
gh-fix-ci
Inspect GitHub PR checks with gh, pull failing GitHub Actions logs, summarize failure context, then create a fix plan and implement after user approval. Use when a user asks to debug or fix failing PR CI/CD checks on GitHub Actions and wants a plan + code changes; for external checks (e.g., Buildkite), only report the details URL and mark them out of scope.
Didn't find tool you were looking for?