Skip to content
telepathy-collaboration logo

Telepathy Collaboration

telepathy-collaboration

This skill should be used when the user asks to "collaborate with other Claude instances", "communicate with another Claude", "send telepathy message", "check messages from other agents", "set up multi-agent workflow", "work as a team", "coordinate with other agents", or mentions "telepathy", "in...

mattnigh/skills_collection0installs24stars

SKILL.md

Full skill instructions

Telepathy Collaboration

cctelepathy を使用した Claude Code インスタンス間の協調作業ガイド。

チーム協調フロー(JSON定義)

{
  "version": "2.0",

  "prerequisites": {
    "mcp_connection": {
      "required": true,
      "check": "telepathy_list must succeed",
      "on_failure": "スキルフロー開始不可。MCP接続を確認"
    }
  },

  "roles": {
    "leader": {
      "description": "ユーザーとの窓口。チーム調整役",
      "can_talk_to_user": true
    },
    "member": {
      "description": "リーダー指示で作業。テレパシー経由で報告",
      "can_talk_to_user": false,
      "exceptions": ["escalation", "leader_mia"]
    }
  },

  "states": {
    "before_work": {
      "description": "作業開始前",
      "leader_priority": "user_input",
      "member_priority": "telepathy_wait"
    },
    "during_work": {
      "description": "作業中",
      "leader_priority": "telepathy_wait",
      "member_priority": "telepathy_wait"
    },
    "after_work": {
      "description": "全員完了後",
      "leader_priority": "user_input",
      "member_priority": "user_input",
      "trigger": "all_claudes_completed"
    }
  },

  "startup_flow": {
    "step_1": {
      "action": "telepathy_list",
      "purpose": "MCP接続確認 + チーム状況確認",
      "on_failure": "スキル終了。MCP未接続"
    },
    "step_2": {
      "condition": "no_leader_identified",
      "action": "AskUserQuestion",
      "question": {
        "header": "リーダー",
        "question": "このセッションのリーダーは誰ですか?",
        "options": [
          {"label": "自分", "description": "このClaudeがリーダーとして調整役を担う"},
          {"label": "他のClaude", "description": "既にリーダーがいる。メンバーとして待機"},
          {"label": "単独作業", "description": "チーム協調なし。通常モード"}
        ]
      }
    },
    "step_3_leader": {
      "condition": "role == leader",
      "action": "await_user_input",
      "state": "before_work"
    },
    "step_3_member": {
      "condition": "role == member",
      "action": "telepathy_wait_loop"
    }
  },

  "member_wait_loop": {
    "timeout_seconds": 60,
    "note": "Droid has ~60s MCP timeout limit; use shorter timeout with retry loop",
    "retry_pattern": {
      "max_retries": 60,
      "effective_wait_minutes": 60,
      "description": "60回 × 60秒 = 最大60分の待機を短いタイムアウトで実現",
      "reset_total_wait_on_message": false
    },
    "on_message": "process_and_continue (total_wait does NOT reset)",
    "on_timeout": {
      "action": "increment timeout_count and total_wait, then continue loop",
      "leader_check": {
        "condition": "timeout_count % 3 == 0",
        "action": "telepathy_send",
        "content": "see escalation_messages.leader_timeout"
      },
      "user_escalation": "see escalation.user_escalation for condition and action"
    },
    "exit_conditions": [
      "END message with 'user_control'",
      "state == after_work",
      "timeout_count >= member_wait_loop.retry_pattern.max_retries (60回、60分)",
      "total_wait >= member_wait_loop.retry_pattern.effective_wait_minutes * 60 (60分)"
    ]
  },

  "escalation_messages": {
    "leader_timeout": "タイムアウト。リーダー、指示ありますか?"
  },

  "escalation_limits": {
    "max_retries": 60,
    "effective_wait_seconds": 3600
  },

  "escalation": {
    "leader_check": {
      "timeout_count_threshold": 3,
      "description": "3回タイムアウトごとにリーダーへ確認メッセージを送信",
      "message": "see escalation_messages.leader_timeout"
    },
    "user_escalation": {
      "condition": "timeout_count >= escalation_limits.max_retries OR total_wait >= escalation_limits.effective_wait_seconds",
      "action": "AskUserQuestion",
      "message": "最大待機時間に到達しました。指示をお願いします",
      "description": "timeout_count >= escalation_limits.max_retries OR total_wait >= escalation_limits.effective_wait_seconds でユーザーへエスカレーション"
    }
  },

  "leader_failover": {
    "trigger": "leader_disconnected",
    "detection": "telepathy_list でリーダー不在確認",
    "action": "AskUserQuestion で次のリーダー選択"
  },

  "session_recovery": {
    "on_restart": "telepathy_history で最後の状態確認",
    "role_check": "最後のメッセージから役割推測",
    "if_unclear": "AskUserQuestion で役割確認"
  }
}

