Skip to main content
command CX Codex

list_worktrees_prompt — Claude Code command: overview and setup

list_worktrees_prompt inspects git worktrees under the trees/ folder, detects active process ports, and outputs a runtime status report.

no license ★ 1,573 updated 2026-02-08

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/list_worktrees_prompt.md
Open on GitHub

What list_worktrees_prompt does

The prompt executes git worktree list and filters entries residing inside the trees/ folder. For each workspace, it reads .env files located in apps/server/ and apps/client/ to gather port assignments such as SERVER_PORT and VITE_PORT alongside database and WebSocket settings.

Process states are evaluated by querying lsof against designated ports, which captures process IDs for running services. The prompt also verifies if node_modules folders are present, helping catch missing packages before startup.

The routine explicitly expects workspaces inside trees/ containing apps/server and apps/client directories; projects with a different layout will trigger missing configuration warnings.

What it helps with

  • track active and stopped branches stored in trees/
  • inspect occupied server and client ports across worktrees
  • detect missing node_modules folders before starting services
  • generate ready-to-run terminal commands for process control

Example prompts for the agent

  • /list_worktrees_prompt
  • List all git worktrees in trees/ and check their running ports
  • Audit active worktrees and verify client dependencies

How to install list_worktrees_prompt

Manually: put the files in place

.claude/commands/list_worktrees_prompt.md

Call it with /list_worktrees_prompt. For all projects use ~/.claude/commands/

Questions about list_worktrees_prompt

How to install list_worktrees_prompt in Claude Code?

Place the prompt file at .claude/commands/list_worktrees_prompt.md within your project repository.

What does list_worktrees_prompt do?

It lists git worktrees located in trees/, reads port configurations from .env files, detects running PIDs with lsof, and summarizes the overall state.

What project architecture is required?

It expects git worktrees positioned in trees/<branch-name> with separated apps/server and apps/client directories.

Similar slash commands

All slash commands for Git and GitHub →

From the same set20

The whole set →
plan_new_feature plan_new_feature is a Claude Code command that turns a feature request into a development plan saved under specs/. It maps the work before coding starts. CX Codex +1 ★ 1,573repo stars load_ai_docs load_ai_docs — a command that downloads documentation from specified URLs and saves it as markdown files via model-specific subagents. Designed for documentation benchmarking and testing AI model capabilities. CX Codex +1 ★ 1,573repo stars t_metaprompt_workflow t_metaprompt_workflow generates structured Claude Code slash commands from a high-level task description while checking Anthropic docs. CX Codex +1 ★ 1,573repo stars scout-report-suggest-fast scout-report-suggest-fast hunts a described problem through a codebase and returns file paths, line numbers and a fix plan. It only reads. CX Codex ★ 1,573repo stars remove_worktree_prompt The remove_worktree_prompt command stops processes tied to a worktree, then removes the worktree and its Git branch. Check the branch name first: deletion cannot be undone. CX Codex +1 ★ 1,573repo stars create_worktree_prompt create_worktree_prompt sets up a git worktree under trees/ with separate ports, database and hooks, then starts the server and client. Useful for running several copies of the observability system side by side. CX Codex +1 ★ 1,573repo stars worktree-manager-skill The worktree-manager-skill skill handles Git worktrees for parallel development, including creation, status checks, listing, and removal. CX Codex +1 ★ 1,573repo stars Video Processor Video Processor — a skill that handles video files from the agent: pull the audio track, convert to mp4 or webm, transcribe speech with Whisper. Useful when video files show up in a project. CX Codex +1 ★ 1,573repo stars

Project sponsors

Companies that keep this analytics open