wtc

仓库创建 2026年6月24日最近提交 22 天前SkillHot 收录 22 天前
▸ 精选理由

方便在多个分支并行运行服务,减少环境冲突

▸ 风险提示

管理容器与端口,可能与宿主机网络或已有服务冲突

这个 Skill 做什么

为 git 工作树提供零配置的 Docker Compose 隔离,避免端口与容器冲突。

为每个 git worktree 自动建立独立的 Docker Compose 隔离环境,让不同分支能同时跑服务而不冲突端口、容器或数据卷。用在需要并行调试或测试多个分支的基础设施场景,避免互相占端口或污染卷数据。特别在于零配置就能为每个 worktree 分配独立端口和卷,开合环境变得非常顺手。

▸ 展开 SKILL.md 英文原文

Use when user invokes /wtc to work with Docker Compose worktree isolation, start/stop infra per worktree, or check worktree status

开发编程Docker工作树隔离Compose通用
0
Stars
0
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/tomevault-io/skills-registry/main/0-sayed--auto-pr--wtc/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/tomevault-io/skills-registry/main/0-sayed--auto-pr--wtc/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# wtc — worktree-compose

Zero-config Docker Compose isolation for git worktrees. Each worktree gets its own containers, ports, and volumes — no conflicts when running multiple branches simultaneously.

**Repo:** https://github.com/LevwTech/worktree-compose

---

## Port Formula

```
remapped_port = 20000 + default_port + worktree_index
```

Worktree index comes from position in `git worktree list`. Run `wtc ls` to see current assignments.

---

## Port Collision Problem

The default formula `20000 + port + index` creates collisions when services have consecutive ports:

```
Service ports: 8001, 8002, 8003, 8004

WT1: 28002, 28003, 28004, 28005
WT2: 28003, 28004, 28005, 28006  ← overlaps WT1
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有