Back to Skills

collab-session-mgmt

verified

Detailed procedures for finding, creating, and resuming collab sessions

View on GitHub

Marketplace

mermaid-collab-dev

ben-mad-jlp/claude-mermaid-collab

Plugin

mermaid-collab

Repository

ben-mad-jlp/claude-mermaid-collab

skills/collab-session-mgmt/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/ben-mad-jlp/claude-mermaid-collab/blob/main/skills/collab-session-mgmt/SKILL.md -a claude-code --skill collab-session-mgmt

Installation paths:

Claude
.claude/skills/collab-session-mgmt/
Powered by add-skill CLI

Instructions

# Session Management

Detailed procedures for finding, creating, and resuming collab sessions.

---

## Step 2: Find Sessions

```bash
ls -d .collab/*/ 2>/dev/null | xargs -I{} basename {}
```

**If sessions exist:**
1. For each session, get phase via MCP:
   ```
   Tool: mcp__plugin_mermaid-collab_mermaid__get_session_state
   Args: { "project": "<absolute-path-to-cwd>", "session": "<session-name>" }
   ```
   Returns: `{ "phase": "brainstorming", "lastActivity": "...", ... }`
2. Display list with numbered options:
   ```
   Existing sessions:

   1. bright-calm-river - brainstorming
   2. swift-green-meadow - implementation
   3. Create new session

   Select option (1-3):
   ```
3. If user selects existing session number → Jump to **Step 5: Resume Session**
4. If user selects 'new' option → Continue to **Step 3**

**If no sessions exist:** Continue to **Step 3**

---

## Step 3: Create Session

### 3.1 Ensure .gitignore

```bash
if [ -f .gitignore ]; then
  git check-ignore -q .collab 2>/dev/null || echo ".collab/" >> .gitignore
fi
```

**Note:** Only modifies `.gitignore` if it already exists. Does not create a new `.gitignore` file.

### 3.2 Generate or Choose Name

1. Generate a suggested name:
   ```
   Tool: mcp__plugin_mermaid-collab_mermaid__generate_session_name
   Args: {}
   ```
   Returns: `{ name: "bright-calm-river" }`

2. Present options to user:
   ```
   Generated session name: bright-calm-river

   1. Use this name
   2. Pick my own name

   Select option (1-2):
   ```

3. If user selects "1. Use this name":
   - Use the generated name
   - Continue to Step 3.3

4. If user selects "2. Pick my own name":
   a. Prompt: "Enter session name (alphanumeric and hyphens only):"
   b. Validate input:
      - Must match pattern: /^[a-zA-Z0-9-]+$/
      - Must not be empty
   c. If invalid:
      - Show error: "Invalid name. Use only letters, numbers, and hyphens."
      - Return to step 4a (re-prompt)
   d. If valid:
      - Use the custom name
      - Con

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5101 chars