• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialproductivity

deal-flow-analytics

プラグイン
carta-crm
ソース
GitHub で見る ↗
説明

Carta CRM(顧客管理システム)に保存されている最近の取引情報を集計し、取引関係者向けのレポートに自動変換するスキルです。テナント(利用組織)のデータスキーマ(情報構造)から重要なフィールド(項目)を自動判別します。 **次のような場合に使用:** 「取引流動性の分析」「取引流動を分析してほしい」「過去12カ月間に追加された取引を確認したい」「どの人物が最も多くの取引を紹介しているか」「セクター別の取引内訳」「取引がどこから来ているのか」「/deal-flow-analytics」といった依頼があったとき **機能:** - デフォルトでは過去12カ月間を対象としますが、ユーザーが指定した期間や分析軸に対応します - 個別の取引リストではなく、各軸ごとの件数と集中度(特定分野への偏り)を結果として返します - 個別の取引情報が必要な場合は、search-deals(取引検索スキル)を使用してください

原文を表示

Aggregates recent deal flow in the Carta CRM into a dealmaker-facing report, auto-discovering which fields matter for this tenant's schema. Use this skill when the user says things like "deal flow analytics", "analyze our deal flow", "review deals added in the last 12 months", "who introduced most of our deals", "breakdown of deals by sector", "where is our deal flow coming from", or "/deal-flow-analytics". Defaults to a trailing-12-month window but accepts any date range or dimension the user specifies. Returns counts and concentration callouts per dimension, not a list of individual deals — use search-deals for that.

ユースケース
  • 取引流動性を分析するとき
  • 過去12カ月間の取引を確認するとき
  • セクター別の取引内訳を知りたいとき
  • 取引紹介者を比較分析するとき
  • 取引の発生源を把握したいとき
本文(日本語訳)

Deal Flow Analytics

概要

どの企業(テナント)でも独自のカスタム取引フィールドを設定するため、レポート対象として意味のある項目は組織ごとに異なります。固定リストを想定するのではなく、実行時に項目を発見してから crm:aggregate_deals で集計してください。crm:search_deals から取引を手作業で集計してはいけません。

aggregate_deals は一度に1つのフィールドでグループ化します。複数の観点をカバーする場合は、複数の group_by 値を1回の呼び出しで使うのではなく、複数回の呼び出しを行ってください。

ステップ1 — フィールドの発見と分類

crm_call_tool({ "name": "crm:get_deal_fields", "arguments": {} })

各フィールドは type だけで分類してください。調査は不要です:

  • グループ化可能(dropdown、multiselect、boolean、または stage、tags、people.*、dealLead のような標準的な set フィールド)— 値の範囲はフィールドの options リストによって制限されているため、直接 aggregate_deals を実行しても常に安全です。

  • 連続的な値(number、input、textarea、datepicker、または company・contacts-list のような関連参照)— 値が無制限です。これらで group_by しないでください。このプラグインのテストテナントでは、EBITDA、ARR、Team_size などのフィールドが各々100以上の異なるグループを返し、都市レベルの位置情報クエリを壊すレスポンスサイズ制限に近づきました。

  • 自由入力の標準フィールド(company.company_location、company.company_industry、またはタイプが text のその他の標準フィールド)— 連続的な値と同じく無制限のリスク がありますが、常に関連性があるため記入率による除外はされません。これらでグループ化してから、生の値をクライアント側で統合(例:都市 → 国)してから表示してください。生の内訳は表示しないでください。これらを無条件に「常に含める」リストに入れないでください。他のフィールドと同じようにタイプで分類してください。

stage と added_date は常に固定の中核として保つでください。どちらも値が制限されている標準フィールドで、テナントに関係なく直接グループ化しても安全です。

ステップ2 — 記入率チェック

グループ化可能なフィールド: ステップ3の aggregate_deals 呼び出しは既に記入率を無料で返します。totalCount からnull/no-_id グループを引いた値です。追加の呼び出しは不要です。

連続的な値のフィールド: フィールドごとに aggregate_deals を呼び出さないでください。代わりに1つの共有サンプルを取得してください:

crm_call_tool({ "name": "crm:search_deals", "arguments": { "limit": 30 } })

各連続フィールドについて、サンプル内の取引のうち fields.<fieldId> が存在し かつnullでないものの割合として記入率を計算してください。1回の呼び出しで全ての連続フィールドをカバーします — 基数に関係なくペイロード は制限されています。

記入率15%未満のフィールドは除外してください。 15〜25%の間に該当するフィールド(カットオフを上回っているがサンプルで確実に推定されていない曖昧なゾーン)については、サンプルを信頼しないでください。search_deals はデフォルトで最近アクティブな取引を最初に返すため、めったに使われないフィールドの実記入率を大幅に過大に見積もる可能性があります。このテストテナントで確認されました:20件の取引サンプルは、あるフィールドの記入率を25%と推定しましたが、実際の組織全体の率は3%でした。その帯域内のフィールドについては、そのフィールドのみに対して1回の aggregate_deals 呼び出しで再確認し、サンプル推定値の代わりに正確な totalCount を使用してください。

