Agent skill

Worktrees and Dev Servers

by pierrecomputer in pierrecomputer/pierre

Explains the Pierre repo's moonx root:wt helper for managed git worktrees, per-worktree port offsets, and cleaning up stale dev servers and test fixtures.

Apache-2.0Auto-check: notesDevelopment

Install Worktrees and Dev Servers

skills CLI
$ npx skills add pierrecomputer/pierre --skill worktrees-and-dev-servers -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pierrecomputer/pierre worktrees-and-dev-servers --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pierrecomputer/pierre.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/worktrees-and-dev-servers .claude/skills/worktrees-and-dev-servers && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
worktrees-and-dev-servers
GitHub stars
6.2k
Token cost
~573 tokens
SKILL.md length
207 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Explains the Pierre repo's moonx root:wt helper for managed git worktrees, per-worktree port offsets, and cleaning up stale dev servers and test fixtures.

  • Starting dev servers or E2E fixtures inside a Pierre worktree
  • SKILL.md covers Worktree Commands and Cleanup Contract
  • Calls git
  • Cleaning up stale servers left on managed worktree ports

What it does

This is a repo-specific guide for the Pierre codebase. Its wt helper, defined in scripts/wt.ts and run as the root:wt moon task, creates, removes and cleans managed git worktrees under ~/pierre/pierre-worktrees. Each worktree gets its own port offset, stored in .env.worktree, so dev servers, end-to-end fixtures and the Chrome remote-debug instance do not collide. The main clone keeps the historical default ports.

The helper has a new command that allocates the offset and runs pnpm install, an rm command that kills the worktree's processes and deletes it, and a clean command that kills stray servers on the managed ports. Anything that starts dev servers, Playwright fixtures or Chrome debug instances should run moonx root:wt -- clean with the slug before the turn ends. If the agent is already inside a host-provided workspace, it should not create another worktree unless you ask for a Pierre-managed one.

When your agent uses it

  • Starting dev servers or E2E fixtures inside a Pierre worktree
  • Cleaning up stale servers left on managed worktree ports
  • Creating or removing a Pierre-managed worktree for manual parallel work

Example prompts

  • “Create a Pierre worktree called diff-fix and start its dev server.”
  • “Kill the zombie dev servers left over from my last test run.”
  • “I'm done with the tree-perf worktree, so tear it down.”

Requirements

  • The Pierre repository with the moon task runner (moonx)
  • pnpm

What it can do on your machine

Read from SKILL.md and the folder at commit d302ea0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Worktrees and Dev Servers loads about 573 tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 207 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~573

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:43
    n tasks read the offset from `<worktree>/.env.worktree` via

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pierrecomputer/pierre at commit d302ea0, republished under its Apache-2.0 licence (© pierrecomputer). 207 words, ~573 tokens.

