スキル一覧に戻る
ben-mad-jlp

collab

by ben-mad-jlp

Real-time Mermaid diagram collaboration server with MCP integration for Claude Code

0🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: collab description: Use when starting collaborative design work - creates isolated collab sessions with mermaid-collab server user-invocable: false allowed-tools: mcp__plugin_mermaid-collab_mermaid__*, Read, Glob, Grep

MCP-First Principle

Always use MCP tools for session/document operations:

OperationMCP Tool
Server healthcheck_server_health
List sessionslist_sessions
Session stateget_session_state, update_session_state
Documentsget_document, list_documents, create_document, update_document, patch_document
Diagramsget_diagram, list_diagrams, create_diagram, update_diagram, patch_diagram
Snapshotshas_snapshot, save_snapshot, load_snapshot, delete_snapshot
UIrender_ui, update_ui, dismiss_ui

Bash only for:

  • Git commands (git status, git commit, etc.)
  • External tools not available via MCP
  • File operations outside .collab/ folder

Collab Sessions

Start or resume a collaborative design session. The mermaid-collab server must be running.

This skill is the orchestrator for the collab workflow. It manages session creation, the work item loop, and coordinates other skills.


Step 1: Check Server

Tool: mcp__plugin_mermaid-collab_mermaid__check_server_health
Args: {}

Returns: { "mcp": true, "http": true, "ui": true } or error

If not all true:

Server not running. From the plugin directory, run:

  bun run bin/mermaid-collab.ts start

Then run /collab again.

STOP here if server is not running.


Session Management

Session management handles finding existing sessions, creating new sessions, and resuming previous work.

Key steps:

  • Step 2: Find Sessions - List existing sessions with their phases
  • Step 3: Create Session - Generate name, create files, invoke gather-session-goals
  • Step 5: Resume Session - Restore from snapshot or route through ready-to-implement

Invoke skill: collab-session-mgmt for detailed session management procedures.


Work Item Loop

The core orchestration loop (Step 4) that processes work items one at a time.

Key steps:

  • Read design doc and parse work items
  • Find first pending item
  • Route by type (bugfix → systematic-debugging, task → task-planning, code → rough-draft)
  • Mark item documented and continue loop
  • When all items done → invoke ready-to-implement

Invoke skill: collab-work-item-loop for detailed work item loop procedures.


Folder Structure

.collab/
└── <session-name>/
    ├── diagrams/
    ├── documents/
    │   └── design.md
    └── collab-state.json

State Tracking (collab-state.json)

{
  "phase": "brainstorming",
  "lastActivity": "2026-01-19T10:30:00Z",
  "currentItem": null,
  "pendingVerificationIssues": []
}

Fields:

  • phase - Current workflow phase
  • lastActivity - ISO timestamp of last activity
  • currentItem - Item number being processed (null when not in loop)
  • pendingVerificationIssues - Issues from verification phase

Phase values:

  • brainstorming - Work item loop / brainstorming phase
  • rough-draft/interface - Defining interfaces
  • rough-draft/pseudocode - Logic flow
  • rough-draft/skeleton - Stub files
  • implementation - Executing the plan

MCP Tools Reference

All MCP tools use the prefix mcp__plugin_mermaid-collab_mermaid__. For example:

ActionTool
Generate session namemcp__plugin_mermaid-collab_mermaid__generate_session_name()
Create diagrammcp__plugin_mermaid-collab_mermaid__create_diagram({ project, session, name, content })
Create documentmcp__plugin_mermaid-collab_mermaid__create_document({ project, session, name, content })
Preview diagrammcp__plugin_mermaid-collab_mermaid__preview_diagram({ project, session, id })
Preview documentmcp__plugin_mermaid-collab_mermaid__preview_document({ project, session, id })

Note: project is the current working directory (absolute path). session is the session name.


Helper Functions

parseWorkItems(designDoc)

Parses the design doc and extracts work items.

FUNCTION parseWorkItems(doc):
  items = []
  FOR each "### Item N:" section in doc:
    item = {
      number: N,
      title: parse title after "### Item N:",
      type: parse **Type:** field value,
      status: parse **Status:** field value
    }
    ADD item to items
  RETURN items

Example parsing:

### Item 1: Add user authentication
**Type:** feature
**Status:** pending

{ number: 1, title: "Add user authentication", type: "feature", status: "pending" }


Integration

Transitions to:

  • gather-session-goals - After creating new session (collect work items)
  • brainstorming - From work item loop for code and task items
  • systematic-debugging - From work item loop for bugfix items
  • task-planning - From brainstorming for task items
  • rough-draft - From brainstorming for code items
  • ready-to-implement - When all items documented or on resume

Called by:

  • User directly via /collab command
  • Any workflow starting collaborative design work

Related skills:

  • gather-session-goals - Collects and classifies work items at session start
  • brainstorming - Explores requirements for code and task items
  • systematic-debugging - Investigates bugfix items (documentation only)
  • task-planning - Plans operational tasks (prerequisites → steps → verification)
  • ready-to-implement - Central checkpoint, validates all items documented
  • rough-draft - Bridges design to implementation (interface → pseudocode → skeleton)
  • verify-phase - Checks rough-draft output aligns with design
  • executing-plans - Implements the plan with parallel task execution

Collab Workflow Chain:

collab --> gather-session-goals --> work-item-loop --> ready-to-implement --> rough-draft --> executing-plans
                                         |                    ^
                                         |    (all documented)|
                                         v                    |
                                    brainstorming ────────────┤
                                         |                    |
                                    ┌────┴────┐              |
                                    v         v              |
                            task-planning  rough-draft ──────┘
                                    |
                            executing-plans
                                    |
                            systematic-debugging ────────────┘

Resume flow:
collab --> ready-to-implement --> (back to loop if pending) or (rough-draft/task-planning if done)

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です