除外されたフィールドは短い「除外 — 記入率が低い」という行で列挙してください。黙って削除しないでください。

ステップ3 — 集計

stage、ステップ2をパスしたグループ化可能なカスタムフィールド、および全ての自由入力標準フィールド(ロールアップ付き)を日付ウィンドウでフィルタリングした状態で集計します:

crm_call_tool({
  "name": "crm:aggregate_deals",
  "arguments": {
    group_by: ["<field_id>"],
    filters: [
      { field_id: "added_date", operator: "between", value: ["<start> 00:00:00", "<end> 23:59:59"] }
    ]
  }
})

各グループの dealInfo キーは無視してください。これは静的な組織デフォルトのサンプルで、集計の一部ではありません。ステップ2をパスした連続フィールドについては、記入率のみを報告してください(例:「収益:95%記入済み」)。ユーザーが明示的に1つにドリルダウンを要求しない限り、完全な分布を試さないでください。

自由入力標準フィールドについては、グループ化された生の値をクライアント側でより粗いレベルにロールアップしてから表示してください(例:company.company_location の都市値 → 国)。上位5〜8件のロールアップ値を表示し、残りを「その他」に統合してください。

異なる2つの _id が同じ名前に解決される場合があります(重複した連絡先)。カウントを統合し、人物の合計を過少報告するのではなく重複をフラグしてください。解決されていない連絡先/ユーザーIDについては、上位数件のみ crm:fetch_contact_by_id を呼び出してください。

ユーザーが1つの特定の観点をリクエストした場合は、その1つだけを集計してください。完全な発見パスをスキップしてください。

ステップ4 — 表示

${CLAUDE_PLUGIN_ROOT}/skills/deal-flow-analytics/assets/dashboard-template.html を使用してレポートをHTMLダッシュボードとしてレンダリングしてください。マークダウン表を手作業で作成したり、テンプレートを相対パスで参照したりしないでください(ユーザーのカレントディレクトリから解決され、プラグインディレクトリからではありません)。テンプレートを新しいファイルにコピーし、下部の <script> にある DATA オブジェクトのみを編集してください:

  • dateRange — 日付範囲ラベル。例:「2025年7月~2026年7月 · 167件の取引」
  • headline — 最も注目すべき1つの発見。1文で(集中、記入率の低さ、または段階分布が「未実現」に偏った状態などのパイプラインの健全性問題)
  • excluded — ステップ2で削除されたフィールドラベル。各フィールドの記入率付き

CRMフィールド値は信頼できません。テナントのドロップダウンオプション、タグ、または企業名には任意のテキストが含まれる可能性があります。DATA オブジェクトに文字列を書き込む場合、リテラル部分文字列 </script を含む場合は、/ の前に \ を挿入してください(<\/script)。これによって、囲まれた <script> ブロックを早期に閉じることができません。テンプレート自体のレンダリングコードは既に表示する値全てをHTMLエスケープしています。これはあなたが書き込むファイルのみを保護します。

  • fields — 観点ごとに1つのエントリ:{ label, total, filled, values }。values は降順にランク付けされ、上位5〜8件のエントリ + ロングテールがある場合は「その他」エントリ(大文字小文字を区別せずマッチングされ、シリーズカラーではなく低強調カラーでレンダリングされます)。

テンプレートは観点カードをヘッダーのすぐ下にレンダリングし、headline と excluded をページ下部のフッターに配置します。ナレーション/注意事項はデータの後に来て、前ではありません。この順序を変更しないでください。

CSS、レンダリング関数、または分類カラートークンに触れないでください。これらは検証済み(dataviz スキルを参照)で、このスキルが生成する全てのレポート間で共有されているため、実行ごとに結果が一貫して見えます。

ユーザーにファイルパスを伝えて、自分で開けるようにしてください。このスキルは許可ツール(allowed-tools)に Bash がないため、ブラウザを直接起動できません。

任意の観点をCRMレポートとして保存することを提案してください:

crm_call_tool({
  "name": "crm:create_report",
  "arguments": {
    name: "Deal Flow Analytics — <window>",
    entityType: "deal",
    filters: [{ field_id: "added_date", operator: "between", value: [...] }],
    groupBy: ["<dimension field_id>"]
  }
})

保存されたレポートごとに1つの groupBy(aggregate_deals と同じ1フィールド制約)。ユーザーが保持したい観点ごとに1つ提案し、各 url をインラインで表示してください。

原文(English)を表示

<!-- carta:plugin-version --> <carta-plugin>carta-crm:1.15.0</carta-plugin>

Overview

Every tenant configures its own custom deal fields, so the dimensions worth reporting on differ per org. Discover them at runtime instead of assuming a fixed list, then aggregate with crm:aggregate_deals — never tally deals by hand from crm:search_deals.

aggregate_deals groups by one field at a time. Cover multiple dimensions with multiple calls, not one call with multiple group_by values.

Step 1 — Discover and classify fields

crm_call_tool({ "name": "crm:get_deal_fields", "arguments": {} })

