Project Session Manager logo

Project Session Manager

Community
MeroZemory
project-session-manager

Manage isolated dev environments with git worktrees and tmux sessions

Overview

PublisherMeroZemory
Repositoryoh-my-droid
Skill nameproject-session-manager
Stars
29
Forks
7
Bundled files
10
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 10 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by MeroZemory on GitHub. Read the source before you install it.

Installation

Install the Project Session Manager AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/MeroZemory/oh-my-droid/tree/main/skills/project-session-manager
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MeroZemory/oh-my-droid.git /tmp/oh-my-droid
mkdir -p .claude/skills
cp -r /tmp/oh-my-droid/skills/project-session-manager .claude/skills/project-session-manager
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Project Session Manager in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Project Session Manager on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Project Session Manager is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Project Session Manager (PSM) Skill

Automate isolated development environments using git worktrees and tmux sessions with Factory Droid. Enables parallel work across multiple tasks, projects, and repositories.

Commands

CommandDescriptionExample
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
cleanupClean merged/closed/psm cleanup
statusCurrent 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)

json
{
  "aliases": {
    "omd": {
      "repo": "MeroZemory/oh-my-droid",
      "local": "~/Workspace/oh-my-droid",
      "default_base": "main"
    }
  },
  "defaults": {
    "worktree_root": "~/.psm/worktrees",
    "cleanup_after_days": 14
  }
}

Directory Structure

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

Session Naming

TypeTmux SessionWorktree Dir
PR Reviewpsm:omc:pr-123~/.psm/worktrees/omd/pr-123
Issue Fixpsm:omc:issue-42~/.psm/worktrees/omd/issue-42
Featurepsm:omc:feat-auth~/.psm/worktrees/omd/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-droid, --no-tmux, etc.

Subcommand: review <ref>

Purpose: Create PR review session

Steps:

  1. 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
  2. Fetch PR info:

    bash
    gh pr view <pr_number> --repo <repo> --json number,title,author,headRefName,baseRefName,body,files,url
  3. 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
  4. 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"
  5. 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
  6. Update sessions registry:

    bash
    # Add to ~/.psm/sessions.json
  7. Create tmux session:

    bash
    tmux new-session -d -s "psm:$project_alias:pr-$pr_number" -c "$worktree_path"
  8. Launch Factory Droid (unless --no-droid):

    bash
    tmux send-keys -t "psm:$project_alias:pr-$pr_number" "droid" Enter
  9. Output session info:

    Session ready!
    
      ID: omc:pr-123
      Worktree: ~/.psm/worktrees/omd/pr-123
      Tmux: psm:omc:pr-123
    
    To attach: tmux attach -t psm:omc:pr-123

Subcommand: fix <ref>

Purpose: Create issue fix session

Steps:

  1. Resolve reference (same as review)

  2. Fetch issue info:

    bash
    gh issue view <issue_number> --repo <repo> --json number,title,body,labels,url
  3. 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
  4. Create worktree:

    bash
    worktree_path="$HOME/.psm/worktrees/$project_alias/issue-$issue_number"
    git worktree add "$worktree_path" "$branch_name"
  5. Create session metadata (similar to review, type="fix")

  6. Update registry, create tmux, launch droid (same as review)

Subcommand: feature <project> <name>

Purpose: Start feature development

Steps:

  1. Resolve project (from alias or path)

  2. Create feature branch:

    bash
    cd "$local_path"
    git fetch origin main
    branch_name="feature/$feature_name"
    git checkout -b "$branch_name" origin/main
  3. Create worktree:

    bash
    worktree_path="$HOME/.psm/worktrees/$project_alias/feat-$feature_name"
    git worktree add "$worktree_path" "$branch_name"
  4. Create session, tmux, launch droid (same pattern)

Subcommand: list [project]

Purpose: List active sessions