Download SKILL.mdSave it as .claude/skills/worktrees-and-dev-servers/SKILL.md (or your agent's skills folder).
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:

text
~/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:

bash
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:

bash
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.

© pierrecomputer, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

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

Open the folder on GitHubat commit d302ea0

Compare with similar skills

Worktrees and Dev Servers next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Worktrees and Dev Servers compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Worktrees and Dev Servers this skillpierrecomputer/pierre6.2k—~573Automated safety check: NotesApache-2.0
Worktree StackLanternOps/breeze130—~1.2kAutomated safety check: NotesAGPL-3.0
Kanvibe Release Deployrookedsysc/kanvibe143—~12kAutomated safety check: NotesAGPL-3.0
Fix Worktree Opsx Skills Not CreatedBlackBeltTechnology/pi-agent-dashboard316—~822Automated safety check: PassMIT
Orca CLIaiskillstore/marketplace4301 repos~985Automated safety check: PassNone
Devcontainer Devstacklok/toolhive-studio170—~3.8kAutomated safety check: NotesApache-2.0

Similar skills

  • Worktree Stack

    LanternOps/breeze

    A skill your agent uses when an agent needs a running, seeded, Playwright-ready Breeze stack for the current git worktree.

    130 GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check: notes
  • Kanvibe Release Deploy

    rookedsysc/kanvibe

    A skill your agent uses whenever releasing or deploying KanVibe desktop from a clean, up-to-date dev checkout: ask only for the target version and release-note approval, then let the AI update…

    143 GitHub stars~12k tokensUpdated today
    DevelopmentAuto-check: notes
  • Fix Worktree Opsx Skills Not Created

    BlackBeltTechnology/pi-agent-dashboard

    Diagnose/fix worktrees missing the generated openspec- (opsx) skills after worktreeInit.

    316 GitHub stars~822 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Orca CLI

    aiskillstore/marketplace

    Use the public orca CLI to operate Orca-managed worktrees, folder contexts, terminals, repos, automations, artifacts, skill sharing, worktree comments, and the browser embedded inside the Orca app.

    430 GitHub starsUsed in 1 repo~985 tokens
    DevelopmentAuto-check passed
  • Devcontainer Dev

    stacklok/toolhive-studio

    Spin up and interact with ToolHive Studio's containerized dev environment (Xvfb + noVNC + DinD).

    170 GitHub stars~3.8k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Voiceover-First Development

    Devin-AXIS/iPolloWork

    Starts a feature as a demo narration instead of a PRD: you approve the script before any code, then the agent builds in a fresh worktree and opens a PR with proof.

    6.7k GitHub stars~879 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from pierrecomputer/pierre

All 10 skills in this repo
  • @pierre/diffs Code Rendering

    pierrecomputer/pierre

    Guides an agent through using @pierre/diffs to render syntax-highlighted files and diffs, and to build editing and review surfaces in React or plain JavaScript.

    6.2k GitHub starsUsed in 2 repos~803 tokens
    Auto-check passed
  • Pierre Theming Library

    pierrecomputer/pierre

    Explains how to use the @pierre/theming package to list, resolve, select, switch and persist themes, with controller, color and React references.

    6.2k GitHub stars~661 tokensUpdated yesterday
    Auto-check passed
  • Pierre Trees File Tree

    pierrecomputer/pierre

    Use when an app uses @pierre/trees to render or control a file tree, including React, vanilla JavaScript, SSR, web components, selection, search, rename, drag…

    6.2k GitHub stars~473 tokensUpdated yesterday
    Auto-check passed
  • Pierre Highlights

    pierrecomputer/pierre

    Shows how to use @pierre/highlights for syntax-highlighted HTML or tokens, streaming and incremental tokenizing, and Zed-compatible themes with CSS variables.

    6.2k GitHub stars~409 tokensUpdated yesterday
    Auto-check passed
  • Chooses the right verification step after a code change in Pierre's monorepo: format and lint, a typecheck, Bun unit tests, snapshots, or Playwright E2E.

    6.2k GitHub stars~608 tokensUpdated yesterday
    Auto-check passed
  • Pierre Theme Package

    pierrecomputer/pierre

    Shows an agent how to install and use the @pierre/theme package, which ships ten Pierre light and dark color themes for Shiki and VS Code.

    6.2k GitHub stars~352 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Worktrees and Dev Servers

What does Worktrees and Dev Servers do?

Explains the Pierre repo's moonx root:wt helper for managed git worktrees, per-worktree port offsets, and cleaning up stale dev servers and test fixtures. This is a repo-specific guide for the Pierre codebase.ts and run as the root:wt moon task, creates, removes and cleans managed git worktrees under ~/pierre/pierre-worktrees.

When should I use Worktrees and Dev Servers?

Worktrees and Dev Servers fits situations like: starting dev servers or E2E fixtures inside a Pierre worktree; cleaning up stale servers left on managed worktree ports; creating or removing a Pierre-managed worktree for manual parallel work.

How do I install Worktrees and Dev Servers in Claude Code?

Run `npx skills add pierrecomputer/pierre --skill worktrees-and-dev-servers -a claude-code`. Or copy the skill folder (.agents/skills/worktrees-and-dev-servers in pierrecomputer/pierre) into .claude/skills/worktrees-and-dev-servers in your project. Claude Code loads it when a task matches its description.

How do I install Worktrees and Dev Servers in Codex?

Run `npx skills add pierrecomputer/pierre --skill worktrees-and-dev-servers -a codex`. Or copy the skill folder (.agents/skills/worktrees-and-dev-servers in pierrecomputer/pierre) into .agents/skills/worktrees-and-dev-servers in your project. Codex loads it when a task matches its description.

Can I use Worktrees and Dev Servers in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pierrecomputer/pierre --skill worktrees-and-dev-servers -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/worktrees-and-dev-servers, .gemini/skills/worktrees-and-dev-servers, .github/skills/worktrees-and-dev-servers and .opencode/skills/worktrees-and-dev-servers in your project.

What does Worktrees and Dev Servers need to run?

Going by SKILL.md and its folder, Worktrees and Dev Servers needs the command-line tools its instructions call (git). Our summary lists: The Pierre repository with the moon task runner (moonx); pnpm.

Does Worktrees and Dev Servers access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Worktrees and Dev Servers safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Worktrees and Dev Servers use?

Worktrees and Dev Servers is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Worktrees and Dev Servers use?

About 573 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Worktrees and Dev Servers?

Skills that share tags, products or a category with Worktrees and Dev Servers: Worktree Stack (LanternOps/breeze, 130 stars), Kanvibe Release Deploy (rookedsysc/kanvibe, 143 stars), Fix Worktree Opsx Skills Not Created (BlackBeltTechnology/pi-agent-dashboard, 316 stars) and Orca CLI (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Worktrees and Dev Servers?

pierrecomputer (a GitHub organization) maintains it in pierrecomputer/pierre, which has 6,243 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 6, 2026.

Source: pierrecomputer/pierre on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.