Worktree-first dev environment manager for issues, PRs, and features with optional tmux sessions
aliases
["psm"]
level
2
Project Session Manager (PSM) Skill
psm is the compatibility alias for this canonical skill entrypoint.
Quick Start (worktree-first): Start with omc teleport when you want an isolated issue/PR/feature worktree before adding any tmux/session orchestration:
omc teleport #123 # Create worktree for issue/PR
omc teleport my-feature # Create worktree for feature
omc teleport list # List worktrees
Automate isolated development environments using git worktrees and tmux sessions with Claude Code. Enables parallel work across multiple tasks, projects, and repositories.
PSM only recognizes PROJ-123 format as Jira when PROJ is explicitly configured as a jira_project in your aliases. This prevents false positives from branch names like FIX-123.
Jira Examples
# Fix a Jira issue (MYPROJ must be configured)
psm fix MYPROJ-123
# Fix using alias (recommended)
psm fix mywork#123
# Feature development (works same as GitHub)
psm feature mywork add-webhooks
# Note: 'psm review' is not supported for Jira (no PR concept)# Use 'psm fix' for Jira issues
The public session ID (colon form, e.g. omc:pr-123) is the human-facing
identifier stored in sessions.json and used with psm attach/psm kill. tmux
reserves : and . for its session:window.pane target syntax and silently
rewrites them, so the actual tmux session name uses a tmux-safe form where
those characters become _ (issue #3528). PSM translates the public ID to the
tmux-safe name at every tmux boundary; attach directly with the tmux-safe name.
Type
Public ID (psm attach/kill)
Tmux Session (tmux attach -t)
Worktree Dir
PR Review
omc:pr-123
psm_omc_pr-123
~/.psm/worktrees/omc/pr-123
Issue Fix
omc:issue-42
psm_omc_issue-42
~/.psm/worktrees/omc/issue-42
Feature
omc:feat-auth
psm_omc_feat-auth
~/.psm/worktrees/omc/feat-auth
Implementation Protocol
When the user invokes a PSM command, follow this protocol:
Parse Arguments
Parse {{ARGUMENTS}} to determine:
Subcommand: review, fix, feature, list, attach, kill, cleanup, status
Reference: project#number, URL, or session ID
Options: --branch, --base, --no-claude, --no-tmux, etc.
# --dangerously-skip-permissions prevents the "Do you trust this directory?" prompt# and repeated tool-approval prompts from stalling the session (issue #2508).
tmux send-keys -t "psm_${project_alias}_pr-$pr_number""claude --dangerously-skip-permissions" Enter
# After claude boots (PSM_CLAUDE_STARTUP_DELAY, default 5s), deliver the task.# Use -l (literal) so special characters are not misinterpreted by tmux.sleep"${PSM_CLAUDE_STARTUP_DELAY:-5}"
tmux send-keys -t "psm_${project_alias}_pr-$pr_number" -l \
"Review PR #$pr_number: \"$pr_title\" by @$pr_author ($head_branch → $base_branch). URL: $pr_url." Enter
Create session metadata (similar to review, type="fix")
Update registry, create tmux, launch claude:
Same as review, but pass issue context as the initial task prompt:
tmux send-keys -t "psm_${project_alias}_issue-$issue_number""claude --dangerously-skip-permissions" Enter
# After claude boots, deliver the task (see PSM_CLAUDE_STARTUP_DELAY):
tmux send-keys -t "psm_${project_alias}_issue-$issue_number" -l \
"Fix issue #$issue_number: \"$issue_title\". URL: $issue_url. Branch: $branch_name." Enter
Active PSM Sessions:
ID | Type | Status | Worktree
-------------------|---------|----------|---------------------------
omc:pr-123 | review | active | ~/.psm/worktrees/omc/pr-123
omc:issue-42 | fix | detached | ~/.psm/worktrees/omc/issue-42
Subcommand: attach <session>
Purpose: Attach to existing session
Steps:
Parse session ID: project:type-number
Verify session exists:
tmux has-session -t "psm_${session_id//[.:]/_}" 2>/dev/null # translate public id to tmux-safe name
tmux display-message -p "#{session_name}" 2>/dev/null
# or check if cwd is inside a worktree
Read session metadata:
cat .psm-session.json 2>/dev/null
Show status:
Current Session: omc:pr-123
Type: review
PR: #123 - Add webhook support
Branch: feature/webhooks
Created: 2 hours ago
Error Handling
Error
Resolution
Worktree exists
Offer: attach, recreate, or abort
PR not found
Verify URL/number, check permissions
No tmux
Warn and skip session creation
No gh CLI
Error with install instructions
Teleport Command
The omc teleport command provides a lightweight alternative to full PSM sessions. It creates git worktrees without tmux session management — ideal for quick, isolated development.
Usage
# Create worktree for an issue or PR
omc teleport #123
omc teleport owner/repo#123
omc teleport https://github.com/owner/repo/issues/42
# Create worktree for a feature
omc teleport my-feature
# List existing worktrees
omc teleport list
# Remove a worktree
omc teleport remove issue/my-repo-123
omc teleport remove --force feat/my-repo-my-feature