project-session-manager

Worktree-first dev environment manager for issues, PRs, and features with optional tmux sessions

By yeachan-heo · 703 installs

npx skills add yeachan-heo/oh-my-claudecode --skill project-session-manager

Source repository · Upstream listing

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: See [Teleport Command]( 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: 1. Subcommand : review, fix, feature, list, attach, kill, cleanup, status 2. Reference : project number, URL, or session ID 3. Options : branch, base, no claude, no tmux, etc. Subcommand: review <ref Purpose : Create PR review session Steps : 1. Resolve reference : 2. Fetch PR info : 3. Ensure local repo exists : 4. Create worktree : 5. Create session metadata : 6. Update sessions registry : 7. Create tmux session (tmux safe name; : / . are translated to ): 8. Launch Claude Code (unless no claude): 9. Output session info : Subcommand: fix <ref Purpose : Create issue fix session Steps : 1. Resolve reference (same as review) 2. Fetch issue info : 3. Create feature branch : 4. Create worktree : 5. Create session metadata (similar to review, type="fix") 6. Update registry, create tmux, launch claude : Same as review, but pass issue context as the initial task prompt: Subcommand: feature <project <name Purpose : Start feature development Steps : 1. Resolve project (from alias or path) 2. Create feature branch : 3. Create worktree : 4. Create session, tmux, launch claude with feature context as initial prompt: Subcommand: list [project] Purpose : List active sessions Steps : 1. Read sessions registry : 2. Check tmux sessions : 3. Check worktrees : 4. Format output : Subcommand: attach <session Purpose : Attach to existing session Steps : 1. Parse session ID : project:type number 2. Verify session exists : 3. Attach : Subcommand: kill <session Purpose : Kill session and cleanup Steps : 1. Kill tmux session : 2. Remove worktree : 3. Update registry : Subcommand: cleanup Purpose : Clean up merged PRs and closed issues Steps : 1. Read all sessions 2. For each PR session, check if merged : 3. For each issue session, check if closed : 4. Clean up merged/closed sessions : Kill tmux session Remove worktree Update registry 5. Report : Subcommand: status Purpose : Show current session info Steps : 1. Detect current session from tmux or cwd: 2. Read session metadata : 3. Show status : 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 Options Flag Description Default worktree Create worktree (default, kept for compatibility) true path <path Custom worktree root directory ~/Workspace/omc worktrees/ base <branch Base branch to create from main json Output as JSON false Worktree Layout PSM vs Teleport Feature PSM Teleport Git worktree Yes Yes Tmux session Yes No Claude Code launch Yes No Session registry Yes No Auto cleanup Yes No Project aliases Yes No (uses current repo) Use PSM for full managed sessions. Use teleport for quick worktree creation. Requirements Required: git Version control (with worktree support v2.5+) jq JSON parsing tmux Session management (optional, but recommended) Optional (per provider): gh GitHub CLI (for GitHub workflows) jira Jira CLI (for Jira workflows) Initialization On first run, create default config: