Fsi spg funding digest

From d-wwei/openclaw-financial-services · View interactive version

Fsi spg funding digest is an AI agent skill from the GitHub repository d-wwei/openclaw-financial-services. Generate a polished one-page PowerPoint slide summarizing key takeaways from recent funding rounds and notable capital markets activity across a user's watched sectors or companies. Use this skill when the user asks for a deal flow summary, weekly recap, funding digest, transaction roundup, or capit

How to use this skill

Skill file

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"


Weekly Deal Flow Digest

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.

When to Use

Trigger on any of these patterns:

Nested Skills

This skill produces a one-slide PPTX briefing:

Entity Resolution & Tool Robustness

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.

Rule 0: Pre-validate ALL identifiers before querying funding

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:

  1. Did it resolve at all? If the identifier returns empty/error, the name doesn't exist in S&P Global. Try the alias from references/sector-seeds.md, the legal entity name, or the company_id directly.
  2. What is the status field?

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.

Rule 1: Never trust empty results without a fallback

If get_rounds_of_funding_from_identifiers returns empty for a company you expect to have data:

  1. Try the legal entity name or company_id. Brand names usually work, but some don't. See the alias table in 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.").
  2. Verify the company exists in S&P. If you skipped Rule 0, call get_info_from_identifiers(identifiers=["Company"]) now — if this also returns empty, the company may be too early-stage or not yet indexed.

Rule 2: Subsidiaries have no funding rounds

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.

Rule 3: Use `get_rounds_of_funding_from_identifiers` as the primary tool, not `get_funding_summary_from_identifiers`

The 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.

Rule 4: Batch carefully and validate

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.

Rule 5: The `role` parameter is critical

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.

Rule 6: Identifier resolution is case-insensitive but spelling-sensitive

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.

Workflow

Step 1: Establish Coverage & Period

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.

Step 2: Build the Company Universe

For each sector specified, build a company universe using a validated bootstrapping approach:

  1. Seed companies from domain knowledge (see references/sector-seeds.md)
  1. Pre-validate all seeds immediately (Rule 0):

```

get_info_from_identifiers(identifiers=[all_seeds_for_this_sector])

```

Triage the results into two buckets:

  1. Expand via competitors (using only the ✅ resolved seeds):

```

get_competitors_from_identifiers(identifiers=[resolved_seeds], competitor_source="all")

```

  1. 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.

Step 3: Pull Funding Rounds

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:

  1. Retry with the legal entity name or alternate identifier (see Entity Resolution rules above).
  2. Log the company as "no data" only after exhausting fallbacks.

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):

Dates 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 "—".

Step 4: Pull Company Context for Notable Deals

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...").

Step 5: Identify Highlights & Trends

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:

Step 6: Generate Company Logos

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:

Tier 1: `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).

Tier 2: Initial-Based Fallback via `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);
}
Complete Pipeline
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:

Step 7: Generate the One-Page PPTX

Read /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."

Slide Layout
┌─────────────────────────────────────────────────────────────┐
│  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]                                    │
└─────────────────────────────────────────────────────────────┘
Design Specifications

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:

Typography:

Stat Cards (top row):

Key Takeaways (middle section):

Top Deals Table (bottom section):

```

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.

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):

Code Structure
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.

Step 8: QA the Slide

Follow the QA process from the PPTX skill:

  1. Content QA: python -m markitdown deal-flow-digest.pptx — verify all text, numbers, company names, valuation figures, and deal links are correct
  2. Visual QA: Convert to image and inspect:

```bash

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.

  1. Link QA: Verify that the Capital IQ URLs in the table are correctly formatted with the right transaction IDs.
  2. Fix and re-verify — at least one fix-and-verify cycle before declaring done.

Step 9: Present Results

  1. Copy the final .pptx to /mnt/user-data/outputs/
  2. Use present_files to share the slide
  3. Provide a 2–3 sentence verbal summary:

Error Handling

Entity Resolution Failures

Data Quality Issues

Example Prompts

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.