Agent Skillspierrecomputer/pierre › worktrees-and-dev-servers

worktrees-and-dev-servers

GitHub

提供 git worktree 管理、开发服务器端口偏移配置及清理僵尸进程的工具,防止多工作区资源冲突。

.agents/skills/worktrees-and-dev-servers/SKILL.md pierrecomputer/pierre

Trigger Scenarios

创建或管理工作区隔离环境 启动本地开发服务器 清理残留的开发服务进程

Install

npx skills add pierrecomputer/pierre --skill worktrees-and-dev-servers -g -y
More Options

Non-standard path

npx skills add https://github.com/pierrecomputer/pierre/tree/main/.agents/skills/worktrees-and-dev-servers -g -y

Use without installing

npx skills use pierrecomputer/pierre@worktrees-and-dev-servers

指定 Agent (Claude Code)

npx skills add pierrecomputer/pierre --skill worktrees-and-dev-servers -a claude-code -g -y

安装 repo 全部 skill

npx skills add pierrecomputer/pierre --all -g -y

预览 repo 内 skill

npx skills add pierrecomputer/pierre --list

SKILL.md

Frontmatter
{
    "name": "worktrees-and-dev-servers",
    "description": "Use when working with the repo's moonx root:wt worktree helper, Pierre-managed worktrees, dev-server port offsets, stale server cleanup, Playwright fixtures, or Chrome debug instances. Do not use this as a substitute for host-provided workspace isolation."
}

Worktrees and Dev Servers

Pierre includes a repo-specific git worktree helper for local/manual parallelization outside host-managed agent workspaces. Managed Pierre worktrees live at:

~/pierre/pierre-worktrees/<slug>/

Each managed Pierre worktree owns a port offset so dev servers, E2E fixtures, and the Chrome remote-debug instance do not collide. The main clone keeps historical default ports; linked Pierre worktrees shift ports.

If you are already inside a Conductor, Codex, Claude, or other host-provided workspace, do not create another worktree unless the user explicitly asks for a Pierre-managed worktree. Still use this skill when you start repo dev servers or E2E fixtures, because the cleanup and port-offset rules apply to those scripts.

Worktree Commands

The wt suite is defined in scripts/wt.ts, exposed as the root:wt moon task, and manages only Pierre-managed worktrees:

moonx root:wt -- new <slug>    # create a worktree, allocate offset, pnpm install
moonx root:wt -- rm <slug>     # kill its processes, remove the worktree
moonx root:wt -- clean         # kill zombie servers on all managed worktree ports
moonx root:wt -- clean <slug>  # clean one managed worktree
moonx root:wt -- ps            # show per-worktree port status (LISTEN / -)
moonx root:wt -- list          # summary of managed + external worktrees

Port-binding moon tasks read the offset from <worktree>/.env.worktree via their envFile option. Before starting, dev tasks run scripts/run-dev.sh to kill any stale process bound to the target port.

Cleanup Contract

If you start dev servers, Playwright fixtures, or Chrome debug instances inside a worktree, run cleanup before completing your turn:

moonx root:wt -- clean <slug>

Use moonx root:wt -- clean when you do not know the slug or need to clean every managed worktree. Use moonx root:wt -- rm <slug> only when intentionally tearing down the worktree itself.

Version History

  • 3b70f81 Current 2026-07-24 22:04

Same Skill Collection

.agents/skills/browser-automation/SKILL.md
.agents/skills/git-commits/SKILL.md
.agents/skills/performance/SKILL.md
.agents/skills/testing-and-verification/SKILL.md
.agents/skills/tooling-and-dependencies/SKILL.md
.agents/skills/typescript-monorepo/SKILL.md
skills/diffs/SKILL.md
skills/theme/SKILL.md
skills/theming/SKILL.md
skills/trees/SKILL.md

Metadata

Files
0
Version
ba7d51d
Hash
34b9fb48
Indexed
2026-07-24 22:04

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 17:23
浙ICP备14020137号-1 $방문자$