claude-skills/engineering/skills/git-worktree-manager/references/docker-compose-patterns.md
Reza Rezvani 1851c8fb09 fix(plugins): restructure 9 multi-skill domain plugins into ./skills/ layout
Same root cause as #587/#591 — Claude Code's runtime loader rejects
array-form skills paths like ["./content-production", "./ai-seo", ...]
even when each entry is a valid subdirectory containing SKILL.md.
`claude plugin validate` accepts them but the loader does not.

The proven canonical layout (used by self-improving-agent in #536):

  <plugin>/
  ├── .claude-plugin/plugin.json    skills: "./skills"
  └── skills/
      ├── <skill-1>/SKILL.md
      ├── <skill-2>/SKILL.md
      └── ...

Restructured 9 multi-skill domain plugins:
- business-growth (4 skills moved)
- c-level-advisor (28)
- engineering (36)
- engineering-team (32)
- finance (2)
- marketing-skill (43)
- product-team (12)
- project-management (8)
- ra-qm-team (13)

Also fixed standalone plugins that had root SKILL.md + ./skills/ subdir
(agenthub, autoresearch-agent, executive-mentor, playwright-pro). The
loader rejected them despite skills="./skills" because of the conflicting
root SKILL.md (compare self-improving-agent which works because PR #536
moved its root SKILL.md). Moved each root SKILL.md into ./skills/<name>/.

Restored standalone plugin folders to their original paths after the
multi-skill restructure swept them into parent skills/ directories
(marketplace.json source paths require original locations).

Removed 7 orphaned marketplace entries that pointed to skill folders
without their own plugin.json (content-creator, demand-gen,
fullstack-engineer, aws-architect, product-manager, scrum-master,
skill-security-auditor) — these were already non-functional.

Bumped patch versions on every changed plugin and synced
marketplace.json. Marketplace now lists 29 working plugins (down
from 36).

After merge: users run `/plugin marketplace update claude-code-skills`
followed by `/plugin update --all` to pick up the working layout.
2026-05-02 22:51:20 +02:00

62 lines
1.1 KiB
Markdown

# Docker Compose Patterns For Worktrees
## Pattern 1: Override File Per Worktree
Base compose file remains shared; each worktree has a local override.
`docker-compose.worktree.yml`:
```yaml
services:
app:
ports:
- "3010:3000"
db:
ports:
- "5442:5432"
redis:
ports:
- "6389:6379"
```
Run:
```bash
docker compose -f docker-compose.yml -f docker-compose.worktree.yml up -d
```
## Pattern 2: `.env` Driven Ports
Use compose variable substitution and write worktree-specific values into `.env.local`.
`docker-compose.yml` excerpt:
```yaml
services:
app:
ports: ["${APP_PORT:-3000}:3000"]
db:
ports: ["${DB_PORT:-5432}:5432"]
```
Worktree `.env.local`:
```env
APP_PORT=3010
DB_PORT=5442
REDIS_PORT=6389
```
## Pattern 3: Project Name Isolation
Use unique compose project name so container, network, and volume names do not collide.
```bash
docker compose -p myapp_wt_auth up -d
```
## Common Mistakes
- Reusing default `5432` from multiple worktrees simultaneously
- Sharing one database volume across incompatible migration branches
- Forgetting to scope compose project name per worktree