オプション

plan-orchestrate

affaan-m/ECC affaan-m/ECC

計画文書を読み込み、それを各ステップに分解し、ECCカタログからステップごとのエージェントチェーンを設計し、実行することなく、そのまま貼り付けたりオーケストレーションしたりできるカスタムプロンプトを出力します。

...すべて拡張します
9
更新された時間 2026年10月4日

Plan Orchestrate

計画文書を/orchestrate customに連携し、各ステップごとに貼り付け可能な呼び出し文を1つ生成します。このスキルは生成専用であり、/orchestrate を実行することはありません。ユーザーは準備が整い次第、各行を貼り付けます。

有効にするタイミング

  • ユーザーが複数ステップからなる計画文書(PRD、RFC、実装計画)を所持しており、それを/orchestrate を通じて実行したい場合。
  • ユーザーが「このプランをオーケストレートして」、「各ステップごとにオーケストレート用のプロンプトを表示して」、「このプランのチェーンを作成して」と発言する場合。
  • 段階的な計画は存在するが、ユーザーは各ステップごとにエージェントを手動で選択したくない場合。

以下の場合はスキップ:

  • 作業が単一のアドホックなステップである場合 → 直接/orchestrate custom を呼び出します。
  • 計画が判読不能、または空の場合。明示的な番号付けがないことだけではスキップ条件にはなりません — 以下の「明確なステップがない」というエッジケースを参照してください。

入力

 [--lang=python|typescript|go|rust|cpp|java|kotlin|flutter|auto] [--scope=all|step:|range:-] [--dry-run]
  • — 必須。相対パスまたは絶対パス(@docs/...も有効)。
  • --lang— レビュー対象の言語バリエーション。デフォルトはauto(プロジェクトから検出)。
  • --scope— 出力されるステップを制限します。デフォルトはall です。
  • --dry-run— 分解とチェーンの根拠のみを出力し、最終的なプロンプトは出力しない。

標準的な/orchestrateシェイプ(これから逸脱しないでください)

{ORCH_CMD} custom ",,...," ""

ここで、{ORCH_CMD}はフェーズ 0 で決定される(後述)。出力されるコマンド文字列は常に 1 つの具体的な形式を使用する— 両方を併用したり、プレースホルダーを使用したりしてはならない。

  • custom は順次連結されたチェーンであり、各エージェントの HANDOFF が次のエージェントに渡されます。
  • エージェントのリストはコンマ区切りです。スペースは含まないことが推奨されますが、1 スペース程度なら許容されます。
  • --mode/--gate/--agents=...といったフラグは存在しません。決してこれらを独自に作成しないでください。
  • エージェント名は、このスキル内のカタログから取得されます。タスクの説明文中に埋め込まれた二重引用符は、\" としてエスケープされます。

ECCのインストール形式と名前空間

2つのインストール形式によって、スラッシュコマンドおよびすべてのエージェント名のプレフィックスが決定されます。これら2つは必ず同期を保つ必要があります。出力ごとに1つの形式を使用し、決して混在させてはいけません:

ここで をClaude Codeのホームディレクトリとします:macOS/Linuxでは~/.claude、Windowsでは%USERPROFILE%\.claude。ホストプラットフォームがユーザーのホームディレクトリを解決する方法に従って解決してください(~をハードコードしないでください)。

形式 検出 {ORCH_CMD} エージェント名の形式
プラグインのインストール (1.9.0 以降) /plugins/marketplaces/everything-claude-code/が存在する /everything-claude-code:orchestrate everything-claude-code:
従来の基本インストール 上記が存在しない場合、/agents/配下のエージェントファイル /orchestrate

これが重要な理由:プラグインインストールでは、エージェントはeverything-claude-code:tdd-guide として登録されます。プレフィックスなしの名称ではあいまい一致が強制されるため、並列呼び出し時に断続的に失敗します。レガシー方式では、プレフィックス付きの形式は登録されず、即座に失敗します。

利用可能なエージェント一覧(これらの中から選択する必要があります)

一般:

  • planner— 要件の再定式化、リスクの分解、ステップごとの計画
  • architect— アーキテクチャ、システム設計、リファクタリングの提案
  • tdd-guide— テスト作成 → 実装 → カバレッジ80%以上
  • コードレビュー担当者— 一般的なコードレビュー
  • セキュリティレビュー担当者— セキュリティ監査、OWASP、機密情報の漏洩
  • リファクタリング・クリーナー— デッドコード、重複コード、knipクラスのクリーンアップ
  • doc-updater— ドキュメント、コードマップ、README
  • docs-lookup— サードパーティライブラリのAPI検索 (Context7)
  • e2e-runner— エンドツーエンドテストのオーケストレーション
  • database-reviewer— PostgreSQL スキーマ、マイグレーション、パフォーマンス
  • harness-optimizer— ローカルエージェントハーネスの設定
  • loop-operator— 長時間実行される自律ループ
  • chief-of-staff— マルチチャネルのトリアージ(プランのステップとして適することは稀)

ビルドエラー解決ツール:

  • build-error-resolver(汎用) /cpp-build-resolver/go-build-resolver/java-build-resolver/kotlin-build-resolver/rust-build-resolver/pytorch-build-resolver

コードレビューア:

  • python-reviewer/typescript-reviewer/go-reviewer/rust-reviewer/cpp-reviewer/java-reviewer/kotlin-reviewer/flutter-reviewer

エージェント名のスペルが間違っていると、/orchestrate が失敗します。発行する前に、このリストと照合してください。

仕組み

フェーズ 0 — ECC モードと言語の検出

  1. 読み込み 。欠落または空の場合は、報告して停止する。

  2. ECCのインストール形式を一度検出し、それをECC_MODEとして固定する。アルゴリズム(順に実行し、最初の一致で停止):

    1. /plugins/marketplaces/everything-claude-code/が存在する場合 →ECC_MODE=plugin。
    2. それ以外の場合、/agents/が存在し、少なくとも 1 つの ECC エージェントファイル(例:tdd-guide.md、code-reviewer.md)が含まれている場合 →ECC_MODE=legacy。
    3. それ以外の場合 → デフォルトでECC_MODE=legacyとし、出力の先頭に 1 行の警告を出力します:> 警告: ECC のインストールを検出できませんでした。デフォルトでレガシー形式を使用します。プラグインインストールを使用する場合は、プレフィックスを手動で編集してください。
    4. 両方のマーカーが存在する場合(混合インストール)、プラグインが優先されます。つまり、プラグインのネームスペースのみが、あいまい一致なしでエージェント名を解決します。

    この時点以降、出力されるすべての行では、スラッシュコマンドとすべてのエージェント名の両方に、一致するプレフィックスが使用されます。同じ出力に両方の形式を出力することは決してありません。

  3. --lang を解決します。「auto」の場合、多言語対応の検出を実行します:

    • 検出対象のマーカー:pyproject.toml/uv.lock/requirements.txt→ python;package.json→ typescript;go.mod→ go;Cargo.toml→ rust;CMakeLists.txtまたはトップレベルの*.cpp→ cpp;pom.xml/build.gradle(Java) → java;build.gradle.ktsまたはトップレベルの Kotlin → kotlin;pubspec.yaml→ flutter。
    • 複数言語が検出された場合の優先順位: 複数のマーカーが一致する場合は、ソースファイル数が最も多い言語を選択します(git ls-files を使用してカウントし、vendor/、node_modules/、dist/、build/、.venv/、生成ファイル、および明らかなテスト用フィクスチャは除外します)。 同数の場合、またはソースファイルの 60% を超える言語がない場合は、lang=unknown に設定します。
    • 一致するマーカーがない場合 →lang=unknown に設定します。
    • lang=unknown はセンチネルであり、エージェント名ではありません。フェーズ 2 のルール 4 および 5 により、チェーン構成時にこれがコードレビュー担当者/ビルドエラー解決担当者に変換されます。
  4. PyTorch サブプロファイルを検出:lang=pythonであり、かつpyproject.toml/requirements.txt/uv.lockのいずれかでtorch への依存関係が宣言されている場合、pytorch=true に設定します。これはビルドチェーンの選択(以下のフェーズ 2 のルール)にのみ影響し、レビュアーはpython-reviewer のままです。

  5. プラン内で宣言されたエージェント名を正規化する:プランのテキスト内で、プラグイン接頭辞が付いた形式(例:everything-claude-code:tdd-guide)でエージェントが参照されている場合、チェーンの検証や構成を行う前に、接頭辞を削除してカタログ名のみを取得する。 プレフィックスの再付与は、ECC_MODEに基づき出力時(フェーズ 4)にのみ行われます。プレフィックスが既に付与された名前がチェーンの構成に流れないようにしてください。そうしないと、プラグインモードでプレフィックスが二重に付与されてしまいます。

フェーズ 1 — ステップの分解

優先順位に従って「ステップ単位」を特定します:

  1. 明示的な番号付け:## ステップ N/### フェーズ N/## N. .../ トップレベルの順序付きリスト。
  2. 表内の「ステップ」列。
  3. ----で区切られた、動詞で始まる見出しを持つブロック。
  4. それ以外の場合は、各H2見出しを1つのステップとして扱う。

ステップごとに、ID(1から始まる)、タイトル(80文字以内)、意図(1~3文)、タグを抽出する。

フェーズ 2 — タグ付けとチェーンの選定

意図に基づいてタグ付けを行う(複数タグ可。チェーンは主要タグ+積み重ねられた二次タグで構成):

以下のトリガーワードは、大文字小文字を区別せずに照合されます。多言語プランは、意味が記載された英語のトリガーワードと一致する限り、どの言語の語幹とも照合することでサポートされます。

タグ トリガーワード デフォルトのチェーン
design アーキテクチャ、設計、選択、評価、RFC プランナー、アーキテクト
計画 計画、内訳、マイルストーン プランナー
実装 実装、構築、追加、作成、移植 tdd-guide、-reviewer
test テスト、カバレッジ、E2E、統合 tdd-guide, e2e-runner
リファクタリング リファクタリング、クリーンアップ、重複排除、分割 architect、refactor-cleaner、-reviewer
移行 移行、アップグレード、書き換え、移植 architect,tdd-guide,-reviewer
db スキーマ、移行、インデックス、SQL、Postgres、alembic、sqlmodel database-reviewer、-reviewer
セキュリティ 暗号化、認証、シークレット、OWASP、PII security-reviewer、-reviewer
ビルド ビルド、コンパイル、lint エラー、CI -build-resolver(build-error-resolverにフォールバック)
ドキュメント ドキュメント、README、コードマップ、変更履歴 doc-updater
検索 lookup、リファレンス、APIの使用方法 docs-lookup
レビュー レビュー、監査、検証 -レビュアー、コードレビュアー
ループ ループ、自律型、ウォッチドッグ ループ演算子

チェーン構成ルール:

  1. プライマリタグの選択:あるステップが複数のタグに一致する場合、テーブル順で最初のもの(テーブルの先頭=最優先)がプライマリとなり、残りはセカンダリとなる。以下の構成ルール2および3は、特定のマルチタグの組み合わせを明示的に扱う。それ以外の場合は、タグテーブルの順序に従ってセカンダリチェーンを連結する。
  2. impl+security→tdd-guide,-reviewer,security-reviewer.
  3. impl+db→tdd-guide,database-reviewer,-reviewer。
  4. 結果として得られたチェーンから重複を削除する(最初に現れたものを保持する)。例:review+lang=unknownの場合、ルール5の適用後はcode-reviewer,code-reviewerとなるが、重複削除によりcode-reviewer に統合される。
  5. -reviewer は、lang=unknown の場合、code-reviewerに解決される。
  6. -build-res olver は、lang=unknown の場合、build-error-resolverに解決されます。特例:フェーズ 0 でpytorch=true が設定されている場合、 。python-build-resolverは存在しません。pytorch=trueでない場合の--lang=pythonは、build-error-resolverに解決されます。
  7. タグなしのステップ:一致するトリガーワードがない場合、チェーンをcode-reviewerに設定し、「一致するタグなし」と記述する。「チェーンの根拠」の下に、デフォルトのレビュー専用チェーンを記載する。
  8. 重複除去後のチェーンの長さは 4 以下とする。これを超える場合は、最も弱いタグを削除する(検索とドキュメントを優先)。
  9. 実装チェーンでは、plannerと architectをペアにしない(トークンの無駄)。これらをペアにするのは設計ステップに限る。
  10. impl、refactor、またはmigrationのタグが付いたステップは、-reviewer、code-reviewer、security-reviewer、またはdatabase-reviewer のいずれかのレビュアークラスのエージェントで終了する。 最もドメイン特化度の高いレビュアーが末尾の位置を占める(例:ルール2の「impl+security」 はsecurity-reviewerで終了する;ルール3の「impl+db」は -reviewerで終了する。これは、データベースレビュアーがチェーンの前の段階で既に移行をゲートしているためである)。テストおよびビルドのステップは、それぞれ独自のバリデータ(e2e-runnerおよびビルド・リゾルバー)によってゲート制御されており、追加のレビュー担当者は必要ありません。

フェーズ3 — タスク記述の圧縮

出力される各 は、以下の条件を満たす必要があります:

  • 自己完結していること(最初のエージェントがプラン文書を開いていなくてもよい)。
  • [Plan:#step-] で始まること。
  • 1~3つの検証可能な受け入れ基準を含めること。
  • 計画書がこのステップに対してスコープガード(範囲外:...)を宣言している場合にのみ、それを含めること。その内容をそのまま継承すること。計画書に範囲外の記述がない場合は、その条項を完全に省略すること — 勝手に作成してはならない。
  • 200~600 文字とし、1 行に収め、埋め込みの" は \" でエスケープし、リテラルな改行は含めないこと。

フェーズ 4 — 出力

ECC_MODEによって決定された形式を使用してMarkdownを出力する。 出力は一貫して1つの形式を使用する — すべての{ORCH_CMD}およびエージェント名は、フェーズ0で指定された対応するプレフィックス付きでレンダリングされる。両方の形式を出力してはならない。また、レンダリングされた出力に「これはプラグイン形式です」や「プレフィックスを削除する」といった指示を含めてはならない。

具体的なレンダリング規則:

  • {ORCH_CMD}=プラグイン環境では/everything-claude-code:orchestrate、レガシー環境では/orchestrate。
  • {AGENT(name)}=plugin 環境ではeverything-claude-code:、 レガシー環境では。
  • 概要表の「Chain」列では、同じ{AGENT(name)}レンダリングを使用します。
  • ステップごとのbashブロックには、実行可能なコマンドのみが含まれます。 # plugin形式や# legacy形式のコメントは含まれません。形式は暗黙的であり、出力全体を通じて統一されています。

出力の構造:

#Plan-Orchestrate の結果

**計画**: ``
**言語**: ``
**ECC モード**: ``
**ステップ**:
**スコープ**:

## ステップの概要

| # | タイトル | タグ | チェーン |
|---|---|---|---|
| 1 | ... | impl, db | `{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}` |
| ... | | | |

---

## ステップ 1 —

**意図**:<1–3 sentences>
**タグ**:<a, b>
**チェーンの根拠**:<why this chain; which agent closes the loop>

```bash
{ORCH_CMD} custom "{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}" "[Plan: docs/foo.md#step-1]<compressed task description>; Acceptance:<1–3 items>; Out of scope:<…>"
```
</code></pre>
<blockquote>
<p>上記の<code>{ORCH_CMD}</code>および<code>{AGENT(...)}</code>という表記は、このスキルが実行時に実行する置換を表しています。実際に生成される Markdown には、展開された文字列が含まれ、プレースホルダーが含まれることはありません。</p>
</blockquote>
<p>ユーザーがすべてのコマンドを一度に貼り付けられるよう、各ステップのコマンドを順番に集約した最終的な「バッチ実行」ブロックを追加します。<strong>概要表示のみのモードでは</strong>、<strong>このバッチブロックを省略します</strong>(「大規模なプラン」のエッジケースを参照):概要テーブルのみが出力される場合、集約すべきステップごとのコマンドは存在しないためです。</p>
<h3>フェーズ 5 — 自己チェック(出力前に実行)</h3>
<ul>
<li><input disabled="" type="checkbox"> 各チェーン内のすべてのエージェントはカタログから取得されます(プラン内に現れた「<code>everything-claude-code:</code>」というプレフィックスはすべて削除済み。フェーズ0のステップ5を参照)。</li>
<li><input disabled="" type="checkbox"> 解決済みの<code>{ORCH_CMD}</code>およびすべての解決済みの<code>{AGENT(...)}</code>は、<strong>同じ</strong>形式(<code>プラグインまたはレガシー</code>)を使用します。1つの出力内で混在することは決してありません。</li>
<li><input disabled="" type="checkbox"> レンダリングされた出力には、<code># plugin form</code>/<code># legacy form</code>といった注釈や、「プレフィックスを削除する」という指示は一切残っていません。</li>
<li><input disabled="" type="checkbox"> <code>--mode</code>/<code>--gate</code>/<code>--agents=...</code>といったフィールドは生成されません。</li>
<li><input disabled="" type="checkbox"> 各タスクの説明は 1 行で、二重引用符で囲まれ、埋め込まれた<code>"</code>はエスケープされます。</li>
<li><input disabled="" type="checkbox"> 各タスクの説明は<code>[Plan:<path>#step-<id>]</code>で始まり、受け入れ条件(1~3 項目)が含まれています。「<code>Out of scope:</code>」句は、計画から継承された場合にのみ存在します。</li>
<li><input disabled="" type="checkbox"> フェーズ 2 の重複排除後、どのチェーンにも重複するエージェントが存在しないこと。</li>
<li><input disabled="" type="checkbox"> チェーンの長さは 4 以下です。</li>
<li><input disabled="" type="checkbox"> <code>impl/refactor/migration</code>のタグが付けられたステップは、レビューアクラスのエージェント(<code><lang>-reviewer</code>、<code>code-reviewer</code>、<code>security-reviewer</code>、または<code>database-reviewer</code>)で終わります。<code>test</code>および<code>build は</code>例外です — フェーズ 2 のルール 10 を参照してください。</li>
<li><input disabled="" type="checkbox"> タグのないステップは、「<code>一致するタグがない</code>」という理由とともに<code>code-reviewer</code>を発行します<code>。デフォルトはレビューのみのチェーンです</code>。</li>
<li><input disabled="" type="checkbox"> 概要テーブルには、<code>--scope</code> の設定にかかわらず、プラン内のすべてのステップが一覧表示されます。</li>
<li><input disabled="" type="checkbox"> ステップごとの詳細ブロックの数は、解決された<code>--scope</code>と一致します(<code>--scope=all</code> の場合は計画全体、<code>step:n</code> の場合は 1 ブロック、<code>range:a-b</code> の場合は範囲サイズ)。概要のみのモードでは、ステップごとのブロックも Batch ブロックも出力されません。</li>
</ul>
<h2>エッジケース</h2>
<ul>
<li><strong>明確なステップがない場合</strong>:H2/H3 の分割を優先します。それでも曖昧な場合は、「構造化されたステップが検出されませんでした」と報告し、ドキュメントのアウトラインを表示して、アウトラインに基づいて実行することをユーザーに確認します。</li>
<li><strong>大規模なプラン(1500行以上)</strong>:<strong>概要表示のみモード</strong>に入り、概要テーブルのみを出力し、詳細を確認するために再実行する前に、<code>--scope</code>を使用して範囲を絞り込むようユーザーに促します。このモードでは、ステップごとの詳細ブロックとバッチ実行ブロックはスキップされます。</li>
<li><strong>ステップの範囲が広すぎる場合</strong>(例:「すべてのバックエンド作業を完了する」):単一のチェーンを強制しない。N.a と N.b への分割を提案し、分割案を示す。</li>
<li><strong>プランがエージェントを宣言している場合</strong>(稀):まず<strong> <code>「everything-claude-code:」</code>というプレフィックスをすべて削除して</strong>、カタログ名のみを取得します(フェーズ 0 ステップ 5)。次に、カタログに対して妥当性を検証します。無効なエージェントは置き換え、「チェーンの根拠」の項でその理由を説明します。カタログ名のみは、出力時に<code>ECC_MODE</code> に応じてプレフィックスが再付与されます。</li>
<li><strong> <code>--lang=auto では</code>優先言語を決定できない多言語プロジェクトの場合</strong>:<code>lang=unknown を</code>設定する。reviewer は<code>code-reviewer</code>に、build resolver は<code>build-error-resolver</code> に解決する。「チェーンの根拠」の項でフォールバックについて言及する。</li>
</ul>
<h2>例</h2>
<h3>例 1 — プラグインモード、Python プラン</h3>
<p>入力:</p>
<pre><code>plan-orchestrate @docs/plan/example-feature.md --lang=python
</code></pre>
<p>期待される出力の抜粋:</p>
<pre><code class="language-markdown">## ステップ 2 — 機密性の高い UserProfile フィールドの暗号化

**意図**: `EncryptedString` という SQLAlchemy 型を導入し、永続化前に `birth_datetime` / `location` を AES-GCM で暗号化します。鍵は環境変数から読み込みます。
**タグ**: impl, security, db
**チェーンの根拠**: セキュリティ上重要な書き込みパスであるため、`security-reviewer` がチェーンを締めくくる。`database-reviewer` が Alembic マイグレーションを検証し、`python-reviewer` が型付けと PEP 8 を担当する。

```bash
/everything-claude-code:orchestrate custom "everything-claude-code:tdd-guide,everything-claude-code:database-reviewer,everything-claude-code:python-reviewer,everything-claude-code:security-reviewer" "[計画: docs/plan/example-feature.md#step-2] EncryptedString SQLAlchemy 型を実装し、UserProfile.birth_datetime/location カラムをマイグレーションする。キーは ENV の APP_DB_KEY から取得する。 受け入れ条件:暗号化/復号の往復テストに合格すること;空のデータベースにおいてAlembicのアップグレード/ダウングレードが正常に完了すること;移行後にデータベースに平文が残らないこと;対象外:テナント間のプロファイル共有ロジック"
```
</code></pre>
<h3>例 2 — レガシーモード、同じステップ</h3>
<p><code>ECC_MODE=legacy が</code>検出された場合、同じ手順が単一の統一されたコマンドとして出力されます(出力内のどこにもプラグイン接頭辞付きの形式は含まれません):</p>
<pre><code class="language-bash">/orchestrate custom "tdd-guide,database-reviewer,python-reviewer,security-reviewer" "[Plan: docs/plan/example-feature.md#step-2] ..."
</code></pre>
<p>上記の 2 つの例は、2 つの異なる環境における<strong>2 つの可能な出力を</strong>示しています。1 回のスキル呼び出しでは、エンドツーエンドでこれらの中から 1 つだけが生成されます。</p>
<h2>注</h2>
<ul>
<li>生成専用です。このスキル内部から<code>/orchestrate</code>を呼び出してはなりません。</li>
<li>タスクの説明文は、計画文書の言語に合わせてください(エージェント名は常に英語のままです)。</li>
<li>ユーザーから明示的に求められない限り、出力に「Co-Authored-By」行や絵文字を挿入しないでください。</li>
</ul>                                </div>
                                <div class="skilldetailsL1_skillmd">
                                    <a href="https://github.com/affaan-m/ECC/tree/main/skills/plan-orchestrate" title="GitHubで見る" target="_blank" rel="nofollow"
                                        aria-label="GitHubで見る" class="skilldetails_toGitHub">
                                        <span>GitHubで見る</span>
                                        <b></b>
                                    </a>
                                    <pre><code>---
name: plan-orchestrate
description: Reads a plan document, decomposes it into steps, designs a per-step agent chain from the ECC catalogue, and emits ready-to-paste /orchestrate custom prompts without executing them.
---

# Plan Orchestrate

Bridge a plan document to `/orchestrate custom` by emitting one ready-to-paste invocation per step. The skill is generative only — it never executes `/orchestrate`. The user pastes each line when ready.

## When to Activate

- User has a multi-step plan document (PRD, RFC, implementation plan) and wants to drive it through `/orchestrate`.
- User says "orchestrate this plan", "give me orchestrate prompts for each step", "compose chains for this plan".
- A step-by-step plan exists but the user does not want to manually pick agents per step.

Skip when:
- The work is one ad-hoc step → call `/orchestrate custom` directly.
- The plan is unreadable or empty. Lack of explicit numbering alone is not a skip condition — see the "No clear steps" edge case below.

## Inputs

```
<plan-doc-path> [--lang=python|typescript|go|rust|cpp|java|kotlin|flutter|auto] [--scope=all|step:<n>|range:<a>-<b>] [--dry-run]
```

- `<plan-doc-path>` — required; relative or absolute path (`@docs/...` accepted).
- `--lang` — reviewer language variant; defaults to `auto` (detected from project).
- `--scope` — limits emitted steps; defaults to `all`.
- `--dry-run` — print decomposition + chain rationale only; do not emit final prompts.

## Authoritative `/orchestrate` shape (do not deviate)

```
{ORCH_CMD} custom "<agent1>,<agent2>,...,<agentN>" "<task description>"
```

Where `{ORCH_CMD}` is determined in Phase 0 (see below). The command string in the emitted output **always uses one concrete form** — never both, never a placeholder.

- `custom` is a sequential chain; each agent's HANDOFF feeds the next.
- Comma-separated agent list. No spaces preferred; one space tolerated.
- No `--mode` / `--gate` / `--agents=...` flags exist — never invent them.
- Agent names come from the catalogue in this skill. Embedded double quotes in the task description are escaped as `\"`.

## ECC install form and namespacing

Two install forms determine the prefix on **both** the slash command and every agent name. The two MUST stay in sync — one form per output, never mixed:

Let `<claude-home>` denote the Claude Code home directory: `~/.claude` on macOS/Linux, `%USERPROFILE%\.claude` on Windows. Resolve it the way the host platform resolves the user home directory (do not hardcode `~`).

| Form | Detection | `{ORCH_CMD}` | Agent name format |
|---|---|---|---|
| Plugin install (1.9.0+) | `<claude-home>/plugins/marketplaces/everything-claude-code/` exists | `/everything-claude-code:orchestrate` | `everything-claude-code:<name>` |
| Legacy bare install | Above absent; agent files under `<claude-home>/agents/` | `/orchestrate` | `<name>` |

Why this matters: under the plugin install, agents register as `everything-claude-code:tdd-guide`. Bare names force fuzzy matching, which fails intermittently under parallel calls. Under legacy, the prefixed forms are not registered and fail outright.

## Available agent catalogue (must pick from these)

General:
- `planner` — requirement restatement, risk decomposition, step planning
- `architect` — architecture, system design, refactor proposals
- `tdd-guide` — write tests → implement → 80%+ coverage
- `code-reviewer` — generic code review
- `security-reviewer` — security audit, OWASP, secret leakage
- `refactor-cleaner` — dead code, duplicates, knip-class cleanup
- `doc-updater` — documentation, codemap, README
- `docs-lookup` — third-party library API lookups (Context7)
- `e2e-runner` — end-to-end test orchestration
- `database-reviewer` — PostgreSQL schema, migration, performance
- `harness-optimizer` — local agent harness configuration
- `loop-operator` — long-running autonomous loops
- `chief-of-staff` — multi-channel triage (rarely a fit for plan steps)

Build error resolvers:
- `build-error-resolver` (generic) / `cpp-build-resolver` / `go-build-resolver` / `java-build-resolver` / `kotlin-build-resolver` / `rust-build-resolver` / `pytorch-build-resolver`

Code reviewers:
- `python-reviewer` / `typescript-reviewer` / `go-reviewer` / `rust-reviewer` / `cpp-reviewer` / `java-reviewer` / `kotlin-reviewer` / `flutter-reviewer`

A misspelled agent name fails `/orchestrate`. Cross-check against this list before emitting.

## How It Works

### Phase 0 — Detect ECC mode + language

1. Read `<plan-doc-path>`. If missing or empty, report and stop.
2. Detect ECC install form once and freeze it into `ECC_MODE`. Algorithm (run in order, stop at the first match):
   1. If `<claude-home>/plugins/marketplaces/everything-claude-code/` exists → `ECC_MODE=plugin`.
   2. Else if `<claude-home>/agents/` exists and contains at least one ECC agent file (e.g. `tdd-guide.md`, `code-reviewer.md`) → `ECC_MODE=legacy`.
   3. Else → default to `ECC_MODE=legacy` and emit a one-line warning at the top of the output: `> Warning: could not detect ECC install; defaulting to legacy form. If you use the plugin install, edit the prefixes manually.`
   4. If both markers exist (mixed install), `plugin` wins — the plugin namespace is the only one that resolves agent names without fuzzy matching.

   From this point on, every emitted line uses the matching prefix on **both** the slash command and every agent name. **Never emit both forms in the same output.**
3. Resolve `--lang`. When `auto`, run a polyglot-aware detection:
   - Probe markers: `pyproject.toml` / `uv.lock` / `requirements.txt` → python; `package.json` → typescript; `go.mod` → go; `Cargo.toml` → rust; `CMakeLists.txt` or top-level `*.cpp` → cpp; `pom.xml` / `build.gradle` (Java) → java; `build.gradle.kts` or top-level Kotlin → kotlin; `pubspec.yaml` → flutter.
   - **Polyglot tie-break**: if more than one marker matches, pick the language whose source files outnumber the others (count via `git ls-files`, excluding `vendor/`, `node_modules/`, `dist/`, `build/`, `.venv/`, generated files, and obvious test fixtures). On a tie or when no language exceeds 60% of source files, set `lang=unknown`.
   - No marker matched → set `lang=unknown`.
   - `lang=unknown` is a sentinel — it is **not** an agent name. Phase 2 rules 4 and 5 turn it into `code-reviewer` / `build-error-resolver` at chain composition time.
4. Detect a **PyTorch sub-profile**: when `lang=python` and any of `pyproject.toml` / `requirements.txt` / `uv.lock` declares a dependency on `torch`, set `pytorch=true`. This only affects `build` chain selection (Phase 2 rule below); the reviewer remains `python-reviewer`.
5. **Normalize any agent names declared in the plan**: if the plan text references agents by their plugin-prefixed form (e.g. `everything-claude-code:tdd-guide`), strip the prefix to get the bare catalogue name before validating or composing chains. Re-prefixing happens only at output time per `ECC_MODE` (Phase 4). Never let a pre-prefixed name flow into chain composition — it would double-prefix in plugin mode.

### Phase 1 — Decompose steps

Identify "step units" in priority order:

1. Explicit numbering: `## Step N` / `### Phase N` / `## N. ...` / top-level ordered list.
2. A "Step" column in a table.
3. `---`-separated blocks with verb-led headings.
4. Otherwise treat each H2 as one step.

Per step extract `id` (1-based), `title` (≤ 80 chars), `intent` (1–3 sentences), `tags`.

### Phase 2 — Tag and pick chain

Tag by intent (multi-tag allowed; chain built from primary + stacked secondaries):

Trigger words below are matched case-insensitively. Multilingual plans are supported by matching the word stems in any language as long as the meaning aligns with the listed English trigger words.

| Tag | Trigger words | Default chain |
|---|---|---|
| `design` | architecture, design, choose, evaluate, RFC | `planner,architect` |
| `plan` | plan, breakdown, milestone | `planner` |
| `impl` | implement, build, add, create, port | `tdd-guide,<lang>-reviewer` |
| `test` | test, coverage, e2e, integration | `tdd-guide,e2e-runner` |
| `refactor` | refactor, cleanup, dedupe, split | `architect,refactor-cleaner,<lang>-reviewer` |
| `migration` | migrate, upgrade, rewrite, port | `architect,tdd-guide,<lang>-reviewer` |
| `db` | schema, migration, index, SQL, Postgres, alembic, sqlmodel | `database-reviewer,<lang>-reviewer` |
| `security` | encrypt, auth, secret, OWASP, PII | `security-reviewer,<lang>-reviewer` |
| `build` | build, compile, lint failure, CI | `<lang>-build-resolver` (falls back to `build-error-resolver`) |
| `docs` | docs, readme, codemap, changelog | `doc-updater` |
| `lookup` | lookup, reference, API usage | `docs-lookup` |
| `review` | review, audit, verify | `<lang>-reviewer,code-reviewer` |
| `loop` | loop, autonomous, watchdog | `loop-operator` |

Chain composition rules:
1. **Primary tag selection**: when a step matches multiple tags, the **first one in table order** (top of the table = highest priority) is the primary; the rest are secondaries. Composition rules 2 and 3 below handle specific multi-tag combinations explicitly; otherwise, append secondary chains in tag table order.
2. `impl` + `security` → `tdd-guide,<lang>-reviewer,security-reviewer`.
3. `impl` + `db` → `tdd-guide,database-reviewer,<lang>-reviewer`.
4. **Deduplicate** the resulting chain (preserve first occurrence). E.g. `review` + `lang=unknown` would yield `code-reviewer,code-reviewer` after rule 5; deduplication collapses it to `code-reviewer`.
5. `<lang>-reviewer` resolves to `code-reviewer` when `lang=unknown`.
6. `<lang>-build-resolver` resolves to `build-error-resolver` when `lang=unknown`. **Special case**: if Phase 0 set `pytorch=true`, use `pytorch-build-resolver` for `build` chains regardless of `<lang>`. There is no `python-build-resolver`; `--lang=python` without `pytorch=true` resolves to `build-error-resolver`.
7. **Zero-tag steps**: if no trigger word matches, set chain to `code-reviewer` and write `no tag matched; default review-only chain` under "Chain rationale".
8. Chain length ≤ 4 after deduplication. If exceeded, drop weakest tag (`lookup` and `docs` first).
9. Do not pair `planner` and `architect` in an `impl` chain (token waste). Pair them only on `design` steps.
10. Steps tagged `impl`, `refactor`, or `migration` end with a **reviewer-class** agent — any of `<lang>-reviewer`, `code-reviewer`, `security-reviewer`, or `database-reviewer`. The most domain-specific reviewer wins the tail position (e.g. rule 2's `impl+security` ends with `security-reviewer`; rule 3's `impl+db` ends with `<lang>-reviewer` because `database-reviewer` already gates the migration earlier in the chain). `test` and `build` steps are gated by their own validators (`e2e-runner` and the build resolver respectively) and do not require an additional reviewer.

### Phase 3 — Compress task description

Each emitted `<task description>` must:
- Be self-contained (the first agent does not need the plan document open).
- Start with `[Plan: <path>#step-<id>]`.
- Include 1–3 verifiable Acceptance criteria.
- Include a Scope guard (`Out of scope: ...`) **only if the plan declares one for this step**. Inherit verbatim. If the plan has no out-of-scope statement, omit the clause entirely — do not invent one.
- Be 200–600 characters; one line; embedded `"` escaped as `\"`; no literal newlines.

### Phase 4 — Output

Emit Markdown using **the form determined by `ECC_MODE`**. The output uses one form throughout — every `{ORCH_CMD}` and every agent name is rendered with the matching prefix from Phase 0. **Do not emit both forms; do not include "this is plugin form" / "strip the prefix" instructions in the rendered output.**

Concrete rendering rules:

- `{ORCH_CMD}` = `/everything-claude-code:orchestrate` under `plugin`, `/orchestrate` under `legacy`.
- `{AGENT(name)}` = `everything-claude-code:<name>` under `plugin`, `<name>` under `legacy`.
- The overview-table "Chain" column uses the same `{AGENT(name)}` rendering.
- Per-step bash blocks contain only the runnable command. **No `# plugin form` or `# legacy form` comments** — the form is implicit and uniform across the whole output.

Output structure:

````markdown
# Plan-Orchestrate Result

**Plan**: `<path>`
**Lang**: `<detected-or-given>`
**ECC mode**: `<plugin | legacy>`
**Steps**: <N>
**Scope**: <all | step:n | range:a-b>

## Steps overview

| # | Title | Tags | Chain |
|---|---|---|---|
| 1 | ... | impl, db | `{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}` |
| ... | | | |

---

## Step 1 — <title>

**Intent**: <1–3 sentences>
**Tags**: <a, b>
**Chain rationale**: <why this chain; which agent closes the loop>

```bash
{ORCH_CMD} custom "{AGENT(tdd-guide)},{AGENT(database-reviewer)},{AGENT(python-reviewer)}" "[Plan: docs/foo.md#step-1] <compressed task description>; Acceptance: <1–3 items>; Out of scope: <…>"
```
````

> The `{ORCH_CMD}` and `{AGENT(...)}` notation above describes the substitution this skill performs at runtime. The actual emitted Markdown contains the resolved strings, never the placeholders.

Append a final "Batch execution" block aggregating every step's command in order so the user can paste them all at once. **Skip the Batch block in overview-only mode** (see "Large plan" edge case): when only the overview table is being emitted, there are no per-step commands to aggregate.

### Phase 5 — Self-check (run before emitting)

- [ ] Every agent in every chain comes from the catalogue (after stripping any `everything-claude-code:` prefix that appeared in the plan; see Phase 0 step 5).
- [ ] Resolved `{ORCH_CMD}` and every resolved `{AGENT(...)}` use the **same** form (`plugin` or `legacy`) — never mixed in one output.
- [ ] No `# plugin form` / `# legacy form` annotations and no "strip the prefix" instructions remain in the rendered output.
- [ ] No invented `--mode` / `--gate` / `--agents=...` fields.
- [ ] Each task description is single-line, double-quoted, with embedded `"` escaped.
- [ ] Each task description begins with `[Plan: <path>#step-<id>]` and includes Acceptance (1–3 items). The `Out of scope:` clause is present only when inherited from the plan.
- [ ] No duplicate agent in any chain after Phase 2 dedup.
- [ ] Chain length ≤ 4.
- [ ] Steps tagged `impl`/`refactor`/`migration` end with a reviewer-class agent (`<lang>-reviewer`, `code-reviewer`, `security-reviewer`, or `database-reviewer`). `test` and `build` are exempt — see Phase 2 rule 10.
- [ ] Zero-tag steps emit `code-reviewer` with the rationale `no tag matched; default review-only chain`.
- [ ] Overview table lists every step in the plan, regardless of `--scope`.
- [ ] Per-step detail block count matches the resolved `--scope` (full plan when `--scope=all`; one block for `step:n`; range size for `range:a-b`). In overview-only mode, no per-step blocks and no Batch block are emitted.

## Edge cases

- **No clear steps**: prefer H2/H3 splitting; if still ambiguous, report "no structured steps detected" with the document outline and ask the user to confirm running by outline.
- **Large plan (>1500 lines)**: enter **overview-only mode** — emit only the overview table and ask the user to narrow with `--scope` before re-running for details. In this mode, skip per-step detail blocks and skip the Batch execution block.
- **Step too broad** (e.g. "complete all backend work"): do not force a single chain. Suggest splitting into N.a and N.b and propose a split.
- **Plan declares agents** (rare): first **strip any `everything-claude-code:` prefix** to get the bare catalogue name (Phase 0 step 5), then validate against the catalogue. Replace invalid agents and explain under "Chain rationale". The bare name is re-prefixed at output time per `ECC_MODE`.
- **Polyglot project where `--lang=auto` cannot pick a winner**: set `lang=unknown`; reviewer resolves to `code-reviewer` and build resolver to `build-error-resolver`. Mention the fallback under "Chain rationale".

## Examples

### Example 1 — Plugin mode, Python plan

Input:
```
plan-orchestrate @docs/plan/example-feature.md --lang=python
```

Excerpt of expected output:
````markdown
## Step 2 — Encrypt sensitive UserProfile fields

**Intent**: Introduce an `EncryptedString` SQLAlchemy type and AES-GCM encrypt `birth_datetime` / `location` before persistence; load the key from an environment variable.
**Tags**: impl, security, db
**Chain rationale**: Security-sensitive write path, so `security-reviewer` closes the chain; `database-reviewer` validates the alembic migration; `python-reviewer` covers typing and PEP 8.

```bash
/everything-claude-code:orchestrate custom "everything-claude-code:tdd-guide,everything-claude-code:database-reviewer,everything-claude-code:python-reviewer,everything-claude-code:security-reviewer" "[Plan: docs/plan/example-feature.md#step-2] Implement EncryptedString SQLAlchemy type and migrate UserProfile.birth_datetime/location columns; key from ENV APP_DB_KEY; Acceptance: encrypt/decrypt roundtrip tests pass; alembic upgrade/downgrade clean on empty DB; no plaintext in DB after migrate; Out of scope: cross-tenant profile sharing logic"
```
````

### Example 2 — Legacy mode, same step

If `ECC_MODE=legacy` were detected, the same step would be emitted as a single uniform command (no plugin-prefixed forms anywhere in the output):

```bash
/orchestrate custom "tdd-guide,database-reviewer,python-reviewer,security-reviewer" "[Plan: docs/plan/example-feature.md#step-2] ..."
```

The two examples above illustrate **the two possible outputs** for two different environments. A single skill invocation produces only one of them, end to end.

## Notes

- Generative only. Never invoke `/orchestrate` from inside this skill.
- Match the language of the plan document for task descriptions (agent names always remain English).
- Do not insert "Co-Authored-By" lines or emoji in the output unless the user explicitly asks.
</code></pre>                                </div>
                            </div>

                        </div>
                        <script>
                            layui.use(function () {
                                var element = layui.element;
                                element.tab({
                                    headerElem: "#skilldetailsL1_header>button",
                                    bodyElem: "#skilldetailsL1_body>div",
                                });
                            });
                        </script>
                        <div class="skilldetailsL2">
                            <div class="skilldetailsL2_title">
                                <h2>すべてのファイル</h2>
                                <span>1件のファイル</span>
                            </div>
                                                        <div class="skillFiles">
                                <div class="skillFilesL">
                                    <b></b>
                                    <a href="https://github.com/affaan-m/ECC/tree/main/skills/plan-orchestrate" title="plan-orchestrate.md" target="_blank"
                                        aria-label="plan-orchestrate.md"
                                        rel="nofollow">plan-orchestrate.md</a>
                                    <span>17.5k</span>
                                </div>
                                <a href="https://github.com/affaan-m/ECC/tree/main/skills/plan-orchestrate" title="表示" target="_blank" aria-label="表示"
                                    rel="nofollow">表示</a>
                            </div>
                                                    </div>
                    </div>
                    <div class="skilldetailsR">
                        <div class="skilldetailsR1">
                            <div class="skilldetailsR1s">
                                <h2>plan-orchestrateをインストール</h2>
                                <div class="skilldetailsR1s_header" id="skilldetailsR1s_header">
                                    <button class="layui-this">
                                        <b></b>
                                        <span>ZIPをダウンロード</span>
                                    </button>
                                    <button class="">
                                        <b></b>
                                        <span>Git Clone</span>
                                    </button>
                                </div>
                                <div class="skilldetailsR1s_body" id="skilldetailsR1s_body">
                                    <div class="skilldetailsR1s_body1 layui-show">
                                        <p>スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。</p>
                                        <a href="javascript:;" title="ZIPをダウンロード" data-source="TeeN26C1ni2ZDZRkOJVh9w"
                                            aria-label="ZIPをダウンロード" role="button" class="skill_downloadzip">
                                            <b></b>
                                            <span>ZIPをダウンロード</span>
                                        </a>
                                    </div>
                                    <div class="skilldetailsR1s_body2">
                                        <p>リポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。</p>
                                        <div class="skill_clone">
                                            <p>
                                                git clone https://github.com/affaan-m/ECC/tree/main/skills/plan-orchestrate
# Copy SKILL.md to your .claude/skills/ directory                                            </p>
                                            <a href="javascript:;" title="コピー" role="button" aria-label="コピー"
                                                class="skill_clone_copy">
                                                <img src="/assets/images/prompt_word2RMs_p_btn.png"
                                                    alt="コピー" />
                                                <span>コピー</span>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                                <div class="skilldetailsR1s_info">
                                    <span>クイックセットアップ: </span>
                                    スキルフォルダを .claude/skills/ にコピーしてください。
Claude が自動的にそのスキルを検出して使用します。                                </div>
                                <div class="skilldetailsR1s_repository">
                                    <span>リポジトリ</span>
                                    <a href="https://github.com/affaan-m/ECC/tree/main/skills/plan-orchestrate" title="affaan-m/ECC" target="_blank"
                                        aria-label="リポジトリ" rel="nofollow">affaan-m/ECC</a>
                                </div>
                            </div>
                        </div>
                        <div class="skilldetailsR2">
                            <h2>関連スキル</h2>
                            <div>
                                                                <div class="skilldetailsR2s">
                                    <a href="/ja/skill/detail/airtableautomation.html" title="airtable-automation" aria-label="airtable-automation">airtable-automation</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新された時間                                                2026年6月29日</span>
                                        </div>
                                        <button class="xix_star skill_datas"
                                            data-source="P_PqrAzxvKSebU4gaXatSw">
                                            <b></b>
                                            <span
                                                class="collectNums_P_PqrAzxvKSebU4gaXatSw">0</span>
                                        </button>
                                    </div>
                                </div>
                                                                <div class="skilldetailsR2s">
                                    <a href="/ja/skill/detail/notionautomation.html" title="notion-automation" aria-label="notion-automation">notion-automation</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新された時間                                                2026年6月29日</span>
                                        </div>
                                        <button class="xix_star skill_datas"
                                            data-source="yLOF7em0zgx36kG9EQmIAQ">
                                            <b></b>
                                            <span
                                                class="collectNums_yLOF7em0zgx36kG9EQmIAQ">0</span>
                                        </button>
                                    </div>
                                </div>
                                                                <div class="skilldetailsR2s">
                                    <a href="/ja/skill/detail/seoprogrammatic.html" title="seo-programmatic" aria-label="seo-programmatic">seo-programmatic</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新された時間                                                2026年6月29日</span>
                                        </div>
                                        <button class="xix_star skill_datas"
                                            data-source="qrlDZwmv4vNLPwqrODKcOQ">
                                            <b></b>
                                            <span
                                                class="collectNums_qrlDZwmv4vNLPwqrODKcOQ">0</span>
                                        </button>
                                    </div>
                                </div>
                                                                <div class="skilldetailsR2s">
                                    <a href="/ja/skill/detail/revops.html" title="revops" aria-label="revops">revops</a>
                                    <div>
                                        <div class="skilldetailsR2s_time">
                                            <b></b>
                                            <span>更新された時間                                                2026年6月29日</span>
                                        </div>
                                        <button class="xix_star skill_datas"
                                            data-source="ZDIT-veTOzkFQQ0eUEoT-g">
                                            <b></b>
                                            <span
                                                class="collectNums_ZDIT-veTOzkFQQ0eUEoT-g">0</span>
                                        </button>
                                    </div>
                                </div>
                                
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
        <footer>
  <div class="footer">
    <div class="footer1">
      <div class="footer11">
        <span class="footer11_title">ホットAIツール</span>
        <div class="footer11info">
                    <a href="/ja/tool/ai-clothes-remover.html" aria-label="AI Clothes Remover" class="footer11s">AI Clothes Remover</a>
                    <a href="/ja/tool/deepnude-generator.html" aria-label="DeepNude generator" class="footer11s">DeepNude generator</a>
                    <a href="/ja/tool/purechat.html" aria-label="PureChat" class="footer11s">PureChat</a>
                  </div>
      </div>
      <div class="footer12">
        <span class="footer11_title">潜在的なAIツール</span>
        <div class="footer11info">
                    <a href="/ja/tool/idea-box-ai-tool.html" aria-label="Name Idea Box" class="footer11s">Name Idea Box</a>
                    <a href="/ja/tool/qi-jing-ai-ai-tool.html" aria-label="奇境 AI" class="footer11s">奇境 AI</a>
                    <a href="/ja/tool/ezaudio-ai-tool.html" aria-label="EZAudio" class="footer11s">EZAudio</a>
                  </div>
      </div>
      <div class="footer13">
        <span class="footer11_title">続きを読む</span>
        <div class="footer11info">
                    <a href="/ja/ainews/ai-hosts-notebooklm-podcast-interviews.html" aria-label="AIホストのNotebooklm Podcastのホストは、インタビューに利用できるようになりました" class="footer11s">AIホストのNotebooklm Podcastのホストは、インタビューに利用できるようになりました</a>
                    <a href="/ja/ainews/corporate-ai-adoption-leveling-ramp-data.html" aria-label="企業のAI導入は頭打ち、ランプのデータで明らかに" class="footer11s">企業のAI導入は頭打ち、ランプのデータで明らかに</a>
                    <a href="/ja/ainews/microsoft-unveils-businessfocused-copilot-surface-devices-powered-intel.html" aria-label="Microsoftは、Intelを搭載したビジネス中心のCopilot+ Surface Devicesを発表します" class="footer11s">Microsoftは、Intelを搭載したビジネス中心のCopilot+ Surface Devicesを発表します</a>
                  </div>
      </div>
      <div class="footer4">
        <span class="footer11_title">フォローする</span>
        <div class="footer11info">
          <a href="javascript:;" class="footer11s">お問い合わせ</a>
          <a href="mailto:admin@xix.ai" role="button" aria-label="お問い合わせ" class="footer11s">admin@xix.ai</a>
          <a href="/sitemap.xml" class="footer11s" aria-label="SiteMap">SiteMap</a>
        </div>
      </div>
    </div>
    <span class="footer2"></span>
    <div class="footer3">Copyright ©2025 xix.ai All Rights Reserved.</div>
  </div>
</footer>
<div class="ai_cookie" style="display: none">
      <div class="ai_cookie_b">
        <div class="icon_f ai_cookie_close">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-guanbi1"></use>
          </svg>
        </div>
        <p>
          「すべてのCookieを受け入れる」をクリックすると、サイトナビゲーションの強化、サイト使用状況の分析、およびマーケティング活動の支援のために、デバイスにCookieを保存することに同意したことになります。<span>プライバシーポリック</span> 通知        </p>
        <div class="cokiesetRight">
          <a href="javascript:;" class="cokieA ai_cookie_open"  role="button" aria-label="クッキー設定">クッキー設定</a>
          <a href="javascript:;" class="cokieA RefuseCookies" role="button" aria-label="すべて拒否">すべて拒否</a>
          <a href="javascript:;" class="cokieA cokieAall" role="button" aria-label="すべてのクッキーを受け入れる">すべてのクッキーを受け入れる</a>
        </div>
      </div>
    </div>
    <div class="ai_cookieSettings" style="display: none">
      <div class="layuiDivcokie layui-layer-wrap" id="layuiDivcokie" style="display: block">
        <div class="cokielayTop dlyflx">
          <img src="/assets/images/logo.png" alt="" />
          <div class="icon_f ai_cookie_close1">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-guanbi"></use>
            </svg>
          </div>
        </div>
        <hr />
        <div class="cokielayDown dlyflx">
          <p class="cokielaydTop">プライバシー設定</p>
          <p class="cokielaydDesc">
            任何のウェブサイトを訪問すると、多くの場合クッキーの形式でブラウザに情報を保存または取得する場合があります。この情報は、あなた、あなたの偏好、またはデバイスに関するものである場合があり、主にサイトが期待どおりに機能するようにするために使用されます。この情報は通常、直接あなたを特定するものではありませんが、よりパーソナライズされたウェブ体験を提供することができます。私たちはあなたのプライバシーの権利を尊重するため、特定の種類のクッキーを許可しないように選択することができます。さまざまなカテゴリの見出しをクリックして詳細を確認し、デフォルト設定を変更してください。ただし、特定の種類のクッキーをブロックすると、サイトの体験や提供できるサービスに影響を与える場合があります。 <a href="#" title="プライバシーポリック" aria-label="プライバシーポリック"><span>プライバシーポリック</span></a> <b>声明</b>          </p>

          <div class="cokielayDivdown">
            <p class="coklaydownP">偏好設定の管理</p>
            <ul class="cokidownUl">
              <li class="cokidownli dlyflx" style="padding: 25px 0px 25px">
                <div class="ckdTops">
                  <div class="ckdLeft">
                    <div class="icon_f">
                      <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-add"></use>
                      </svg>
                      <svg class="icon icon_active" aria-hidden="true">
                        <use xlink:href="#icon-add1"></use>
                      </svg>
                    </div>
                    <p class="ckdlipmid">必須クッキー</p>
                  </div>
                  <p class="ckdlipr">常に有効</p>
                </div>
                <p class="ckdDowns">
                  これらのクッキーはウェブサイトの機能に必要であり、当社のシステムでは無効にすることができません。これらは通常、プライバシー設定の変更、ログイン、フォームの入力など、サービス要求に相当するあなたの操作に応じてのみ設定されます。ブラウザを設定してこれらのクッキーをブロックしたり、アラートを表示したりすることができますが、その場合サイトの一部機能が正常に動作しなくなります。これらのクッキーは個人を特定できる情報を保存することはありません。                </p>
              </li>
            </ul>
          </div>
        </div>
        <div class="cklyBtn">
          <a href="javascript:;" role="button" aria-label="すべてのクッキーを受け入れる" class="active cokieAall">すべてのクッキーを受け入れる</a>
        </div>
      </div>
      <script>
        $(document).on("click", ".ai_cookie_close", function () {
          $(".ai_cookie").hide();
        });
        $(document).on("click", ".ai_cookie_close1", function () {
          $(".ai_cookieSettings").hide();
        });
        $(document).on("click", ".ai_cookie_open", function () {
          $(".ai_cookieSettings").show();
        });
        $(document).on("click", ".ckdLeft", function () {
          var $li = $(this).closest("li"); 
          var $downs = $li.find(".ckdDowns"); 
          var $iconBox = $(this).find(".icon_f"); 

         
          $downs.slideToggle(200, function () {
            if ($downs.is(":visible")) {
              $iconBox.find(".icon").hide();
              $iconBox.find(".icon_active").show();
            } else {
              $iconBox.find(".icon").hide();
              $iconBox.find(".icon").first().show(); 
            }
          });
        });     
      </script>
    </div>
<link rel="stylesheet" type="text/css" href="https://accounts.google.com/gsi/style">
<div class="login_tab">
  <div class="login_mainC">
    <div class="login_tab_top">
      <div class="login_tab_top1">
        <a href="javascript:;" role="tab" aria-label="サインイン" aria-selected="true" class="login_tab_top1a ">サインイン</a>
        <a href="javascript:;" role="tab" aria-label="サインアップ" aria-selected="false" class="login_tab_top2a">サインアップ</a>
      </div>
      <div class="login_tab_top2">
        <a href="javascript:;"><img src="/assets/images/login_mainC_top_m_img.png" alt=""></a>
      </div>

    </div>
    <div class="forms_google">
      <div id="g_id_signin"></div>
    </div>
    <div class="forms_or">
      <div class="forms_line"></div>
      <span>OR</span>
      <div class="forms_line"></div>
    </div>
    <div class="login_tab_bottom">
      <div class="login_tab_top1a_bottom">

        <div class="login_form ">
          <div class="login_forms">
            <img src="/assets/images/login_email.png" alt="メール">
            <input type="text" placeholder="メールアドレスを入力してください" class="login_forms_email">
            <span></span>
          </div>
          <div class="login_forms">
            <img src="/assets/images/login_password.png" alt="パスワード">
            <input type="password" placeholder="パスワードを入力してください" class="login_forms_password">
            <i style="cursor: pointer;" class="layui-icon layui-icon-eye-invisible toggle-password"
              id="toggleLoginPassword"></i>
            <span></span>
          </div>
          <div class="login_forms forms_code1">
            <input type="text" placeholder="グラフィック検証コードを入力してください"
              class="login_forms_captcha">
            <img src="" alt="グラフィック検証コードを入力してください" class="login-js-refresh-captcha">
            <span></span>
          </div>
          <div class="login_forms_bottom">
            <label class="login_remember">
              <input type="checkbox" aria-label="私を覚えてますか">
              <span>私を覚えてますか</span>
            </label>
            <a href="/ja/account/forgetPassword.html" aria-label="パスワードを変更する" class="login_forget">パスワードをお忘れですか</a>
          </div>
          <a href="javascript:;" type="button" role="button" aria-label="サインイン" id="login_button" class="login_button">サインイン</a>

        </div>
      </div>
      <div class="login_tab_top2a_bottom">
        <div class="login_form">
          <div class="login_forms">
            <img src="/assets/images/login_email.png" alt="メール">
            <input type="text" placeholder="メールアドレスを入力してください" class="register_forms_email">
            <span></span>
          </div>
          <div class="login_forms">
            <img src="/assets/images/login_password.png" alt="パスワード">
            <input type="password" placeholder="パスワードを入力してください" class="register_forms_password">
            <i style="cursor: pointer;" class="layui-icon layui-icon-eye-invisible toggle-password"
              id="toggleRegisterPassword"></i>
            <span></span>
          </div>
          <div class="login_forms forms_code1">
            <input type="text" placeholder="グラフィック検証コードを入力してください"
              class="register_forms_captcha">
            <img src="" alt="グラフィック検証コードを入力してください" class="register-js-refresh-captcha" id="register_captcha">
            <span></span>
          </div>
          <div class="login_forms">
            <input type="text" class="verify-code-input" placeholder="確認コードを入力してください">
            <button id="verifyCodeBtn" class="verify-code-btn" data-text="確認コードを取得します">確認コードを取得します</button>
            <span></span>
          </div>
          <a href="javascript:;" role="button" aria-label="サインアップ" class="login_button" id="register_button">サインアップ</a>
        </div>
      </div>

    </div>
  </div>
</div>
<script src="https://accounts.google.com/gsi/client" async defer></script>
<script>
  $(document).ready(function () {
    LoginRegister.init({
      selectors: {
        email: {
          login: '.login_forms_email',
          register: '.register_forms_email'
        },
        password: {
          login: '.login_forms_password',
          register: '.register_forms_password'
        },
        captcha: {
          login: '.login_forms_captcha',
          register: '.register_forms_captcha',
          verify: '.verify-code-input'
        },
        buttons: {
          login: '#login_button',
          register: '#register_button',
          verifyCode: '#verifyCodeBtn'
        },
        tabs: {
          login: '.login_tab_top1a',
          register: '.login_tab_top2a',
          close: '.login_tab_top2 a'
        }
      },
      messages: {
        email: "電子メール形式が正しくありません",
        password: {
          empty: "パスワードを入力してください",
          invalid: "パスワードは6〜18文字で、文字と数字の両方を含む必要があります"
        },
        captcha: "グラフィック検証コードを入力してください",
        verifyCode: "確認コードを入力してください",
        operationInProgress: "進行中の操作、待ってください",
        unexpectedError: "予期しないエラーが発生しました"
      },
      urls: {
        login: "/ja/account/dologin.html",
        register: "/ja/account/register.html",
        getMailSign: "/ja/account/getMailSign",
        sendMail: "/ja/account/registerSendMail.html",
        redirctUrl:'pc'
      }
    });
  });
  function initializeGoogleSignIn() {
    if (typeof google === 'undefined' || !google.accounts) {
      setTimeout(initializeGoogleSignIn, 100);
     
      return;
    }

    google.accounts.id.initialize({
      client_id: "294584378011-s53466qiuig7d30tcqrpjv1ue3ni2gun.apps.googleusercontent.com",
      callback: handlePCCredentialResponse,
      auto_select: false,
      locale: 'ja',
      
    });
    
    google.accounts.id.renderButton(
      document.getElementById("g_id_signin"),
      {
        theme: "outline",
        size: "large",
        type: "standard",
        shape: "rectangular",
        logo_alignment: "left",
        text: "signin_with",
        width: 400,
        locale: 'ja',
      }
    );
    
  }
  document.addEventListener('DOMContentLoaded', initializeGoogleSignIn);
</script>
  <!-- Google tag (gtag.js) -->
  <script  async src="https://www.googletagmanager.com/gtag/js?id=G-LN407DS0B4"></script>
  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
  
    gtag('config', 'G-LN407DS0B4');
  </script>
  <script src="/kukukuwl.js"   type="text/javascript"></script>
 <a href="javascript:void(0);" class="totop" role="button" aria-label="トップに戻ります"><img src="/assets/images/totop.png" alt="" /></a>
        <script>
            layui.use(function () {
                var element = layui.element;
                element.tab({
                    headerElem: "#skilldetailsR1s_header>button",
                    bodyElem: "#skilldetailsR1s_body>div",
                });
            });
            function initSkillCloneCopy() {
                $(document)
                    .off("click.skillCloneCopy")
                    .on("click.skillCloneCopy", ".skill_clone .skill_clone_copy", function (e) {
                        e.preventDefault();

                        var $btn = $(this);
                        var $img = $btn.find("img");

                        var text = $.trim($btn.siblings("p").text());

                        var $temp = $("<textarea>");
                        $("body").append($temp);
                        $temp.val(text).select();

                        try {
                            document.execCommand("copy");

                            // 切换成功图标
                            $img.attr("src", "/assets/images/prompt_word2RMs_p_btn_ok.png");
                            $btn.addClass("active");
                            // 清除上一次定时器
                            clearTimeout($btn.data("copyTimer"));

                            // 3秒后恢复原图
                            var timer = setTimeout(function () {
                                $img.attr("src", "/assets/images/prompt_word2RMs_p_btn.png");
                                $btn.removeClass("active");
                            }, 3000);

                            $btn.data("copyTimer", timer);
                        } catch (err) {
                            alert("复制失败");
                        }

                        $temp.remove();
                    });
            }

            function initSkilldetailsFixed() {
                var $box = $(".skilldetailsR1");
                if (!$box.length) {
                    return;
                }
                var fixedTop = 20;
                var topOffset = $box.offset().top;
                var boxHeight = $box.outerHeight();
                var $placeholder = $("<div></div>").height(boxHeight).hide();
                $box.before($placeholder);
                function handleFixed() {
                    if ($(window).width() <= 1024) {
                        $placeholder.hide();
                        $box.css({
                            position: "",
                            top: "",
                            width: "",
                            zIndex: "",
                        });
                        return;
                    }
                    var scrollTop = $(window).scrollTop();
                    if (scrollTop >= topOffset - fixedTop) {
                        $placeholder.show();
                        $box.css({
                            position: "fixed",
                            top: fixedTop + "px",
                            width: $placeholder.width() + "px",
                            zIndex: 100,
                        });
                    } else {
                        $placeholder.hide();
                        $box.css({
                            position: "",
                            top: "",
                            width: "",
                            zIndex: "",
                        });
                    }
                }
                $(window).on("scroll.skilldetailsFixed resize.skilldetailsFixed", handleFixed);
                handleFixed();
            }
            function initSkilldetailsExpand() {
                $(".skilldetailsL_p").each(function () {
                    var $item = $(this);

                    $item.find(".skilldetailsL_p_expand").text($item.hasClass("active") ? "...すべて拡張します" : "隠れた");
                });

                $(document)
                    .off("click.skilldetailsExpand")
                    .on("click.skilldetailsExpand", ".skilldetailsL_p_expand", function (e) {
                        e.preventDefault();

                        var $parent = $(this).closest(".skilldetailsL_p");

                        if ($parent.hasClass("active")) {
                            $parent.removeClass("active");
                            $(this).text("隠れた");
                        } else {
                            $parent.addClass("active");
                            $(this).text("...すべて拡張します");
                        }
                    });
            }

            function checkFollow() {
                let dataSources = [];
                $('button.skill_datas').each(function () {
                    let source = $(this).data('source');
                    if (source) {
                        dataSources.push(String(source).trim());
                    }
                });
                dataSources = [...new Set(dataSources)];
                if (dataSources.length === 0) {
                    return;
                }
                $.post('/api/user/FindSkillFollow', {
                    source: dataSources
                }, function (res) {
                    if (res.code == 1 && res.data.length > 0) {
                        res.data.forEach(function (id) {
                            $('button.skill_datas[data-source="' + id + '"]').addClass('active');
                        });
                    }
                }, 'json');
            }
            $(function () {
                checkFollow();
                initSkillCloneCopy();
                initSkilldetailsFixed();
                initSkilldetailsExpand();
            });
            $(document).on('click', 'button.skill_datas', function (e) {
                e.preventDefault();
                const that = $(this);
                let source = that.data('source');
                if (!source || source === undefined || !CommonUtils.checkLogin()) return false;
                layer.load(2, {
                    shade: [0.3, "#000"],
                    time: 0,
                });
                var path = "/user/followSkill";
                var realPath = CommonUtils.getRealPath(path);
                $.post(realPath, { source: source }, function (result) {
                    layer.closeAll();
                    CommonUtils.showMsg(result.msg, result.code);
                    if (result.code == 1) {
                        var values = result.data.data_source;
                        var count = result.data.count;
                        var collected = result.data.collected;
                        var elements = $(".collectNums_" + values);
                        if (elements.length > 0) {
                            elements.each(function () {
                                $(this).parents('button').toggleClass('active', collected);
                                $(this).text(count);
                            });
                        }
                    }
                })
            })

            $(document).on('click', '.skill_downloadzip', function (e) {
                e.preventDefault();
                const url = $(this).data("source");
                if (!url) return;
                window.open("/api/index/download_zip?source=" + encodeURIComponent(url), "_blank");
            })

        </script>
    </body>

</html>