Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)41k · #7016

project-session-manager

Skill này làm gì

Skill này quản lý các bản sao làm việc độc lập của một repository cho từng issue, pull request hoặc tính năng. Skill dành cho lập trình viên đang làm nhiều việc cùng lúc và muốn giữ chúng tách biệt.

Khi nào nên dùng

  • ✓Khi bạn cần một bản sao làm việc riêng cho một issue, pull request hoặc tính năng.
  • ✓Khi bạn đang xoay xở nhiều tác vụ trong một repository và muốn cô lập chúng.
  • ✓Khi bạn muốn liệt kê, gắn vào hoặc dọn dẹp các phiên làm việc đang hoạt động.

Liên kết skill

https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/project-session-manager/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/project-session-manager/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một bản sao làm việc riêng cho issue 123 để tôi sửa mà không đụng đến công việc hiện tại của mình.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent tạo một git worktree riêng cho tác vụ, bắt đầu bằng một lệnh nhanh, và có thể tùy chọn mở một phiên terminal cho nó. Nó cũng liệt kê, gắn vào và dọn dẹp các phiên khi công việc của chúng đã được gộp hoặc đóng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

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)

{
  "aliases": {
    "omc": {
      "repo": "Yeachan-Heo/oh-my-claudecode",
      "local": "~/Workspace/oh-my-claudecode",
      "default_base": "main"
    }
  },
  "defaults": {
    "worktree_root": "~/.psm/worktrees",
    "cleanup_after_days": 14
  }
}

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

{
  "aliases": {
    "mywork": {
      "jira_project": "MYPROJ",
      "repo": "mycompany/my-project",
      "local": "~/Workspace/my-project",
      "default_base": "develop",
      "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:

{
  "aliases": {
    "private": {
      "jira_project": "PRIV",
      "clone_url": "git@gitlab.internal:team/repo.git",
      "local": "~/Workspace/repo",
      "provider": "jira"
    }
  }
}

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

# 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

Jira CLI Setup

Install the Jira CLI:

# macOS
brew install ankitpokhrel/jira-cli/jira-cli

# Linux
# See: https://github.com/ankitpokhrel/jira-cli#installation

# Configure (interactive)
jira init

The Jira CLI handles authentication separately from PSM.

Directory Structure

~/.psm/
├── projects.json       # Project aliases
├── sessions.json       # Active session registry
└── worktrees/          # Worktree storage
    └── <project>/
        └── <type>-<id>/

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 dire

Câu hỏi thường gặp

Worktree là gì?

Đó là một thư mục làm việc riêng cho cùng một repository, để bạn làm việc trên một nhánh khác mà không cần chuyển đổi.

Nó có cần phiên terminal không?

Không. Phần worktree hoạt động độc lập, còn phiên terminal là tùy chọn.

Các phiên cũ được xóa như thế nào?

Một lệnh dọn dẹp xóa các phiên có công việc đã được gộp hoặc đóng.

Chi tiết

Mô tả gốc của tác giả

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

repo: Yeachan-Heo/oh-my-claudecode

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#7016
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự