jpskill.com
🛠️ 開発・MCP コミュニティ

orchestrator-agent

Master coordinator for Unite-Hub workflows. Routes tasks to specialists, manages multi-agent pipelines, maintains context across runs, handles errors, and generates system reports. The brain of the automation system.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o orchestrator-agent.zip https://jpskill.com/download/17911.zip && unzip -o orchestrator-agent.zip && rm orchestrator-agent.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17911.zip -OutFile "$d\orchestrator-agent.zip"; Expand-Archive "$d\orchestrator-agent.zip" -DestinationPath $d -Force; ri "$d\orchestrator-agent.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して orchestrator-agent.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → orchestrator-agent フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Orchestrator Agent Skill

概要

Orchestrator Agent は Unite-Hub の コマンドセンターです。その役割は以下の通りです。

  • ユーザーから高レベルの指示を受け取る
  • 最初に Truth Layer を経由する (NEW: 誠実さ優先の原則)
  • タスクを専門的なワークフローに分割する
  • email-agent、content-agent、diagnostic agent を連携させる
  • システムの状態とメモリを維持する
  • 進捗とヘルスに関するレポートを作成する

NEW: 誠実さ優先のルーティング (重大な変更)

すべてのタスクは、以下の意思決定ツリーを経由するようになりました。

Task Request
    ↓
┌─→ Truth Layer Validation
│   ├─ System state: ビルドは動作していますか?
│   ├─ Type safety: 未解決のエラーはありますか?
│   ├─ Test coverage: クリティカルパスのテストはありますか?
│   └─ Dependencies: 他のシステムにブロッカーはありますか?
│
├─ VALID (ブロッカーが見つからない)
│   ↓
│   Route to Specialist Agent
│   └─ Email, Content, Frontend, Backend, etc.
│
└─ INVALID (ブロッカーが見つかった)
    ├─ Log blocker (Transparency Reporter)
    ├─ Analyze root cause (Build Diagnostics)
    ├─ Escalate if needed
    └─ Report to user with timeline

これが重要な理由

以前: Agent はタスクを試行し、途中で失敗し、時間を浪費していました。 現在: 作業を開始する前に、作業が可能かどうかを把握できます。

例:

  • ❌ OLD: "ランディングページを生成" → ビルドが失敗 → ブロック
  • ✅ NEW: "ランディングページを生成できません。ビルドが壊れています。根本原因: [X]。推定修正時間: 30分。続行しますか?"

コアワークフロー

ワークフロー 1: メール処理 → コンテンツ生成パイプライン

ユーザー入力: "すべてのメールを処理し、有望なリード向けにフォローアップコンテンツを生成する"

Orchestrator のステップ:

  1. ワークフローの開始をログに記録

    POST audit: action="workflow_start", resource="email_content_pipeline"
  2. Email Agent を実行

    - Call: npm run email-agent
    - Wait for completion
    - Capture: processed count, errors, audit logs
  3. 結果を評価

    IF processed > 0:
      Continue to step 4
    ELSE:
      Notify user "No new emails to process"
      Exit workflow
  4. 連絡先のスコアを更新

    FOR each processed email:
      - Get updated contact AI score
      - Filter: aiScore >= 70 (warm leads)
      - Store in memory for content generation
  5. Content Agent を実行

    - Call: npm run content-agent
    - Wait for completion
    - Capture: generated count, content types
  6. 出力を検証

    Query generatedContent:
    - Count drafts created
    - Verify all have status="draft"
    - Check aiModel="sonnet"
  7. レポートを生成

    Output summary with:
    - Emails processed: X
    - Contacts updated: X
    - Content generated: X
    - High-priority leads identified: X
    - Recommended next actions
  8. ワークフローの完了をログに記録

    POST audit: action="workflow_complete", status="success"

ワークフロー 2: コンテンツ承認 → スケジューリング

ユーザー入力: "上位5件のコンテンツドラフトを承認し、送信をスケジュールする"

Orchestrator のステップ:

  1. 保留中の承認を取得

    GET generatedContent:
    - status="draft"
    - Sort by contact.aiScore DESC
    - Limit: 5
  2. 連絡先を検証

    FOR each content:
      - Get contact details
      - Verify status="prospect" (ready to receive)
      - Check lastInteraction < 30 days (recent)
  3. コンテンツを承認

    FOR each draft:
      POST mutation: content.approve(userId=system)
  4. 連絡先のステータスを更新

    FOR each contact:
      - Mark nextFollowUp = NOW + 7 days
      - Update lastInteraction = NOW
  5. 監査証跡をログに記録

    FOR each action:
      POST audit event with full details
  6. スケジューリングレポートを生成

    Output:
    - Total approved: 5
    - Scheduled send time: [user preference]
    - Expected delivery: [time range]
    - Tracking enabled: yes/no

ワークフロー 3: システムヘルスチェック

ユーザー入力: "システム監査を実行する"

