{"id":"75d7d828-a6c5-4de8-82f6-fcb44f3e3452","shortId":"3adGXE","kind":"skill","title":"Docker Compose Generator","tagline":"Generates production-ready docker-compose.yml files for any application stack.","description":"# Docker Compose Generator\n\n## What this skill does\n\nThis skill directs the agent to gather information about your application stack and produce a production-ready `docker-compose.yml` file. It includes health checks, named volumes, custom networks, environment variable placeholders, restart policies, and sensible resource limits — all things that are easy to miss when writing a Compose file from scratch.\n\nUse this when bootstrapping a new project, when converting an existing app to run in containers, or when you want a solid starting point to customize from.\n\n## How to use\n\n### Claude Code / Cline\n\nCopy this file to `.agents/skills/docker-compose-generator/SKILL.md` in your project root.\n\nThen ask:\n- *\"Use the Docker Compose Generator skill to create a docker-compose.yml for my Node.js app with PostgreSQL and Redis.\"*\n- *\"I have a Python FastAPI backend, a React frontend, and a Postgres database. Use the Docker Compose Generator skill.\"*\n\nThe agent will ask clarifying questions before generating the file if your description is incomplete.\n\n### Cursor / Codex\n\nPaste the instructions from the section below into your session along with a description of your stack.\n\n## The Prompt / Instructions for the Agent\n\nWhen asked to generate a docker-compose.yml, follow these steps:\n\n1. **Gather requirements.** If not already provided, ask for:\n   - The application services (e.g., web server, worker, frontend build)\n   - The data stores (PostgreSQL, MySQL, MongoDB, Redis, etc.) and their versions\n   - The runtime environment (Node.js, Python, Go, etc.) and version\n   - Whether this is for **development** or **production** (they differ significantly)\n   - Any custom ports, domains, or volume paths\n\n2. **Apply these rules to every service:**\n   - Always set a `restart` policy (`unless-stopped` for production, `on-failure` for dev)\n   - Add a `healthcheck` for every database or cache service\n   - Use named volumes (not bind mounts) for persistent data in production\n   - Use a custom named network — do not rely on the default bridge network\n   - Put secrets and credentials in environment variables with `${VAR_NAME}` placeholders, never hardcoded values\n   - Set `depends_on` with `condition: service_healthy` for services that require a healthy DB before starting\n\n3. **For development configs**, also:\n   - Add bind-mount source code for hot reloading (e.g., `./src:/app/src`)\n   - Expose debug ports (e.g., `9229` for Node.js inspector)\n   - Add a `.env.example` reminder comment\n\n4. **For production configs**, also:\n   - Add `deploy.resources.limits` for memory and CPU\n   - Do not expose database ports to the host unless explicitly requested\n   - Use `read_only: true` on containers where the filesystem does not need to be writable\n\n5. **Output:**\n   - The `docker-compose.yml` in a fenced code block\n   - A `.env.example` snippet showing all required variables\n   - A brief \"Next steps\" section (e.g., how to start, how to view logs)\n\n## Example\n\n**Input to Agent:**\n> \"Use the Docker Compose Generator skill. I have a Node.js Express API (port 3000), a PostgreSQL 16 database, and a Redis 7 cache. This is for production.\"\n\n**Output from Agent:**\n\n```yaml\n# docker-compose.yml\nversion: '3.9'\n\nservices:\n  api:\n    build: .\n    restart: unless-stopped\n    ports:\n      - \"3000:3000\"\n    environment:\n      - DATABASE_URL=${DATABASE_URL}\n      - REDIS_URL=${REDIS_URL}\n      - NODE_ENV=production\n    depends_on:\n      postgres:\n        condition: service_healthy\n      redis:\n        condition: service_healthy\n    networks:\n      - app-network\n    deploy:\n      resources:\n        limits:\n          cpus: '1.0'\n          memory: 512M\n\n  postgres:\n    image: postgres:16-alpine\n    restart: unless-stopped\n    environment:\n      - POSTGRES_DB=${POSTGRES_DB}\n      - POSTGRES_USER=${POSTGRES_USER}\n      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}\n    volumes:\n      - postgres-data:/var/lib/postgresql/data\n    networks:\n      - app-network\n    healthcheck:\n      test: [\"CMD-SHELL\", \"pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}\"]\n      interval: 10s\n      timeout: 5s\n      retries: 5\n\n  redis:\n    image: redis:7-alpine\n    restart: unless-stopped\n    command: redis-server --appendonly yes\n    volumes:\n      - redis-data:/data\n    networks:\n      - app-network\n    healthcheck:\n      test: [\"CMD\", \"redis-cli\", \"ping\"]\n      interval: 10s\n      timeout: 5s\n      retries: 5\n\nvolumes:\n  postgres-data:\n  redis-data:\n\nnetworks:\n  app-network:\n    driver: bridge\n```\n\n**.env.example**\n```\nDATABASE_URL=postgresql://user:password@postgres:5432/myapp\nREDIS_URL=redis://redis:6379\nPOSTGRES_DB=myapp\nPOSTGRES_USER=user\nPOSTGRES_PASSWORD=changeme\n```\n\n**Next steps**\n1. Copy `.env.example` to `.env` and fill in real values\n2. `docker compose up -d` to start all services\n3. `docker compose logs -f api` to tail API logs\n\n## Notes\n\n- The generated file is a starting point — review resource limits and port exposure before deploying.\n- The skill does not write a `Dockerfile` for your application image. It assumes your `Dockerfile` already exists in the project root, or will ask you to create one.\n- For multi-environment setups, consider generating separate `docker-compose.override.yml` files for dev and staging. Ask the agent to do this explicitly.\n- Always rotate any credentials in `.env.example` before using them in a real environment.","tags":["docker","compose","generator","openagentskills","notysoty","agent-skills","claude","claude-code","claude-skills","cline","cursor","llm"],"capabilities":["skill","source-notysoty","skill-docker-compose-generator","topic-agent-skills","topic-claude","topic-claude-code","topic-claude-skills","topic-cline","topic-cursor","topic-llm","topic-llm-skills","topic-skills"],"categories":["openagentskills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/Notysoty/openagentskills/docker-compose-generator","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add Notysoty/openagentskills","source_repo":"https://github.com/Notysoty/openagentskills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (5,372 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:13:21.315Z","embedding":null,"createdAt":"2026-05-18T13:20:41.946Z","updatedAt":"2026-05-18T19:13:21.315Z","lastSeenAt":"2026-05-18T19:13:21.315Z","tsv":"'/app/src':358 '/data':588 '/src':357 '/var/lib/postgresql/data':545 '1':202,641 '1.0':516 '10s':564,601 '16':458,522 '2':257,651 '3':342,660 '3.9':475 '3000':455,484,485 '4':372 '5':409,568,605 '512m':518 '5432/myapp':625 '5s':566,603 '6379':629 '7':463,572 '9229':363 'add':279,347,367,377 'agent':25,154,192,441,471,730 'agents/skills/docker-compose-generator/skill.md':109 'along':180 'alpin':523,573 'alreadi':207,701 'also':346,376 'alway':264,735 'api':453,477,665,668 'app':83,129,510,548,591,615 'app-network':509,547,590,614 'appendon':582 'appli':258 'applic':12,31,212,695 'ask':115,156,194,209,709,728 'assum':698 'backend':139 'bind':292,349 'bind-mount':348 'block':417 'bootstrap':75 'bridg':310,618 'brief':426 'build':219,478 'cach':286,464 'changem':638 'check':44 'clarifi':157 'claud':102 'cli':598 'cline':104 'cmd':553,595 'cmd-shell':552 'code':103,352,416 'codex':169 'command':578 'comment':371 'compos':2,15,68,119,150,445,653,662 'condit':330,501,505 'config':345,375 'consid':719 'contain':87,399 'convert':80 'copi':105,642 'cpu':382 'cpus':515 'creat':123,712 'credenti':315,738 'cursor':168 'custom':47,97,251,301 'd':560,655 'data':221,296,544,587,609,612 'databas':146,284,386,459,487,489,620 'db':339,530,532,562,631 'debug':360 'default':309 'depend':327,498 'deploy':512,685 'deploy.resources.limits':378 'descript':165,183 'dev':278,725 'develop':244,344 'differ':248 'direct':23 'docker':1,14,118,149,444,652,661 'docker-compose.override.yml':722 'docker-compose.yml':8,39,125,198,412,473 'dockerfil':692,700 'domain':253 'driver':617 'e.g':214,356,362,430 'easi':62 'env':496,645 'env.example':369,419,619,643,740 'environ':49,233,317,486,528,717,747 'etc':227,237 'everi':262,283 'exampl':438 'exist':82,702 'explicit':392,734 'expos':359,385 'exposur':683 'express':452 'f':664 'failur':276 'fastapi':138 'fenc':415 'file':9,40,69,107,162,673,723 'filesystem':402 'fill':647 'follow':199 'frontend':142,218 'gather':27,203 'generat':3,4,16,120,151,160,196,446,672,720 'go':236 'hardcod':324 'health':43 'healthcheck':281,550,593 'healthi':332,338,503,507 'host':390 'hot':354 'imag':520,570,696 'includ':42 'incomplet':167 'inform':28 'input':439 'inspector':366 'instruct':172,189 'interv':563,600 'isreadi':556 'limit':57,514,680 'log':437,663,669 'memori':380,517 'miss':64 'mongodb':225 'mount':293,350 'multi':716 'multi-environ':715 'myapp':632 'mysql':224 'name':45,289,302,321 'need':405 'network':48,303,311,508,511,546,549,589,592,613,616 'never':323 'new':77 'next':427,639 'node':495 'node.js':128,234,365,451 'note':670 'on-failur':274 'one':713 'output':410,469 'password':538,540,623,637 'past':170 'path':256 'persist':295 'pg':555 'ping':599 'placehold':51,322 'point':95,677 'polici':53,268 'port':252,361,387,454,483,682 'postgr':145,500,519,521,529,531,533,535,537,539,543,558,561,608,624,630,633,636 'postgres-data':542,607 'postgresql':131,223,457 'produc':34 'product':6,37,246,273,298,374,468,497 'production-readi':5,36 'project':78,112,705 'prompt':188 'provid':208 'put':312 'python':137,235 'question':158 'react':141 'read':395 'readi':7,38 'real':649,746 'redi':133,226,462,491,493,504,569,571,580,586,597,611,626,628 'redis-c':596 'redis-data':585,610 'redis-serv':579 'reli':306 'reload':355 'remind':370 'request':393 'requir':204,336,423 'resourc':56,513,679 'restart':52,267,479,524,574 'retri':567,604 'review':678 'root':113,706 'rotat':736 'rule':260 'run':85 'runtim':232 'scratch':71 'secret':313 'section':175,429 'sensibl':55 'separ':721 'server':216,581 'servic':213,263,287,331,334,476,502,506,659 'session':179 'set':265,326 'setup':718 'shell':554 'show':421 'signific':249 'skill':19,22,121,152,447,687 'skill-docker-compose-generator' 'snippet':420 'solid':93 'sourc':351 'source-notysoty' 'stack':13,32,186 'stage':727 'start':94,341,433,657,676 'step':201,428,640 'stop':271,482,527,577 'store':222 'tail':667 'test':551,594 'thing':59 'timeout':565,602 'topic-agent-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-skills' 'topic-cline' 'topic-cursor' 'topic-llm' 'topic-llm-skills' 'topic-skills' 'true':397 'u':557 'unless':270,391,481,526,576 'unless-stop':269,480,525,575 'url':488,490,492,494,621,627 'use':72,101,116,147,288,299,394,442,742 'user':534,536,559,622,634,635 'valu':325,650 'var':320 'variabl':50,318,424 'version':230,239,474 'view':436 'volum':46,255,290,541,584,606 'want':91 'web':215 'whether':240 'worker':217 'writabl':408 'write':66,690 'yaml':472 'yes':583","prices":[{"id":"0f297985-71f8-4f90-9209-b8de4a94ffd0","listingId":"75d7d828-a6c5-4de8-82f6-fcb44f3e3452","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"Notysoty","category":"openagentskills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:20:41.946Z"}],"sources":[{"listingId":"75d7d828-a6c5-4de8-82f6-fcb44f3e3452","source":"github","sourceId":"Notysoty/openagentskills/docker-compose-generator","sourceUrl":"https://github.com/Notysoty/openagentskills/tree/main/skills/docker-compose-generator","isPrimary":false,"firstSeenAt":"2026-05-18T13:20:41.946Z","lastSeenAt":"2026-05-18T19:13:21.315Z"}],"details":{"listingId":"75d7d828-a6c5-4de8-82f6-fcb44f3e3452","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"Notysoty","slug":"docker-compose-generator","github":{"repo":"Notysoty/openagentskills","stars":8,"topics":["agent-skills","claude","claude-code","claude-skills","cline","cursor","llm","llm-skills","skills"],"license":"mit","html_url":"https://github.com/Notysoty/openagentskills","pushed_at":"2026-03-28T06:50:19Z","description":"A  community-driven library of reusable AI agent skills for Claude Code, Cursor, Codex, Cline, and more.","skill_md_sha":"0127532b570d8d2b9aa0ce7025c9bfdbd1c2457a","skill_md_path":"skills/docker-compose-generator/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/Notysoty/openagentskills/tree/main/skills/docker-compose-generator"},"layout":"multi","source":"github","category":"openagentskills","frontmatter":{"name":"Docker Compose Generator","description":"Generates production-ready docker-compose.yml files for any application stack."},"skills_sh_url":"https://skills.sh/Notysoty/openagentskills/docker-compose-generator"},"updatedAt":"2026-05-18T19:13:21.315Z"}}