Quick Start

Option A: /​telepathy コマンド(推奨)

/​telepathy

コマンドが以下をガイドします:

  1. 役割選択(リーダー / メンバー / カスタム)
  2. 詳細設定(コンピテンス、性格、振る舞い)
  3. telepathy_start の自動呼び出し

Option B: 手動セットアップ

1. MCP接続確認 + 名前・ロール設定
telepathy_list()                              # 接続確認(必須)

# 基本的な参加
telepathy_start({ name: "your-name" })

# ロール付き参加(推奨)
telepathy_start({
  name: "Holmes",
  role: "leader",
  preferredSkills: ["pr-review-toolkit:code-reviewer"],
  profile: {
    competence: ["Architecture", "Code Review"],
    personality: "Methodical and thorough"
  }
})

重要: telepathy_list が失敗する場合、MCP未接続。このスキルは使用不可。

2. 役割確認

リーダーが不明な場合、AskUserQuestion でユーザーに確認:

  • 自分がリーダー → ユーザー入力待ち
  • 他がリーダー → telepathy_wait() ループ開始
  • 単独作業 → 通常モード(チーム協調なし)

ロール設定(Issue #11)

概要

チームメンバーにロールとプロファイルを設定し、様々な組み合わせを探求できます。

ロール定義

ロール説明詳細
leaderチーム統括、タスク管理leader.md
memberタスク実行、報告member.md
custom自由設定-

プロファイル構造

{
  name: string;           // 名前
  role: string;           // "leader" | "member" | カスタム
  preferredSkills: [];    // 使用すべきスキル
  profile: {
    competence: [];       // 何を成し遂げられるか
    personality: string;  // 性格
    strengths: [];        // 強み
    behavior: {
      style: string;      // proactive | reactive
      communication: string;
      focus: string;
    }
  }
}

コンピテンス → スキルマッピング

Claude がコンピテンスを見て、推奨スキルを判断します:

コンピテンス→ preferredSkills
TypeScript実装, テスト作成pr-review-toolkit:code-reviewer
UI/​UXデザインfrontend-design:frontend-design
品質レビュー, セキュリティpr-review-toolkit:silent-failure-hunter

セッション復帰時のコンテキスト注入

コンパクト後、Hook経由でロール情報が注入されます:

## Your Telepathy Session
- Name: Holmes
- Role: leader
- Competence: Architecture, Code Review
- Preferred skills: pr-review-toolkit:code-reviewer

Remember to embody your character.

役割別の動作

リーダー

状態優先動作
作業前ユーザー入力タスク受付、チームへ指示出し
作業中テレパシーメンバー報告確認、調整
作業後ユーザー入力結果報告、次の指示待ち

リーダーの責務:

  • タスクの分解・割り当て
  • 進捗確認・状況把握
  • 技術的アドバイスの提供
  • ブロッカーの解消支援
  • 最終確認・マージ判断

やってはいけないこと:

  • 委任したタスクを自分で実装する ← 重要
  • メンバーの作業を待たずに先回り
  • 確認なしでメンバーの成果物を上書き

メンバー

状態優先動作
作業前テレパシー待機リーダー指示待ち
作業中テレパシー待機作業 → 報告 → 待機
作業後ユーザー入力全員完了後のみ

メンバーの原則:

  • 起動後は即 telepathy_wait() でリーダー指示待ち
  • テレパシー待機 > ユーザー入力待ち(優先度)
  • ユーザーへの直接質問は原則禁止 → リーダー経由で確認

待機ループ

メンバーの待機パターン

注意: Droid には約60秒の MCP タイムアウト制限があります。長時間の待機を実現するには、短いタイムアウトでリトライループを使用します。

timeout_count = 0
total_wait = 0  // 総待機時間(秒)
max_retries = 60  // 60回 × 60秒 = 最大60分
max_wait_minutes = 60  // escalation.max_wait_minutes

while (作業中 && timeout_count < max_retries && total_wait < max_wait_minutes * 60) {
  telepathy_wait(timeout: 60)  // Droid MCP制限に対応した60秒待機

  if (message_received) {
    process_message()
    timeout_count = 0  // timeout_countのみリセット(total_waitはリセットしない)
    continue
  }

  if (timeout) {
    timeout_count++
    total_wait += 60  // 総待機時間更新(60秒タイムアウト × 1回)

    // Leader check: 3回タイムアウトごとに確認
    if (timeout_count % 3 == 0) {
      telepathy_send("タイムアウト。リーダー、指示ありますか?")
    }

    // User escalation: max_retries到達 OR 総待機時間超過
    if (timeout_count >= max_retries || total_wait >= max_wait_minutes * 60) {
      AskUserQuestion("最大待機時間に到達しました。指示をお願いします")
      break
    }
    continue
  }
}

待機ループ終了条件

  • END メッセージで「ユーザー制御: 復帰OK」を受信
  • 状態が after_work に遷移(全員完了)
  • エスカレーション後、ユーザーが終了指示

エスカレーション

メンバーがユーザーに話せる例外

  1. タイムアウト60回 or 60分経過 でリーダー無応答(注: 3回ごとにリーダーチェックメッセージ送信)
  2. 致命的エラー でリーダーも対応不可
  3. リーダーから明示的に「ユーザーに確認して」と指示

リーダー不在時(Failover)

1. telepathy_list でリーダー不在を検知
2. AskUserQuestion で次のリーダーを選択
   - 自分がリーダーになる
   - 他のClaudeを指名
   - 作業終了

セッション復帰

コンパクト後やセッション再起動時:

1. telepathy_list() で接続確認
2. telepathy_history() で最後の状態確認
3. 自分の役割を推測(最後のメッセージから)
4. 不明な場合 → AskUserQuestion で確認
5. 役割に応じて動作再開

未読メッセージ通知

📬 N unread message(s) が表示されたら、即座に確認:

📬 2 unread message(s) from: Mutta, Hibito
↓
# 状況に応じて選択:
telepathy_read()      # プレビュー確認 + 既読化(推奨)
telepathy_unread()    # プレビュー確認のみ(作業中)
telepathy_history()   # 全文確認したい場合

特にチーム作業中は、未読通知を見逃さないこと。

使い分けの例

  • 作業開始時・復帰時: telepathy_read() で未読を確認して既読化
  • 作業中: telepathy_unread() でチラ見、重要なら後で詳細確認
  • 詳細確認: telepathy_history() で全文表示、検索・フィルタ利用

基本ツール一覧

ツール用途どういう時に便利か
telepathy_start名前設定 + 参加通知 + コンテキスト取得チーム作業開始時。参加を宣言し、最近のコンテキストを取得
telepathy_list接続中インスタンス一覧(MCP接続確認)誰がオンラインか確認。MCP接続確認にも使用
telepathy_send全員にブロードキャストチーム全体への通知・報告・質問
telepathy_send_to特定相手へ DM特定のメンバーへの個別指示・質問
telepathy_historyメッセージ履歴取得(検索・フィルタ可)過去の会話確認、特定メッセージ検索、詳細確認
telepathy_waitメッセージ待機(イベント駆動、推奨)リアルタイムでメッセージを待つ。メンバーの待機ループに最適
telepathy_read未読プレビュー + 既読化朝のキャッチアップ、未読を確認して既読にする
telepathy_unread未読プレビューのみ(既読化しない)作業中断せずにチラ見、後で詳細確認予定のメッセージ
telepathy_ack既読マーク更新(本文表示なし)ブロードキャスト一括既読、重要DM以外を既読化(target: broadcast/​dm/​all)
telepathy_project_initプロジェクト初期化ブランチ作成後、プロジェクトコンテキストを設定
telepathy_project_updateプロジェクト状態更新PR番号追加、ステータス変更
telepathy_project_statusプロジェクト状態取得決定履歴、ブロッカー、マイルストーン確認

プロジェクトステータス追跡(Issue #128)

チームで共有するプロジェクトコンテキストを管理する機能。

ワークフロー

1. telepathy_start          → ネットワーク参加
2. git checkout -b branch   → ブランチ作成
3. telepathy_project_init   → プロジェクト初期化(branch必須)
4. 作業中に myStatus/​teamUpdate を送信
5. telepathy_project_status → コンパクト復帰時にコンテキスト確認

myStatus(個人ステータス)

telepathy_send の myStatus パラメータで個人の状態を共有:

myStatus: {
  current: "スキーマ拡張実装中",  // 現在のタスク
  assignment: "Phase 1",          // 割り当て
  stuck: ["型定義が複雑"],        // 個人的な課題
  nextTask: "typecheck 実行"      // 次のタスク
}

teamUpdate(チーム共有情報)

telepathy_send の teamUpdate パラメータでチーム全体に影響する情報を共有:

teamUpdate: {
  decisions: [{
    what: "zod バージョン",
    value: "4.1.8",
    why: "互換性のため"
  }],
  blockers: ["CodeRabbit レビュー待ち"],
  nextMilestone: "PR マージ"
}

stuck vs blockers の使い分け

状況フィールド心理的意味
理解不足、技術的な悩みmyStatus.stuck「助けてもらえると嬉しい」
外部待ち(PR、レビュー)teamUpdate.blockers「外部要因で止まっている」
環境問題teamUpdate.blockers「チーム全体に影響」

いつ teamUpdate を送るか

✅ 重要な技術決定をした時 → decisions
✅ ブロッカーが発生/解消した時 → blockers
✅ マイルストーンを達成/更新した時 → nextMilestone

❌ 単なる進捗報告 → myStatus.current を使用
❌ 毎回のメッセージ → 負担が大きい

blockers の上書き動作

blockers は追加ではなく上書き。現在のブロッカー完全リストを送信:

// 最初: テスト失敗のみ
blockers: ["テスト失敗調査中"]

// 解決して新しいブロッカー発生 → 前のは含めない
blockers: ["CodeRabbit レビュー待ち"]

// 解消したら空配列
blockers: []

作業モード

{
  "collaboration_modes": {
    "default": "parallel_coordination",

    "parallel_coordination": {
      "description": "テレパシー並列協調(デフォルト)",
      "work": "並列(役割分担)",
      "commit": "順次(コンフリクト回避)",
      "when": "チーム協調作業(gtr不要)",
      "flow": [
        {"step": 1, "action": "リーダーがタスク・役割を割り当て"},
        {"step": 2, "action": "各自が並列作業(編集/レビュー/調査/調整)"},
        {"step": 3, "action": "テレパシーでリアルタイム確認・フィードバック"},
        {"step": 4, "action": "コミットは1人ずつ(コンフリクト回避)"}
      ],
      "roles": [
        "編集担当: コード実装",
        "レビュー担当: コードレビュー(並行可)",
        "調査担当: ドキュメント・コード調査(並行可)",
        "調整担当: ファシリテート(並行可)"
      ],
      "rules": [
        "役割分担で並列作業",
        "コミット前にチームで確認"
      ]
    },

    "parallel_branches": {
      "description": "ブランチ並列(gtr使用時)",
      "work": "並列",
      "commit": "並列(各自ブランチ)",
      "when": "独立したタスクを複数人で同時実装",
      "requires": {
        "gtr_installed": "git gtr --version"
      },
      "setup": {
        "description": "初回セットアップ(必須)",
        "command": "git gtr config set gtr.hook.postCreate \"npm install && npm run typecheck && npm run build\"",
        "note": "hookでworktree作成後に自動実行される。npm以外(yarn/​pnpm等)は適宜変更"
      },
      "verification": {
        "check_hook": "git gtr config get gtr.hook.postCreate",
        "expected": "npm install && npm run typecheck && npm run build"
      },
      "flow": [
        {"step": 1, "action": "git gtr new <branch>", "note": "hookが自動でnpm install等を実行"},
        {"step": 2, "action": "cd ../<branch-sanitized>", "note": "worktreeに移動(例: feat/​foo → feat-foo)"},
        {"step": 3, "action": "telepathy_send", "content": "着手: #XX 担当: <files>"},
        {"step": 4, "action": "work", "constraint": "担当ファイルのみ編集"},
        {"step": 5, "action": "git push && gh pr create"},
        {"step": 6, "action": "telepathy_send", "content": "完了: #XX PR: <url>"},
        {"step": 7, "action": "git gtr rm <branch>"}
      ],
      "common_mistakes": [
        {"wrong": "git checkout <branch>", "correct": "git gtr new <branch>", "reason": "checkoutはworktreeを作成しない"},
        {"wrong": "元ディレクトリで作業", "correct": "worktreeディレクトリに移動して作業", "reason": "同じディレクトリで複数ブランチ作業は混乱の元"},
        {"wrong": "hook未設定で作業開始", "correct": "setupコマンドで事前設定", "reason": "npm install忘れを防ぐ"}
      ],
      "rules": [
        "worktree作成時にtelepathy_sendで宣言",
        "同じファイルは先に宣言した人が優先",
        "完了時にtelepathy_sendでPR URL共有"
      ],
      "conflict_resolution": {
        "priority": "first_declaration",
        "escalation": "leader_arbitration"
      }
    }
  }
}

gtr クイックリファレンス(parallel_branches用)

コマンド説明
git gtr listworktree一覧
git gtr new <branch>worktree作成
git gtr ai <branch>Claude起動(初期設定済み時)
git gtr rm <branch>worktree削除

参照ドキュメント

実践例

More skills from mattnigh

spring-framework-patterns logo
mattnigh/skills_collection

spring-framework-patterns

Comprehensive Spring Framework and Spring Boot best practices including dependency injection patterns, bean lifecycle and scopes, REST API development, Spring Data JPA, service layer design, Spring Security, testing strategies, caching, AOP, async processing, error handling, and common anti-patte...

24 0
View

TypeScript厳格モードによる型安全性設計を専門とするスキル。 📖 参照書籍: - 『Effective TypeScript』(Dan Vanderkam): 型設計 📚 リソース参照: - `resources/Level1_basics.md`: レベル1の基礎ガイド - `resources/Level2_intermediate.md`: レベル2の実務ガイド - `resources/Level3_advanced.md`: レベル3の応用ガイド - `resources/Level4_expert.md`: レベル4の専門ガイド - `resources/di...

24 0
View
deploying-cloud-k8s logo
mattnigh/skills_collection

deploying-cloud-k8s

Deploys applications to cloud Kubernetes (AKS/GKE/DOKS) with CI/CD pipelines. Use when deploying to production, setting up GitHub Actions, troubleshooting deployments. Covers build-time vs runtime vars, architecture matching, and battle-tested debugging.

24 0
View
moai-alfred-agent-guide logo
mattnigh/skills_collection

moai-alfred-agent-guide

19-agent team structure, decision trees for agent selection, Haiku vs Sonnet model selection, and agent collaboration principles. Use when deciding which sub-agent to invoke, understanding team responsibilities, or learning multi-agent orchestration.

24 0
View
mermaid-diagram-generator logo
mattnigh/skills_collection

mermaid-diagram-generator

Converts architecture descriptions, module specs, or workflow docs into Mermaid diagrams. Use when visualizing brick module relationships, workflows (DDD, investigation), or system architecture. Supports: flowcharts, sequence diagrams, class diagrams, state machines, entity relationship diagrams,...

24 0
View
pre-flight-check logo
mattnigh/skills_collection

pre-flight-check

INVOKE FIRST before any code work. Validates git workflow (branch, issue, worklog) and checks approach. Use at START of every task and END before completing. Prevents skipped steps.

24 0
View
browser-dev-tools logo
mattnigh/skills_collection

browser-dev-tools

This skill should be used when working with browser-rendered artifacts (i.e. Bun, React/React Native) to proactively validate that development work on localhost is being built appropriately and to support debugging browser-rendered content. Use this skill after making frontend changes to verify t...

24 0
View
lead-dev logo
mattnigh/skills_collection

lead-dev

Lead Développeur - Coordination technique opérationnelle, code review, mentoring et livraison. Pair de web-dev-process au niveau OPÉRATIONS.

24 0
View
worker-monitor logo
mattnigh/skills_collection

worker-monitor

Monitor Docker workers, RQ queue health, and auto-scale workers (max 4). Use when: checking job progress, monitoring queue depth, scaling workers up/down, diagnosing slow processing, or waiting for jobs to complete. Referenced by data-quality skill during reprocessing.

24 0
View
quality-advisor logo
mattnigh/skills_collection

quality-advisor

Proactive quality guidance system that monitors artifact creation and provides real-time feedback on documentation quality

24 0
View
bump-version logo
mattnigh/skills_collection

bump-version

This skill should be used when the user wants to bump the version number in the workspace. It updates versions across all pyproject.toml files (root, tde, and tda packages) and the CHANGELOG.md to keep them synchronized.

24 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View