Skip to content
Back to skills

Compose Gen

ASecurity

Generate docker-compose.yml by scanning your project. Use when containerizing an existing app.

  • 651 stars
  • 0 votes
  • 0 copies
  • 16 views
  • Added February 10, 2026
developmentbashnodedockergitapidatabase

Works with

  • api

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add sundial-org/awesome-openclaw-skills --skill compose-gen --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Compose Gen?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Compose Gen
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sundial-org-compose-gen/badge)](https://www.skillsdirectory.com/skills/sundial-org-compose-gen)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: compose-gen
description: Generate docker-compose.yml by scanning your project. Use when containerizing an existing app.
---

# Compose Gen

Writing docker-compose from scratch is tedious. This tool scans your project, detects services, and generates a working docker-compose.yml. Database, cache, your app, all wired up correctly.

**One command. Zero config. Just works.**

## Quick Start

```bash
npx ai-docker-compose
```

## What It Does

- Scans your project to detect services needed
- Generates docker-compose.yml with proper networking
- Includes database, cache, and queue services as needed
- Sets up volumes for persistence
- Adds health checks and depends_on

## Usage Examples

```bash
# Generate for current project
npx ai-docker-compose

# Specify services manually
npx ai-docker-compose --services postgres,redis,app

# Include development overrides
npx ai-docker-compose --with-dev

# Output to specific file
npx ai-docker-compose > docker-compose.yml
```

## Best Practices

- **Use named volumes** - Don't lose your data on container restart
- **Add health checks** - Make depends_on actually wait for services
- **Separate dev and prod** - Use docker-compose.override.yml for dev settings
- **Pin image versions** - postgres:latest will break eventually

## When to Use This

- Containerizing an existing application
- Don't remember the docker-compose syntax
- Need a quick local development environment
- Setting up a new service and need the boilerplate

## Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

**Find more:**
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgicstudios.com

## Requirements

No install needed. Just run with npx. Node.js 18+ recommended. Requires OPENAI_API_KEY environment variable.

```bash
export OPENAI_API_KEY=sk-...
npx ai-docker-compose --help
```

## How It Works

Scans package.json, requirements.txt, or other config files to detect your stack. Identifies database connections, cache usage, and external service dependencies. Generates docker-compose.yml with appropriate services, networks, and volumes.

## License

MIT. Free forever. Use it however you want.

Files in this skill

  • README.md678 B
  • SKILL.md2.3 KB
  • dist/cli.d.ts31 B
  • dist/cli.js3 KB
  • dist/index.d.ts151 B
  • dist/index.js3.1 KB
  • package-lock.json30.2 KB
  • package.json617 B
  • src/cli.ts1.3 KB
  • src/index.ts1.4 KB
  • tsconfig.json251 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…