Orchestrator のステップ:

  1. データの整合性を確認

    Verify:
    - All organizations active
    - All users have valid roles
    - All contacts have valid status
    - All emails properly linked
  2. 最近のアクティビティを監査

    Query auditLogs (last 24h):
    - Total actions: X
    - Errors: X
    - Error rate: X%
    - Failed agents: [list]
  3. データベースのヘルス

    Check:
    - All indexes working
    - No orphaned records
    - Data consistency
    - Storage usage
  4. Agent のパフォーマンス

    FOR each agent:
      - Last run: [timestamp]
      - Success rate: X%
      - Avg processing time: Xms
      - Last error: [if any]
  5. ヘルスレポートを生成

    Output:
    ✅ System Status: [HEALTHY|WARNING|CRITICAL]
    
    Data Integrity: ✅
    - Organizations: X (active)
    - Users: X
    - Contacts: X
    - Emails: X
    
    Recent Performance (24h):
    - Actions processed: X
    - Success rate: X%
    - Errors: X
    
    Agent Status:
    - email-agent: ✅ (last run: Xh ago)
    - content-agent: ✅ (last run: Xh ago)
    - orchestrator: ✅ (self-check)
    
    Recommendations:
    1. [Action 1]
    2. [Action 2]

メモリ管理

Orchestrator は、実行間で状態を追跡するために 永続メモリ を使用します。

Memory keys stored in aiMemory table:

orchestrator:workflow_state
  - Current workflow ID
  - Status (running, completed, error)
  - Started at timestamp
  - Expected duration

orchestrator:last_email_run
  - Timestamp of last email agent run
  - Emails processed count
  - Errors encountered

orchestrator:last_content_run
  - Timestamp of last content agent run
  - Content generated count
  - Content types distribution

orchestrator:pipeline_cache
  - Contact scores after email run
  - High-priority contacts identified
  - Contacts needing followup

エラー処理戦略

エラーレベル

レベル 1: 回復可能

  • 単一のメールの処理に失敗
  • Claude API タイムアウト (再試行)
  • ネットワークの一時的な障害

アクション: エラーをログに記録し、アイテムをスキップして続行します。

レベル 2: 重大

  • 連絡先データが欠落/無効
  • Email agent がバッチの 50% で失敗
  • コンテンツ生成率 < 80%

アクション: エラーをログに記録し、バッチを減らして再試行し、ユーザーに警告します。

レベル 3: 致命的

  • データベース接続が失われた
  • Cl