Steps:

  1. Read sessions registry:

    bash
    cat ~/.psm/sessions.json 2>/dev/null || echo '{"sessions":{}}'
  2. Check tmux sessions:

    bash
    tmux list-sessions -F "#{session_name}" 2>/dev/null | grep "^psm:"
  3. Check worktrees:

    bash
    ls -la ~/.psm/worktrees/*/ 2>/dev/null
  4. Format output:

    Active PSM Sessions:
    
    ID                 | Type    | Status   | Worktree
    -------------------|---------|----------|---------------------------
    omc:pr-123        | review  | active   | ~/.psm/worktrees/omd/pr-123
    omc:issue-42      | fix     | detached | ~/.psm/worktrees/omd/issue-42

Subcommand: attach <session>

Purpose: Attach to existing session

Steps:

  1. Parse session ID: project:type-number

  2. Verify session exists:

    bash
    tmux has-session -t "psm:$session_id" 2>/dev/null
  3. Attach:

    bash
    tmux attach -t "psm:$session_id"

Subcommand: kill <session>

Purpose: Kill session and cleanup

Steps:

  1. Kill tmux session:

    bash
    tmux kill-session -t "psm:$session_id" 2>/dev/null
  2. 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
  3. Update registry:

    bash
    # Remove from sessions.json

Subcommand: cleanup

Purpose: Clean up merged PRs and closed issues

Steps:

  1. Read all sessions

  2. For each PR session, check if merged:

    bash
    gh pr view <pr_number> --repo <repo> --json merged,state
  3. For each issue session, check if closed:

    bash
    gh issue view <issue_number> --repo <repo> --json closed,state
  4. Clean up merged/closed sessions:

    • Kill tmux session
    • Remove worktree
    • Update registry
  5. Report:

    Cleanup complete:
      Removed: omc:pr-123 (merged)
      Removed: omc:issue-42 (closed)
      Kept: omc:feat-auth (active)

Subcommand: status

Purpose: Show current session info

Steps:

  1. Detect current session from tmux or cwd:

    bash
    tmux display-message -p "#{session_name}" 2>/dev/null
    # or check if cwd is inside a worktree
  2. Read session metadata:

    bash
    cat .psm-session.json 2>/dev/null
  3. Show status:

    Current Session: omc:pr-123
    Type: review
    PR: #123 - Add webhook support
    Branch: feature/webhooks
    Created: 2 hours ago

Error Handling

ErrorResolution
Worktree existsOffer: attach, recreate, or abort
PR not foundVerify URL/number, check permissions
No tmuxWarn and skip session creation
No gh CLIError with install instructions

Requirements

  • git with worktree support (v2.5+)
  • gh CLI (authenticated)
  • tmux
  • jq for JSON parsing

Initialization

On first run, create default config:

bash
mkdir -p ~/.psm/worktrees ~/.psm/logs

# Create default projects.json if not exists
if [[ ! -f ~/.psm/projects.json ]]; then
  cat > ~/.psm/projects.json << 'EOF'
{
  "aliases": {
    "omd": {
      "repo": "MeroZemory/oh-my-droid",
      "local": "~/Workspace/oh-my-droid",
      "default_base": "main"
    }
  },
  "defaults": {
    "worktree_root": "~/.psm/worktrees",
    "cleanup_after_days": 14,
    "auto_cleanup_merged": true
  }
}
EOF
fi

# Create sessions.json if not exists
if [[ ! -f ~/.psm/sessions.json ]]; then
  echo '{"version":1,"sessions":{},"stats":{"total_created":0,"total_cleaned":0}}' > ~/.psm/sessions.json
fi

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Project Session Manager AI skill do?

Manage isolated dev environments with git worktrees and tmux sessions

Why use Project Session Manager on TypingMind?

Because you install it once and use it with any model. Project Session Manager is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Project Session Manager in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/MeroZemory/oh-my-droid/tree/main/skills/project-session-manager. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Project Session Manager?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Project Session Manager?

As many as you like. As long as a model supports skills, you can use Project Session Manager with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Project Session Manager AI skill free?

Yes. It is published on GitHub by MeroZemory under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