funding-digest by anthropics/financial-services-plugins
npx skills add https://github.com/anthropics/financial-services-plugins --skill funding-digestAI 免责声明(必填): 您必须在演示文稿页脚中包含以下免责声明文本。这不是可选的——缺少此声明的报告是不完整的:
"分析由 AI 生成 — 请确认所有输出内容"
页脚 — 在生成的幻灯片底部,以醒目的黄色横幅形式显示:"分析由 AI 生成 — 请确认所有输出内容"
使用 S&P Global Capital IQ 数据,生成分析师质量的单页 PowerPoint,总结所关注行业或公司近期融资轮次的关键要点。每笔交易都链接回其 Capital IQ 档案,以便快速深入查看。
在以下任一模式时触发:
此技能生成单页 PPTX 简报:
/mnt/skills/public/pptx/SKILL.md(及其子参考 pptxgenjs.md,用于从零开始创建)S&P Global 的标识符系统将公司名称解析为法律实体。这对大多数公司都有效,但存在已知的故障模式会导致空结果。在整个工作流程中应用这些规则,以避免静默数据丢失。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
在调用任何融资工具之前,通过 get_info_from_identifiers 运行每个标识符。这是及早发现问题的最廉价且最可靠的方法。检查响应中的两点:
references/sector-seeds.md 中的别名、法律实体名称或直接使用 company_id。status 字段是什么?
"Operating" → 可以安全查询融资轮次。"Operating Subsidiary" → 公司存在但由母公司拥有。它将返回零个融资轮次。在摘要中注明此上下文(例如,"被 [母公司] 收购"),但不要查询其融资信息。这个单一的预验证步骤可以防止大多数空结果问题。 将所有候选标识符批量放入一个 get_info_from_identifiers 调用中(它能很好地处理大批量),并在继续之前进行分类处理。
如果 get_rounds_of_funding_from_identifiers 对您预期有数据的公司返回空结果:
references/sector-seeds.md 中的别名表以了解已知的不匹配情况。常见模式:"[品牌] AI" → "[法律名称], Inc."(例如,Together AI → "Together Computer, Inc.", Character.ai → "Character Technologies, Inc.", Runway ML → "Runway AI, Inc.")。get_info_from_identifiers(identifiers=["公司名称"]) —— 如果这也返回空结果,则公司可能处于早期阶段或尚未被收录。作为大公司部门或全资子公司的公司(例如,Alphabet 旗下的 DeepMind、Microsoft 旗下的 GitHub、Voodoo 旗下的 BeReal)将返回零个融资轮次。它们的资本活动在母公司层面进行追踪。
如何检测: 来自 get_info_from_identifiers 的 status 字段将显示 "Operating Subsidiary"。references/sector-seeds.md 文件也会用 ⚠️ 警告标记已知的子公司。跳过这些公司的融资查询。
get_rounds_of_funding_from_identifiers 作为主要工具,而不是 get_funding_summary_from_identifiers摘要工具更快但可靠性较低 —— 即使存在详细轮次,它也可能返回错误或不完整的数据。始终将详细轮次工具作为主要数据源。摘要工具仅适用于快速聚合检查(总融资额、轮次数量),并且如果结果看起来偏低,应使用轮次工具进行验证。
当处理大量公司集合(50 家以上公司)时,按 15-20 家一组进行批处理。每批处理后,检查返回空结果的公司,并在继续之前通过规则 1 中的备用步骤处理它们。
role 参数至关重要company_raising_funds → "X 公司筹集了哪些轮次?"(公司视角)company_investing_in_round_of_funding → "投资者 Y 投资了什么?"(投资者视角)使用错误的角色会静默返回空结果。对于交易流摘要,您几乎总是需要 company_raising_funds。仅在专门分析投资者的投资组合活动时才使用投资者角色。
S&P Global 处理大小写变化("openai" = "OpenAI"),但对拼写和标点符号要求严格。"Character AI" 可能失败,而 "Character.ai" 成功。如有疑问,使用 company_id(例如,C_1829047235),这保证能解析。
确定摘要应涵盖的内容。有两种设置:
回头用户(有观察列表): 如果用户之前定义了要追踪的行业或公司,请使用该列表。检查对话历史记录以查找先前的观察列表。
新用户: 询问以下内容:
| 参数 | 默认值 | 备注 |
|---|---|---|
| 行业 | (至少一个) | 例如,"AI, Fintech, Biotech" |
| 特定公司 | 可选 | 补充行业层面的覆盖 |
| 时间段 | 最近 7 天 | "本周"、"过去 2 周"、"本月" |
根据时间段计算确切的 start_date 和 end_date。
对于每个指定的行业,使用经过验证的引导方法构建公司集合:
种子公司来自领域知识(参见 references/sector-seeds.md)
company_id 值。如果品牌名称失败,请直接使用这些 ID。立即预验证所有种子(规则 0):
get_info_from_identifiers(identifiers=[该行业的所有种子])
将结果分类到两个桶中:
status = "Operating") → 继续竞争对手扩展通过竞争对手扩展(仅使用 ✅ 已解析的种子):
get_competitors_from_identifiers(identifiers=[已解析的种子], competitor_source="all")
验证扩展后的集合:
get_info_from_identifiers(identifiers=[新的竞争对手])
应用相同的分类。按 simple_industry 匹配目标行业进行筛选。删除任何未解析的名称或子公司。
如果用户提供了特定公司,直接添加这些公司,但仍需对它们进行预验证分类。切勿跳过验证 —— 即使是知名品牌也可能静默失败。
保持集合可控 —— 每个行业目标为 15-40 家已解析、运营中的公司。对于多行业摘要,总数可能达到 50-100+ 家公司。
对于集合中的所有公司:
get_rounds_of_funding_from_identifiers(
identifiers=[批次],
role="company_raising_funds",
start_date="YYYY-MM-DD",
end_date="YYYY-MM-DD"
)
如果集合很大,按 15-20 家一批进行处理。
每批处理后,识别空结果的公司。 对于任何预期有活动的公司:
从成功的结果中收集所有 transaction_id 值,然后使用详细的轮次信息进行丰富:
get_rounds_of_funding_info_from_transaction_ids(
transaction_ids=[所有融资ID]
)
将所有交易 ID 放在一个调用(或少量调用)中传递,而不是每个交易一个调用 —— 该工具能高效处理批量操作。
从每个轮次中提取以下内容(对幻灯片至关重要):
transaction_id —— 用于 Capital IQ 交易链接日期是必需的。 公告日期和完成日期必须始终出现在最终幻灯片的交易表格中。如果只有一个日期可用,则显示该日期,并将另一个标记为"—"。
对于涉及重大交易(大额融资轮、显著的估值变动)的任何公司,获取简要描述:
get_company_summary_from_identifiers(identifiers=[重要公司])
这为叙述增添了背景(例如,"该公司是一家成立于 2021 年的 AI 基础设施初创公司,正在扩展进入...")。
在设计幻灯片之前,分析数据以呈现故事:
标记为"重要":
识别趋势:
选择关键要点(3-5 条): 将最重要的信号提炼成 3-5 条简洁的要点式关键信息。这些是幻灯片的中心内容。每个要点应为一句话,简洁有力且有数据支持。
示例:
对于关键要点或重要交易中出现的每家公司,使用双层本地管道生成徽标。不要使用 Clearbit (logo.clearbit.com) —— 它已弃用且经常失败。外部徽标 CDN(Brandfetch、logo.dev、Google Favicons)需要 API 密钥或被网络限制阻止。相反,请使用以下方法:
simple-icons npm 包(3300+ 个品牌 SVG,无需网络)simple-icons 包捆绑了数千个知名品牌的高质量 SVG 图标。它完全离线工作 —— 无需 API 密钥,无需网络调用。与 sharp 一起安装以进行 SVG → PNG 转换:
npm install simple-icons sharp
查找策略:
const si = require('simple-icons');
const sharp = require('sharp');
// 通过精确标题匹配查找图标(不区分大小写)
function findSimpleIcon(companyName) {
// 首先尝试精确匹配
for (const [key, val] of Object.entries(si)) {
if (!key.startsWith('si') || !val || !val.title) continue;
if (val.title.toLowerCase() === companyName.toLowerCase()) return val;
}
// 尝试去掉常见后缀(AI, Inc., Corp.)
const stripped = companyName.replace(/\s*(AI|Inc\.?|Corp\.?|Ltd\.?)$/i, '').trim();
if (stripped !== companyName) {
for (const [key, val] of Object.entries(si)) {
if (!key.startsWith('si') || !val || !val.title) continue;
if (val.title.toLowerCase() === stripped.toLowerCase()) return val;
}
}
return null;
}
// 使用品牌的官方颜色将 SVG 转换为 PNG
async function simpleIconToPng(icon, outputPath) {
const coloredSvg = icon.svg.replace('<svg', `<svg fill="#${icon.hex}"`);
await sharp(Buffer.from(coloredSvg))
.resize(128, 128, { fit: 'contain', background: { r: 255, g: 255, b: 255, alpha: 0 } })
.png()
.toFile(outputPath);
}
覆盖率: 约 43% 的典型交易流公司(对 Stripe、Anthropic、Databricks、Snowflake、Discord、Shopify、SpaceX、Mistral AI、Hugging Face 等主要科技品牌覆盖较好;对小众金融科技、生物科技或早期公司覆盖较弱)。
sharp(100% 覆盖率)对于在 simple-icons 中未找到的公司,生成一个简洁的基于首字母的 PNG 徽标:
async function generateInitialLogo(companyName, outputPath) {
const initial = companyName.charAt(0).toUpperCase();
const svg = `
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg">
<circle cx="64" cy="64" r="64" fill="#BDBDBD"/>
<text x="64" y="64" font-family="Arial, Helvetica, sans-serif"
font-size="56" font-weight="bold" fill="#FFFFFF"
text-anchor="middle" dominant-baseline="central">${initial}</text>
</svg>`;
await sharp(Buffer.from(svg)).png().toFile(outputPath);
}
async function fetchLogo(companyName, outputDir) {
const fileName = companyName.toLowerCase().replace(/[\s.]+/g, '-') + '.png';
const outPath = path.join(outputDir, fileName);
// 层级 1: 尝试 simple-icons
const icon = findSimpleIcon(companyName);
if (icon) {
await simpleIconToPng(icon, outPath);
return { path: outPath, source: 'simple-icons' };
}
// 层级 2: 生成基于首字母的备用徽标
await generateInitialLogo(companyName, outPath);
return { path: outPath, source: 'initial-fallback' };
}
徽标指南:
/home/claude/logos/[公司名称].pngBDBDBD) 填充和白色文字 —— 与单色调色板保持一致在创建幻灯片之前,请阅读 /mnt/skills/public/pptx/SKILL.md 和 /mnt/skills/public/pptx/pptxgenjs.md。
使用 pptxgenjs 创建单页 PowerPoint。幻灯片应信息密集但视觉简洁 —— 考虑"高管仪表板"而非"文字墙"。
┌─────────────────────────────────────────────────────────────┐
│ 交易流摘要 │
│ [时间段] · [行业] [日期] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ $X.XB │ │ N │ │ $X.XB │ │ $X.XB │ │
│ │ 融资额 │ │ 轮次 │ │ 平均融资│ │ 最大 │ │
│ │ │ │ │ │ 前估值 │ │ 轮次 │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
│ │
│ 关键要点 │
│ ───────────────────────────────────────────────── │
│ [徽标] 要点 1 文本放在这里... │
│ [徽标] 要点 2 文本放在这里... │
│ [徽标] 要点 3 文本放在这里... │
│ [徽标] 要点 4 文本放在这里... │
│ │
│ 重要交易 │
│ ┌──────────────────────────────────────────────────────────┐│
│ │公司│类型│公告日期│完成日期│金额│融资前│融资后│领投方│🔗││
│ │───────│─────│─────────│──────│──────│─────│──────│────│──││
│ │ ... │ ... │ ... │ ... │ ... │ ... │ ... │... │🔗││
│ └──────────────────────────────────────────────────────────┘│
│ │
│ [页脚: 交易流摘要 · 数据来源: S&P Global Capital IQ] │
│ [页脚: AI 免责声明] │
└─────────────────────────────────────────────────────────────┘
色彩理念:极简,单色优先。 幻灯片应感觉像高端金融简报 —— 黑色、白色和灰色占主导地位。颜色仅在承载意义时使用(例如,下跌轮的红色指示器,突出指标的绿色指示器),或在读者自然期望看到颜色的地方(公司徽标)。切勿将颜色用于纯粹的装饰目的,如背景填充、装饰条或渐变效果。
调色板 —— 单色行政风:
FFFFFF(白色)—— 干净、开放的幻灯片背景1A1A1A(近黑色)—— 标题区域的强烈对比1A1A1A(近黑色)—— 所有正文、统计数字、要点6B6B6B(中灰色)—— 标签、说明文字、页脚、日期戳D0D0D0(浅灰色)—— 微妙的结构线、卡片轮廓、表格边框F5F5F5(灰白色/极浅灰色)—— 统计卡片填充、表格交替行2B5797(柔和蓝色)—— 表格中的 Capital IQ 交易链接(幻灯片上唯一的蓝色)C0392B(柔和红色)—— 仅用作小圆点、标签或单个词的高亮,切勿用作填充或背景2E7D32(柔和绿色)—— 同样极简使用:圆点、小标签或单个高亮数字排版:
6B6B6B)6B6B6B)2B5797)统计卡片(顶部行):
F5F5F5,细边框为 D0D0D0 —— 无阴影,无颜色填充关键要点(中间部分):
重要交易表格(底部部分):
紧凑的表格显示 4-6 笔最重要的交易
列:公司、类型(X 轮)、公告日期、完成日期、金额(百万美元)、融资前估值(百万美元)、融资后估值(百万美元)、领投方、交易链接
公告日期和完成日期列以 MMM DD 格式显示日期(例如,"Jan 15")。这些列是必需的,必须始终存在。如果日期不可用,显示"—"。
交易链接列包含一个可点击的"查看 →"文字,链接到 Capital IQ:
https://www.capitaliq.spglobal.com/web/client?#offering/capitalOfferingProfile?id=<transaction_id>
其中 <transaction_id> 来自 get_rounds_of_funding_from_identifiers 的 transaction_id。
如果融资前或融资后估值未披露,在该单元格中显示"—"
标题行填充近黑色 (1A1A1A),文字白色;交替行使用 F5F5F5 和 FFFFFF
将表格在幻灯片上水平居中。 计算表格的总宽度,然后设置 x 使其在幻灯片宽度内居中:x = (slideWidth - tableWidth) / 2。对于 16:9 布局(13.33" 宽),如果表格宽 12",则使用 x = 0.67。切勿将表格左对齐到幻灯片边缘。
保持紧凑 —— 这是一个参考,不是焦点
表格单元格中无颜色填充。如果交易是下跌轮,可以在金额旁边添加一个小的红色文字标签"(↓ 下跌)" —— 这是表格中唯一允许使用的颜色。
交易链接实现(pptxgenjs): 在 pptxgenjs 中,使用单元格对象上的 options.hyperlink 属性向表格单元格添加超链接:
// 带有 Capital IQ 交易链接的表格单元格
{
text: "查看 →",
options: {
hyperlink: {
url: `https://www.capitaliq.spglobal.com/web/client?#offering/capitalOfferingProfile?id=${transactionId}`
},
color: "2B5797",
fontSize: 9,
fontFace: "Arial"
}
}
表格居中(pptxgenjs): 始终将交易表格在幻灯片上居中。动态计算 x 位置:
const SLIDE_W = 13.33; // 16:9 幻灯片宽度
const TABLE_W = 12.5; // 表格总宽度(所有列宽之和)
const TABLE_X = (SLIDE_W - TABLE_W) / 2; // ≈ 0.42"
slide.addTable(tableRows, {
x: TABLE_X,
y: tableY,
w: TABLE_W,
colW: [1.8, 0.9, 0.9, 0.9, 1.0, 1.1, 1.2, 1.6, 0.7], // 公司, 类型, 公告日期, 完成日期, 金额, 融资前, 融资后, 领投方, 链接
// ... 其他选项
});
根据需要调整 colW 值,但始终根据 (SLIDE_W - sum(colW)) / 2 重新计算 TABLE_X 以保持表格居中。
页脚:
通用颜色规则(严格执行):
2B5797) —— 这是除了语义红/绿之外唯一的非单色文字颜色。const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Deal Flow Digest";
const slide = pres.addSlide();
const SLIDE_W = 13.33; // 16:9 幻灯片宽度(英寸)
// 1. 深色标题栏,包含标题和周期
// 2. 统计卡片行(4张卡片:总融资额、轮次数量、平均融资前估值、最大轮次)
// 3. 带徽标的关键要点部分(包含估值背景信息)
// 4. 重要交易表格,包含公告日期、完成日期、融资前估值、融资后估值列以及 Capital IQ 交易链接
// - 表格居中:x = (SLIDE_W - tableWidth) / 2
// 5. 页脚
pres.writeFile({ fileName: "/home/claude/deal-flow-digest.pptx" });
根据 pptxgenjs 陷阱指南,对阴影和重复样式使用工厂函数(而非共享对象)。
遵循 PPTX 技能的质量保证流程:
内容质量保证: python -m markitdown deal-flow-digest.pptx —— 验证所有文字、数字、公司名称、估值数据和交易链接是否正确
视觉质量保证: 转换为图像并检查:
python /mnt/skills/public/pptx/scripts/office/soffice.py --headless --convert-to pdf deal-flow-digest.pptx
pdftoppm -jpeg -r 200 deal-flow-digest.pdf slide
检查元素重叠、文字溢出、对齐问题、低对比度文字、徽标尺寸问题,以及交易链接文字是否可见。
链接质量保证: 验证表格中的 Capital IQ URL 是否格式正确且包含正确的交易 ID。
修复并重新验证 —— 在宣布完成之前,至少进行一次修复和验证循环。
.pptx 复制到 /mnt/user-data/outputs/present_files 分享幻灯片get_info_from_identifiers —— 如果失败,尝试 references/sector-seeds.md 中的别名或直接使用 company_id。常见的品牌→法律名称不匹配:Together AI → "Together Computer, Inc.", Character.ai → "Character Technologies, Inc.", Runway ML → "Runway AI, Inc."。references/sector-seeds.md 文件会标记这些公司 —— 在包含公司之前检查该文件。get_funding_summary_from_identifiers 错误或返回零: 回退到 get_rounds_of_funding_from_identifiers —— 摘要工具可靠性较低。切勿依赖摘要工具作为唯一数据源。role 参数: 如果投资者视角查询返回空结果,请验证您使用的是 company_investing_in_round_of_funding,而不是 company_raising_funds(反之亦然)。simple-icons npm 包为典型的交易流公司提供约 43% 的覆盖率。对于其余公司,使用 sharp 生成的基于首字母的备用方案。保持一致的图标样式 —— 不要混合随机方法。如果 simple-icons 或 sharp 安装失败,则回退到 pptxgenjs 基于形状的首字母(灰色椭圆 + 白色文字覆盖),这不需要外部依赖。transaction_id 无法生成有效的 Capital IQ URL,则省略该行的链接单元格,而不是包含一个损坏的链接。每周安装次数
47
代码仓库
GitHub 星标数
5.6K
首次出现
13 天前
安全审计
安装于
opencode46
gemini-cli46
github-copilot46
amp46
codex46
kimi-cli46
AI DISCLAIMER (MANDATORY): You MUST include the following disclaimer text in the powerpoint footer. This is not optional — the report is incomplete without it:
"Analysis is AI-generated — please confirm all outputs"
Footer — At the bottom of the generated slide, as a prominent yellow banner: "Analysis is AI-generated — please confirm all outputs"
Generate an analyst-quality single-slide PowerPoint that summarizes key takeaways from recent funding rounds across watched sectors or companies, using S&P Global Capital IQ data. Each deal links back to its Capital IQ profile for quick drill-down.
Trigger on any of these patterns:
This skill produces a one-slide PPTX briefing:
/mnt/skills/public/pptx/SKILL.md before generating the PowerPoint (and its sub-reference pptxgenjs.md for creating from scratch)S&P Global's identifier system resolves company names to legal entities. This works well for most companies but has known failure modes that cause empty results. Apply these rules throughout the workflow to avoid silent data loss.
Before calling any funding tools, run every identifier through get_info_from_identifiers. This is the cheapest and most reliable way to catch problems early. Check two things in the response:
references/sector-seeds.md, the legal entity name, or the company_id directly.status field?
"Operating" → Safe to query for funding rounds."Operating Subsidiary" → The company exists but is owned by a parent. It will return zero funding rounds. Note this in the digest as context (e.g., "acquired by [Parent]") but do not query for funding.This single pre-validation step prevents the majority of empty-result issues. Batch all candidates into a single get_info_from_identifiers call (it handles large batches well) and triage before proceeding.
If get_rounds_of_funding_from_identifiers returns empty for a company you expect to have data:
references/sector-seeds.md for known mismatches. Common pattern: "[Brand] AI" → "[Legal Name], Inc." (e.g., Together AI → "Together Computer, Inc.", Character.ai → "Character Technologies, Inc.", Runway ML → "Runway AI, Inc.").get_info_from_identifiers(identifiers=["Company"]) now — if this also returns empty, the company may be too early-stage or not yet indexed.Companies that are divisions or wholly-owned subsidiaries of larger companies (e.g., DeepMind under Alphabet, GitHub under Microsoft, BeReal under Voodoo) will return zero funding rounds. Their capital events are tracked at the parent level.
How to detect: The status field from get_info_from_identifiers will show "Operating Subsidiary". The references/sector-seeds.md file also flags known subsidiaries with ⚠️ warnings. Skip these for funding queries.
get_rounds_of_funding_from_identifiers as the primary tool, not get_funding_summary_from_identifiersThe summary tool is faster but less reliable — it can return errors or incomplete data even when detailed rounds exist. Always use the detailed rounds tool as the primary data source. The summary tool is acceptable only for quick aggregate checks (total raised, round count) and should be verified against the rounds tool if results seem low.
When processing large company universes (50+ companies), batch in groups of 15–20. After each batch, check for companies that returned empty results and run them through the fallback steps in Rule 1 before moving on.
role parameter is criticalcompany_raising_funds → "What rounds did X raise?" (company perspective)company_investing_in_round_of_funding → "What did investor Y invest in?" (investor perspective)Using the wrong role returns empty results silently. For deal flow digests, you almost always want company_raising_funds. Only use the investor role when specifically analyzing an investor's portfolio activity.
S&P Global handles case variations ("openai" = "OpenAI") but is strict on spelling and punctuation. "Character AI" may fail where "Character.ai" succeeds. When in doubt, use the company_id (e.g., C_1829047235) which is guaranteed to resolve.
Determine what the digest should cover. There are two setups:
Returning user (has a watchlist): If the user has previously defined sectors or companies to track, use that list. Check conversation history for prior watchlists.
New user: Ask for:
| Parameter | Default | Notes |
|---|---|---|
| Sectors | (at least one) | e.g., "AI, Fintech, Biotech" |
| Specific companies | Optional | Supplement sector-level coverage |
| Time period | Last 7 days | "This week", "last 2 weeks", "this month" |
Calculate the exact start_date and end_date from the time period.
For each sector specified, build a company universe using a validated bootstrapping approach:
Seed companies from domain knowledge (see references/sector-seeds.md)
company_id values for known alias mismatches. Use these directly if the brand name fails.Pre-validate all seeds immediately (Rule 0):
get_info_from_identifiers(identifiers=[all_seeds_for_this_sector])
Triage the results into two buckets:
* ✅ **Resolved & Operating** (`status` = "Operating") → proceed to competitor expansion
* ❌ **Unresolved or Subsidiary** → retry with alias/legal name from seeds file; subsidiaries are noted for context but excluded from funding queries
3. Expand via competitors (using only the ✅ resolved seeds):
get_competitors_from_identifiers(identifiers=[resolved_seeds], competitor_source="all")
4. Validate expanded universe:
get_info_from_identifiers(identifiers=[new_competitors])
Apply the same triage. Filter by simple_industry matching the target sector. Drop any unresolved names or subsidiaries.
If the user provides specific companies, add those directly but still run them through the pre-validation triage. Never skip validation — even well-known brand names can fail silently.
Keep the universe manageable — aim for 15–40 resolved, operating companies per sector. For a multi-sector digest, this might total 50–100+ companies.
For all companies in the universe:
get_rounds_of_funding_from_identifiers(
identifiers=[batch],
role="company_raising_funds",
start_date="YYYY-MM-DD",
end_date="YYYY-MM-DD"
)
Process in batches of 15–20 if the universe is large.
After each batch, identify companies with empty results. For any company expected to have activity:
Collect all transaction_id values from successful results, then enrich with detailed round info:
get_rounds_of_funding_info_from_transaction_ids(
transaction_ids=[all_funding_ids]
)
Pass ALL transaction IDs in a single call (or small number of calls) rather than one per transaction — the tool handles batches efficiently.
Extract the following from each round (critical for the slide):
transaction_id — needed for the Capital IQ deal linkDates are required. The announcement and close dates must always appear in the final slide's deal table. If only one date is available, show it and mark the other as "—".
For any company involved in a significant deal (large round, notable valuation shift), get a brief description:
get_company_summary_from_identifiers(identifiers=[notable_companies])
This adds context to the narrative (e.g., "The company, an AI infrastructure startup founded in 2021, is expanding into...").
Before designing the slide, analyze the data to surface the story:
Flag as "Notable":
Identify Trends:
Select Key Takeaways (3–5): Distill the most important signals into 3–5 concise bullet-style takeaways. These are the centerpiece of the slide. Each takeaway should be one sentence, punchy, and data-backed.
Examples:
For each company featured in the key takeaways or notable deals, generate a logo using a two-tier local pipeline. Do not use Clearbit (logo.clearbit.com) — it is deprecated and consistently fails. External logo CDNs (Brandfetch, logo.dev, Google Favicons) require API keys or are blocked by network restrictions. Instead, use the following approach:
simple-icons npm Package (3,300+ Brand SVGs, No Network Required)The simple-icons package bundles high-quality SVG icons for thousands of well-known brands. It works entirely offline — no API keys, no network calls. Install it alongside sharp for SVG → PNG conversion:
npm install simple-icons sharp
Lookup strategy:
const si = require('simple-icons');
const sharp = require('sharp');
// Find an icon by exact title match (case-insensitive)
function findSimpleIcon(companyName) {
// Try exact match first
for (const [key, val] of Object.entries(si)) {
if (!key.startsWith('si') || !val || !val.title) continue;
if (val.title.toLowerCase() === companyName.toLowerCase()) return val;
}
// Try without common suffixes (AI, Inc., Corp.)
const stripped = companyName.replace(/\s*(AI|Inc\.?|Corp\.?|Ltd\.?)$/i, '').trim();
if (stripped !== companyName) {
for (const [key, val] of Object.entries(si)) {
if (!key.startsWith('si') || !val || !val.title) continue;
if (val.title.toLowerCase() === stripped.toLowerCase()) return val;
}
}
return null;
}
// Convert SVG to PNG with the brand's official color
async function simpleIconToPng(icon, outputPath) {
const coloredSvg = icon.svg.replace('<svg', `<svg fill="#${icon.hex}"`);
await sharp(Buffer.from(coloredSvg))
.resize(128, 128, { fit: 'contain', background: { r: 255, g: 255, b: 255, alpha: 0 } })
.png()
.toFile(outputPath);
}
Coverage: ~43% of typical deal flow companies (strong for major tech brands like Stripe, Anthropic, Databricks, Snowflake, Discord, Shopify, SpaceX, Mistral AI, Hugging Face; weaker for niche fintech, biotech, or early-stage companies).
sharp (100% Coverage)For companies not found in simple-icons, generate a clean initial-based logo as a PNG:
async function generateInitialLogo(companyName, outputPath) {
const initial = companyName.charAt(0).toUpperCase();
const svg = `
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg">
<circle cx="64" cy="64" r="64" fill="#BDBDBD"/>
<text x="64" y="64" font-family="Arial, Helvetica, sans-serif"
font-size="56" font-weight="bold" fill="#FFFFFF"
text-anchor="middle" dominant-baseline="central">${initial}</text>
</svg>`;
await sharp(Buffer.from(svg)).png().toFile(outputPath);
}
async function fetchLogo(companyName, outputDir) {
const fileName = companyName.toLowerCase().replace(/[\s.]+/g, '-') + '.png';
const outPath = path.join(outputDir, fileName);
// Tier 1: Try simple-icons
const icon = findSimpleIcon(companyName);
if (icon) {
await simpleIconToPng(icon, outPath);
return { path: outPath, source: 'simple-icons' };
}
// Tier 2: Generate initial-based fallback
await generateInitialLogo(companyName, outPath);
return { path: outPath, source: 'initial-fallback' };
}
Logo guidelines:
/home/claude/logos/[company-name].pngBDBDBD) fill with white text — consistent with the monochrome paletteRead /mnt/skills/public/pptx/SKILL.md and /mnt/skills/public/pptx/pptxgenjs.md before creating the slide.
Create a single-slide PowerPoint using pptxgenjs. The slide should be information-dense but visually clean — think "executive dashboard" not "wall of text."
┌─────────────────────────────────────────────────────────────┐
│ DEAL FLOW DIGEST │
│ [Period] · [Sectors] [Date] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ $X.XB │ │ N │ │ $X.XB │ │ $X.XB │ │
│ │ Raised │ │ Rounds │ │ Avg Pre │ │ Largest │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
│ │
│ KEY TAKEAWAYS │
│ ───────────────────────────────────────────────── │
│ [Logo] Takeaway 1 text goes here... │
│ [Logo] Takeaway 2 text goes here... │
│ [Logo] Takeaway 3 text goes here... │
│ [Logo] Takeaway 4 text goes here... │
│ │
│ TOP DEALS │
│ ┌──────────────────────────────────────────────────────────┐│
│ │Company│Type │Announced│Closed│Amount│Pre-$│Post-$│Lead│🔗││
│ │───────│─────│─────────│──────│──────│─────│──────│────│──││
│ │ ... │ ... │ ... │ ... │ ... │ ... │ ... │... │🔗││
│ └──────────────────────────────────────────────────────────┘│
│ │
│ [Footer: Deal Flow Digest · Sources: S&P Global Capital IQ]│
│ [Footer: AI Disclaimer] │
└─────────────────────────────────────────────────────────────┘
Color philosophy: Minimal, monochrome-first. The slide should feel like a high-end financial brief — black, white, and gray dominate. Color is used only where it carries meaning (e.g., a red indicator for a down round, a green indicator for a standout metric) or where the reader would naturally expect it (company logos). Never use color for purely decorative purposes like background fills, accent bars, or gradient effects.
Color palette — Monochrome Executive:
FFFFFF (white) — clean, open slide background1A1A1A (near-black) — strong contrast for the title region1A1A1A (near-black) — all body text, stat numbers, takeaways6B6B6B (medium gray) — labels, captions, footer, date stampsD0D0D0 (light gray) — subtle structural lines, card outlines, table bordersF5F5F5 (off-white / very light gray) — stat card fills, alternating table rows2B5797 (muted blue) — Capital IQ deal links in the table (the only blue on the slide)C0392B (muted red) — use only as a small dot, tag, or single-word highlight, never as a fill or backgroundTypography:
6B6B6B)6B6B6B) for secondary columns2B5797)Stat Cards (top row):
F5F5F5 fill and a thin D0D0D0 border — no shadow, no color fillsKey Takeaways (middle section):
Top Deals Table (bottom section):
Compact table showing the 4–6 most notable deals
Columns: Company, Type (Series X), Announced (date), Closed (date), Amount ($M), Pre-Money ($M), Post-Money ($M), Lead Investor, Deal Link
Announced and Closed columns show dates in MMM DD format (e.g., "Jan 15"). These columns are required and must always be present. If a date is not available, show "—".
The Deal Link column contains a clickable "View →" text linking to Capital IQ:
https://www.capitaliq.spglobal.com/web/client?#offering/capitalOfferingProfile?id=<transaction_id>
where <transaction_id> is the transaction_id from get_rounds_of_funding_from_identifiers.
1A1A1A) fill and white text; alternating rows in F5F5F5 and FFFFFFx so it is centered within the slide width: x = (slideWidth - tableWidth) / 2. For a 16:9 layout (13.33" wide), if the table is 12" wide, use x = 0.67. Never left-align the table to the slide edge.Deal Link Implementation (pptxgenjs): In pptxgenjs, hyperlinks are added to table cells using the options.hyperlink property on the cell object:
// Table cell with Capital IQ deal link
{
text: "View →",
options: {
hyperlink: {
url: `https://www.capitaliq.spglobal.com/web/client?#offering/capitalOfferingProfile?id=${transactionId}`
},
color: "2B5797",
fontSize: 9,
fontFace: "Arial"
}
}
Table Centering (pptxgenjs): Always center the deal table on the slide. Calculate the x position dynamically:
const SLIDE_W = 13.33; // 16:9 slide width
const TABLE_W = 12.5; // total table width (sum of all column widths)
const TABLE_X = (SLIDE_W - TABLE_W) / 2; // ≈ 0.42"
slide.addTable(tableRows, {
x: TABLE_X,
y: tableY,
w: TABLE_W,
colW: [1.8, 0.9, 0.9, 0.9, 1.0, 1.1, 1.2, 1.6, 0.7], // Company, Type, Announced, Closed, Amount, Pre-$, Post-$, Lead, Link
// ... other options
});
Adjust colW values as needed, but always recompute TABLE_X from (SLIDE_W - sum(colW)) / 2 to keep the table centered.
Footer:
General color rules (enforce strictly):
2B5797) — this is the only non-monochrome text color besides semantic red/green.const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Deal Flow Digest";
const slide = pres.addSlide();
const SLIDE_W = 13.33; // 16:9 slide width in inches
// 1. Dark header bar with title and period
// 2. Stat cards row (4 cards: Total Raised, # Rounds, Avg Pre-Money, Largest Round)
// 3. Key takeaways section with logos (include valuation context)
// 4. Top deals table with Announced, Closed, Pre-Money, Post-Money columns and Capital IQ deal links
// - Center the table: x = (SLIDE_W - tableWidth) / 2
// 5. Footer
pres.writeFile({ fileName: "/home/claude/deal-flow-digest.pptx" });
Use factory functions (not shared objects) for shadows and repeated styles per the pptxgenjs pitfalls guidance.
Follow the QA process from the PPTX skill:
Content QA: python -m markitdown deal-flow-digest.pptx — verify all text, numbers, company names, valuation figures, and deal links are correct
Visual QA: Convert to image and inspect:
python /mnt/skills/public/pptx/scripts/office/soffice.py --headless --convert-to pdf deal-flow-digest.pptx
pdftoppm -jpeg -r 200 deal-flow-digest.pdf slide
Check for overlapping elements, text overflow, alignment issues, low-contrast text, logo sizing problems, and that deal link text is visible. 3. Link QA: Verify that the Capital IQ URLs in the table are correctly formatted with the right transaction IDs. 4. Fix and re-verify — at least one fix-and-verify cycle before declaring done.
.pptx to /mnt/user-data/outputs/present_files to share the slideget_info_from_identifiers — if that fails, try the alias from references/sector-seeds.md or the company_id directly. Common brand→legal mismatches: Together AI → "Together Computer, Inc.", Character.ai → "Character Technologies, Inc.", Runway ML → "Runway AI, Inc.".references/sector-seeds.md file flags these — check it before including a company.get_funding_summary_from_identifiers errors or returns zeros: Fall back to get_rounds_of_funding_from_identifiers — the summary tool is less reliable. Never rely on the summary tool as the sole data source.simple-icons npm package provides ~43% coverage for typical deal flow companies. For the remainder, use the sharp-generated initial-based fallback. Keep a consistent icon style — don't mix random approaches. If simple-icons or sharp fail to install, fall back to pptxgenjs shape-based initials (gray ellipse + white text overlay) which require no external dependencies.Weekly Installs
47
Repository
GitHub Stars
5.6K
First Seen
13 days ago
Security Audits
Gen Agent Trust HubPassSocketFailSnykPass
Installed on
opencode46
gemini-cli46
github-copilot46
amp46
codex46
kimi-cli46
Python PDF处理教程:合并拆分、提取文本表格、创建PDF文件
66,200 周安装
2E7D32 (muted green) — same minimal usage: a dot, a small tag, or a single highlighted numberrolecompany_investing_in_round_of_fundingcompany_raising_fundstransaction_id