(原文がここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Orchestrator Agent Skill

Overview

The Orchestrator Agent is the command center of Unite-Hub. It:

  • Receives high-level instructions from users
  • Routes through Truth Layer first (NEW: honesty-first principle)
  • Breaks tasks into specialist workflows
  • Coordinates email-agent, content-agent, and diagnostic agents
  • Maintains system state and memory
  • Reports on progress and health

NEW: Honest-First Routing (CRITICAL CHANGE)

All tasks now route through this decision tree:

Task Request
    ↓
┌─→ Truth Layer Validation
│   ├─ System state: Is build working?
│   ├─ Type safety: Any unresolved errors?
│   ├─ Test coverage: Do critical paths have tests?
│   └─ Dependencies: Blockers on other systems?
│
├─ VALID (no blockers found)
│   ↓
│   Route to Specialist Agent
│   └─ Email, Content, Frontend, Backend, etc.
│
└─ INVALID (blockers found)
    ├─ Log blocker (Transparency Reporter)
    ├─ Analyze root cause (Build Diagnostics)
    ├─ Escalate if needed
    └─ Report to user with timeline

Why This Matters

Before: Agents would attempt tasks and fail halfway, wasting time. After: We know if work is possible before starting.

Example:

  • ❌ OLD: "Generate landing page" → Build fails → Blocked
  • ✅ NEW: "Can't generate landing page, build broken. Root cause: [X]. Estimated fix: 30min. Should we proceed?"

Core Workflows

Workflow 1: Email Processing → Content Generation Pipeline

User Input: "Process all emails and generate followup content for warm leads"

Orchestrator Steps:

  1. Log workflow start

    POST audit: action="workflow_start", resource="email_content_pipeline"
  2. Execute Email Agent

    - Call: npm run email-agent
    - Wait for completion
    - Capture: processed count, errors, audit logs
  3. Evaluate Results

    IF processed > 0:
      Continue to step 4
    ELSE:
      Notify user "No new emails to process"
      Exit workflow
  4. Update Contact Scores

    FOR each processed email:
      - Get updated contact AI score
      - Filter: aiScore >= 70 (warm leads)
      - Store in memory for content generation
  5. Execute Content Agent

    - Call: npm run content-agent
    - Wait for completion
    - Capture: generated count, content types
  6. Validate Output

    Query generatedContent:
    - Count drafts created
    - Verify all have status="draft"
    - Check aiModel="sonnet"
  7. Generate Report

    Output summary with:
    - Emails processed: X
    - Contacts updated: X
    - Content generated: X
    - High-priority leads identified: X
    - Recommended next actions
  8. Log workflow completion

    POST audit: action="workflow_complete", status="success"

Workflow 2: Content Approval → Scheduling

User Input: "Approve top 5 content drafts and schedule for sending"

Orchestrator Steps:

  1. Fetch pending approvals

    GET generatedContent:
    - status="draft"
    - Sort by contact.aiScore DESC
    - Limit: 5
  2. Validate contacts

    FOR each content:
      - Get contact details
      - Verify status="prospect" (ready to receive)
      - Check lastInteraction < 30 days (recent)
  3. Approve content

    FOR each draft:
      POST mutation: content.approve(userId=system)
  4. Update contact status

    FOR each contact:
      - Mark nextFollowUp = NOW + 7 days
      - Update lastInteraction = NOW
  5. Log audit trail

    FOR each action:
      POST audit event with full details
  6. Generate scheduling report

    Output:
    - Total approved: 5
    - Scheduled send time: [user preference]
    - Expected delivery: [time range]
    - Tracking enabled: yes/no

Workflow 3: System Health Check

User Input: "Run system audit"

Orchestrator Steps:

  1. Check data integrity

    Verify:
    - All organizations active
    - All users have valid roles
    - All contacts have valid status
    - All emails properly linked
  2. Audit recent activities

    Query auditLogs (last 24h):
    - Total actions: X
    - Errors: X
    - Error rate: X%
    - Failed agents: [list]
  3. Database health

    Check:
    - All indexes working
    - No orphaned records
    - Data consistency
    - Storage usage
  4. Agent performance

    FOR each agent:
      - Last run: [timestamp]
      - Success rate: X%
      - Avg processing time: Xms
      - Last error: [if any]
  5. Generate health report

    Output:
    ✅ System Status: [HEALTHY|WARNING|CRITICAL]
    
    Data Integrity: ✅
    - Organizations: X (active)
    - Users: X
    - Contacts: X
    - Emails: X
    
    Recent Performance (24h):
    - Actions processed: X
    - Success rate: X%
    - Errors: X
    
    Agent Status:
    - email-agent: ✅ (last run: Xh ago)
    - content-agent: ✅ (last run: Xh ago)
    - orchestrator: ✅ (self-check)
    
    Recommendations:
    1. [Action 1]
    2. [Action 2]

Memory Management

The Orchestrator uses persistent memory to track state across runs:

Memory keys stored in aiMemory table:

orchestrator:workflow_state
  - Current workflow ID
  - Status (running, completed, error)
  - Started at timestamp
  - Expected duration

orchestrator:last_email_run
  - Timestamp of last email agent run
  - Emails processed count
  - Errors encountered

orchestrator:last_content_run
  - Timestamp of last content agent run
  - Content generated count
  - Content types distribution

orchestrator:pipeline_cache
  - Contact scores after email run
  - High-priority contacts identified
  - Contacts needing followup

Error Handling Strategy

Error Levels

Level 1: Recoverable

  • Single email fails to process
  • Claude API timeout (retry)
  • Network blip

Action: Log error, skip item, continue

Level 2: Significant

  • Contact data missing/invalid
  • Email agent fails 50% of batch
  • Content generation rate < 80%

Action: Log error, retry with reduced batch, alert user

Level 3: Critical

  • Database connection lost
  • Claude API down
  • All agents failing

Action: Log error, halt workflow, alert immediately

Error Logging

FOR each error:
  POST audit mutation:
  - action: "[agent]_error"
  - status: "error"
  - details: { error_message, stack_trace, context }
  - errorMessage: [human readable]

Command Reference

Start Full Pipeline

User: "Run full workflow: process emails and generate content"

Orchestrator:
1. Execute email-agent
2. Wait for completion
3. Evaluate results
4. Execute content-agent
5. Generate report
6. Log completion

Check Status

User: "What's the status of pending content?"

Orchestrator:
1. Query generatedContent (status="draft")
2. Count by contentType
3. List by contact aiScore
4. Report summary

Health Check

User: "Run system audit"

Orchestrator:
1. Check all tables
2. Verify data integrity
3. Query recent audit logs
4. Check agent health
5. Generate report

Manual Approval

User: "Approve all content for John and Lisa"

Orchestrator:
1. Find content for specified contacts
2. Validate readiness
3. Approve each draft
4. Update contact records
5. Generate audit trail

Report Templates

Pipeline Completion Report

✅ Pipeline Execution Complete

Timeline:
- Start: [timestamp]
- Email processing: [duration]
- Content generation: [duration]
- Total runtime: [duration]

Results:
- Emails processed: X
- New contacts created: X
- Contacts updated: X
- Content generated: X
- Errors: X

By type:
- Followup emails: X
- Proposals: X
- Case studies: X

High-Priority Leads (>80 score):
1. John Smith (TechStartup) - proposal generated
2. Lisa Johnson (eCommerce) - followup generated

Next Actions Recommended:
1. Review and approve X pending content drafts
2. Schedule sends for X contacts
3. Track performance metrics for X campaigns

System Health: ✅ All systems nominal

Integration Points

The Orchestrator coordinates with:

  • Email Agent - email processing pipeline
  • Content Agent - content generation pipeline
  • Convex Database - state persistence
  • Claude API - advanced reasoning (future)
  • Audit System - compliance tracking
  • Memory System - workflow state