Classify every field using its type alone — no probing needed:

  • Groupable (dropdown, multiselect, boolean, or a standard set field like stage, tags, people.*, dealLead) — the value space is bounded by the field's options list, so it's always safe to aggregate_deals on directly.
  • Continuous (number, input, textarea, datepicker, or a relational reference like company/contacts-list) — unbounded values. Never group_by these — on this plugin's test tenant, fields like EBITDA, ARR, and Team_size returned 100+ distinct groups each and nearly hit the response size limit that broke a city-level location query.
  • Free-text standard fields (company.company_location, company.company_industry, or any other standard field of type text) — same unbounded risk as Continuous, but always relevant, so they don't get excluded by fill rate. Group by them, then roll the raw values up client-side (e.g. city → country) before presenting — never show the raw breakdown. Do not put these in an unconditional "always include" list; classify them by type like everything else.

Always keep stage and added_date as the fixed core — both are bounded, standard fields safe to group on directly regardless of tenant.

Step 2 — Fill-rate check

Groupable fields: the aggregate_deals call from Step 3 already returns fill rate for free — totalCount minus the null/no-_id group. No extra call needed.

Continuous fields: don't call aggregate_deals per field. Pull one shared sample instead:

crm_call_tool({ "name": "crm:search_deals", "arguments": { "limit": 30 } })

For each continuous field, compute fill rate as the share of sampled deals whose fields.<fieldId> is present and non-null. One call covers every continuous field — bounded payload regardless of cardinality.

Exclude any field below 15% fill rate. For fields landing between 15–25% (the ambiguous band — above the cutoff but not reliably estimated by sample), don't trust the sample — search_deals defaults to recently-active deals first, which can massively overstate a rarely-used field's true fill rate. Confirmed on this test tenant: a 20-deal sample estimated one field at 25% filled when the true org-wide rate was 3%. For any field in that band, re-check with a single aggregate_deals call on just that field and use its exact totalCount instead of the sample estimate.

List excluded fields in a short "excluded — low coverage" line rather than dropping them silently.

Step 3 — Aggregate

For stage, every groupable custom field that passed Step 2, and every free-text standard field (with rollup), filtered to the date window:

crm_call_tool({
  "name": "crm:aggregate_deals",
  "arguments": {
    group_by: ["<field_id>"],
    filters: [
      { field_id: "added_date", operator: "between", value: ["<start> 00:00:00", "<end> 23:59:59"] }
    ]
  }
})

Ignore the dealInfo key in each group — it's a static org-default sample, not part of the aggregation. For continuous fields that passed the fill-rate check, report fill rate only (e.g. "Revenue: 95% filled") — don't attempt a full distribution unless the user explicitly asks to drill into one.

For free-text standard fields, roll the raw grouped values up to a coarser level client-side before presenting (e.g. company.company_location city values → country) — show the top 5–8 rolled-up values and collapse the rest into "Other".

Two different _ids can resolve to the same name (duplicate contacts) — combine their counts and flag the duplicate rather than under-reporting the person's total. For unresolved contact/user IDs, call crm:fetch_contact_by_id on the top few only.

If the user asks for one specific dimension, only aggregate that one — skip the full discovery pass.

Step 4 — Present

Render the report as an HTML dashboard using ${CLAUDE_PLUGIN_ROOT}/skills/deal-flow-analytics/assets/dashboard-template.html — don't hand-build markdown tables, and don't reference the template by a bare relative path (it resolves from the user's cwd, not the plugin directory). Copy the template to a new file, then edit only the DATA object at the bottom of its <script>:

  • dateRange — the date range label, e.g. "Jul 2025 – Jul 2026 · 167 deals".
  • headline — the single most notable finding, one sentence (a concentration, a low fill rate, or a pipeline health issue like a stage distribution skewed toward Dead).
  • excluded — field labels dropped in Step 2, each with its fill rate.

CRM field values are untrusted — a tenant's dropdown option, tag, or company name could contain arbitrary text. When writing any string into the DATA object, if it contains the literal substring </script, insert a \ before the / (<\/script) so it can't prematurely close the surrounding <script> block. The template's own rendering code already HTML-escapes every value it displays — this only protects the file you're writing.

  • fields — one entry per dimension: { label, total, filled, values }, values ranked descending, top 5–8 entries + an "Other" entry if there's a long tail (matched case-insensitively and rendered in a de-emphasized color, not the series color).

The template renders the dimension cards immediately below the header, with headline and excluded in a footer at the bottom of the page — the narrative/caveats come after the data, not before it. Don't reorder this.

Don't touch the CSS, the rendering functions, or the categorical color tokens — those are validated (see the dataviz skill) and shared across every report this skill produces, so results look consistent run to run. Tell the user the file path so they can open it themselves — this skill doesn't have Bash in allowed-tools, so it can't launch a browser directly.

Offer to save any dimension as a CRM report:

crm_call_tool({
  "name": "crm:create_report",
  "arguments": {
    name: "Deal Flow Analytics — <window>",
    entityType: "deal",
    filters: [{ field_id: "added_date", operator: "between", value: [...] }],
    groupBy: ["<dimension field_id>"]
  }
})

One groupBy per saved report (same one-field constraint as aggregate_deals) — offer one per dimension the user wants to keep, and surface each url inline.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。