yeachan-heo/oh-my-claudecode/project-session-manager
- community
Checking that the SKILL.md file is still in the repository.
Worktree-first dev environment manager for issues, PRs, and features with optional tmux sessions
Install
npx vskill@latest install yeachan-heo/oh-my-claudecode/project-session-managerSKILL.md
Project Session Manager (PSM) Skill
psm is the compatibility alias for this canonical skill entrypoint.
Quick Start (worktree-first): Start withomc teleportwhen you want an isolated issue/PR/feature worktree before adding any tmux/session orchestration:```bashomc teleport #123 # Create worktree for issue/PRomc teleport my-feature # Create worktree for featureomc teleport list # List worktrees```See Teleport Command below for details.
Automate isolated development environments using git worktrees and tmux sessions with Claude Code. Enables parallel work across multiple tasks, projects, and repositories.
Canonical slash command: /oh-my-claudecode:project-session-manager (alias: /oh-my-claudecode:psm).
Commands
| Command | Description | Example | |
|---|---|---|---|
review <ref> | PR review session | /psm review omc#123 | |
fix <ref> | Issue fix session | /psm fix omc#42 | |
feature <proj> <name> | Feature development | /psm feature omc add-webhooks | |
list [project] | List active sessions | /psm list | |
attach <session> | Attach to session | /psm attach omc:pr-123 | |
kill <session> | Kill session | /psm kill omc:pr-123 | |
cleanup | Clean merged/closed | /psm cleanup | |
status | Current session info | /psm status |
Project References
Supported formats:
- Alias:
omc#123(requires~/.psm/projects.json) - Full:
owner/repo#123 - URL:
https://github.com/owner/repo/pull/123 - Current:
#123(uses current directory's repo)
Configuration
Project Aliases (~/.psm/projects.json)
Providers
PSM supports multiple issue tracking providers:
| Provider | CLI Required | Reference Formats | Commands | |
|---|---|---|---|---|
| GitHub (default) | gh | owner/repo#123, alias#123, GitHub URLs | review, fix, feature | |
| Jira | jira | PROJ-123 (if PROJ configured), alias#123 | fix, feature |
Jira Configuration
To use Jira, add an alias with jira_project and provider: "jira":
Important: The repo field is still required for cloning the git repository. Jira tracks issues, but you work in a git repo.
For non-GitHub repos, use clone_url instead:
Jira Reference Detection
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
Jira CLI Setup
Install the Jira CLI:
The Jira CLI handles authentication separately from PSM.
Directory Structure
Session Naming
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.
Subcommand: review <ref>
Purpose: Create PR review session
Steps:
- Resolve reference:
```bash # Read project aliases cat ~/.psm/projects.json 2>/dev/null || echo '{"aliases":{}}'
# Parse ref format: alias#num, owner/repo#num, or URL # Extract: project_alias, repo (owner/repo), pr_number, local_path ```
- Fetch PR info:
``bash gh pr view <pr_number> --repo <repo> --json number,title,author,headRefName,baseRefName,body,files,url ``
- Ensure local repo exists:
``bash # If local path doesn't exist, clone if [[ ! -d "$local_path" ]]; then git clone "https://github.com/$repo.git" "$local_path" fi ``
- Create worktree:
```bash worktree_path="$HOME/.psm/worktrees/$project_alias/pr-$pr_number"
# Fetch PR branch cd "$local_path" git fetch origin "pull/$pr_number/head:pr-$pr_number-review"
# Create worktree git worktree add "$worktree_path" "pr-$pr_number-review" ```
- Create session metadata:
``bash cat > "$worktree_path/.psm-session.json" << EOF { "id": "$project_alias:pr-$pr_number", "type": "review", "project": "$project_alias", "ref": "pr-$pr_number", "branch": "<head_branch>", "base": "<base_branch>", "created_at": "$(date -Iseconds)", "tmux_session": "psm_${project_alias}_pr-$pr_number", "worktree_path": "$worktree_path", "source_repo": "$local_path", "github": { "pr_number": $pr_number, "pr_title": "<title>", "pr_author": "<author>", "pr_url": "<url>" }, "state": "active" } EOF ``
- Update sessions registry:
``bash # Add to ~/.psm/sessions.json ``
- Create tmux session (tmux-safe name;
:/.are translated to_):
``bash tmux new-session -d -s "psm_${project_alias}_pr-$pr_number" -c "$worktree_path" ``
- Launch Claude Code (unless --no-claude):
```bash # --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 ```
- Output session info:
``` Session ready!
ID: omc:pr-123 Worktree: ~/.psm/worktrees/omc/pr-123 Tmux: psm_omc_pr-123
To attach: tmux attach -t psm_omc_pr-123 (or: psm attach omc:pr-123) ```
Subcommand: fix <ref>
Purpose: Create issue fix session
Steps:
- Resolve reference (same as review)
- Fetch issue info:
``bash gh issue view <issue_number> --repo <repo> --json number,title,body,labels,url ``
- Create feature branch:
``bash cd "$local_path" git fetch origin main branch_name="fix/$issue_number-$(echo "$title" | tr ' ' '-' | tr '[:upper:]' '[:lower:]' | head -c 30)" git checkout -b "$branch_name" origin/main ``
- Create worktree:
``bash worktree_path="$HOME/.psm/worktrees/$project_alias/issue-$issue_number" git worktree add "$worktree_path" "$branch_name" ``
- 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: ``bash 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 ``
Subcommand: feature <project> <name>
Purpose: Start feature development
Steps:
- Resolve project (from alias or path)
- Create feature branch:
``bash cd "$local_path" git fetch origin main branch_name="feature/$feature_name" git checkout -b "$branch_name" origin/main ``
- Create worktree:
``bash worktree_path="$HOME/.psm/worktrees/$project_alias/feat-$feature_name" git worktree add "$worktree_path" "$branch_name" ``
- Create session, tmux, launch claude with feature context as initial prompt:
``bash tmux send-keys -t "psm_${project_alias}_feat-$feature_name" "claude --dangerously-skip-permissions" Enter tmux send-keys -t "psm_${project_alias}_feat-$feature_name" -l \ "Implement feature \"$feature_name\" for project $project. Branch: $branch_name." Enter ``
Subcommand: list [project]
Purpose: List active sessions
Steps:
- Read sessions registry:
``bash cat ~/.psm/sessions.json 2>/dev/null || echo '{"sessions":{}}' ``
- Check tmux sessions:
``bash tmux list-sessions -F "#{session_name}" 2>/dev/null | grep "^psm_" ``
- Check worktrees:
``bash ls -la ~/.psm/worktrees/*/ 2>/dev/null ``
- Format output:
``` 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:
``bash tmux has-session -t "psm_${session_id//[.:]/_}" 2>/dev/null # translate public id to tmux-safe name ``
- Attach:
``bash tmux attach -t "psm_${session_id//[.:]/_}" ``
Subcommand: kill <session>
Purpose: Kill session and cleanup
Steps:
- Kill tmux session:
``bash tmux kill-session -t "psm_${session_id//[.:]/_}" 2>/dev/null ``
- Remove worktree:
```bash worktree_path=$(jq -r ".sessions[\"$session_id\"].worktree" ~/.psm/sessions.json) source_repo=$(jq -r ".sessions[\"$session_id\"].source_repo" ~/.psm/sessions.json)
cd "$source_repo" git worktree remove "$worktree_path" --force ```
- Update registry:
``bash # Remove from sessions.json ``
Subcommand: cleanup
Purpose: Clean up merged PRs and closed issues
Steps:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/project-session-manager/SKILL.md
Popularity
- Repository stars
- 11,908
- Repository forks
- 802
- Repository npm downloads, 7 days
- 4,755
- 7-day trend score
- 67
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 20 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/yeachan-heo/oh-my-claudecode/project-session-manager)