Generated banner for Suggesting Data Imports
Generated logo for Suggesting Data Imports

Suggesting Data Imports

PostHogOfficialPublished by PostHog

  • Skill
  • Tool integration
  • Data and AI
  • MIT
  • No issues found

From the author

Use when the user asks about revenue, payments, subscriptions, billing, CRM deals, support tickets, ad spend, production database tables, bucket files, or local file uploads. Also use when the user wants to join PostHog events with external data, or when a query fails because an expected table is missing. The data warehouse can import from SaaS tools, ad platforms, databases, object storage, and uploaded files. Covers checking existing sources, identifying the right source type, and guiding setup.
— the description by PostHog

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill helps users bridge the gap between native PostHog product analytics and external business data. It provides a structured approach to identifying when data resides outside of PostHog, checking existing connections, recommending the appropriate source type for integration, and facilitating the setup process to enable cross-platform analysis.

What it does

  • Detects when user queries require data from external SaaS tools, databases, or files.
  • Checks existing data sources and schemas to prevent redundant imports.
  • Maps specific business needs like revenue or CRM data to the correct data warehouse source type.
  • Guides users through secure credential collection for new data sources.
  • Demonstrates how to join imported external data with native PostHog events for deeper insights.

When to use it

  • When a user asks how to import data from external systems like Stripe, HubSpot, or Zendesk.
  • When a query fails due to a missing table or unknown data source.
  • When a user wants to correlate product usage with business metrics like revenue or support tickets.
  • When a user needs to analyze local files or data stored in cloud buckets.

Advantages

  • Prevents errors by verifying existing data sources before suggesting new ones.
  • Ensures secure handling of credentials via browser-based links.
  • Provides clear mapping between business requirements and technical source types.
  • Enables advanced analytics by combining behavioral events with external business context.

Usage examples

“How can I see my Stripe revenue alongside my user signups?”
The agent identifies that Stripe data is missing, suggests connecting a Stripe source, explains the resulting tables, and offers to provide a secure link to set up the connection.
“My query for CRM deals is failing.”
The agent checks existing sources and schemas to see if the CRM data is already imported but perhaps under a different table prefix, then guides the user to the correct table or suggests a new import.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/posthog/suggesting-data-imports/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip suggesting-data-imports.zip -d .agents/skills

Documentation by PostHog

Suggesting data imports

This skill helps identify when data the user needs lives outside PostHog and guides them toward importing it via the data warehouse. The key insight is recognizing the gap — then connecting it to the right source type.

What PostHog collects natively

PostHog collects product analytics events, persons, sessions, and groups via its SDKs. Additional products are available but must be enabled: session replay, feature flags, experiments, surveys, web analytics, error tracking, AI observability, conversations, logs, revenue analytics, workflows, CDP destinations, and batch exports. PostHog does not collect external business data like payments, subscriptions, CRM records, support tickets from other systems, or production database tables — that data must be imported via the data warehouse.

When to use this skill

  • A HogQL query fails because a table doesn't exist

  • The user asks about data from an external system (Stripe, Hubspot, Salesforce, etc.)

  • The user wants to correlate PostHog analytics with business data (revenue, support tickets, CRM records, etc)

  • The user asks "how do I get my X data into PostHog?"

  • Analysis requires joining PostHog events with external data

  • The user asks about exporting PostHog data for comparison elsewhere (in a google sheet, external warehouse, etc)

  • The user wants to import files from a bucket or upload a local file

Workflow

1. Understand what data is missing

Listen for signals that the user needs external data:

  • They mention a specific tool or system (Stripe, Hubspot, Zendesk, their production database, etc.)

  • They mention bucket files or a local CSV, JSON, or Parquet file

  • A query references a table that doesn't exist in PostHog

  • They want to analyze something PostHog doesn't track natively (revenue, support tickets, CRM deals, etc.)

If a query failed, check the error — if it's "table not found" or similar, the data likely needs to be imported.

2. Check what's already connected

Call posthog:external-data-sources-list to see existing sources. The data might already be imported but the user doesn't know the table name or prefix.

If a source exists for the system they're asking about, call posthog:external-data-schemas-list to show the available tables. The data might be there but under a different name or prefix.

Also query system.information_schema.tables with posthog:execute-sql to see all queryable tables — the data might already be available as a view or joined table.

3. Identify the right source type

If the data isn't imported yet, call posthog:external-data-sources-wizard to see available source types — when enumerating without source_type, pass fields: ['*.name', '*.caption'] to skip the large per-source config field definitions. Match the user's need to a source:

Common patterns:

User wantsSource typeKey tables
Revenue / payment dataStripe, Chargebee, Shopifycharges, subscriptions, invoices, customers
CRM / sales pipelineHubspot, Salesforce, Attiocontacts, deals, companies
Support ticketsZendesktickets, users, organizations
Product data from their DBPostgres, MySQL, BigQuery, Snowflake, Redshiftuser's own tables
Marketing / adsGoogle Ads, Meta Ads, LinkedIn Ads, TikTok Adscampaigns, ad_groups, ads
Email marketingMailchimp, Klaviyocampaigns, lists, subscribers
Project managementLinearissues, projects
Error tracking (external)Sentryissues, events

For bucket files, use AmazonS3, GoogleCloudStorage, AzureBlob, or CloudflareR2. For local files, use the PostHog app upload flow. It creates a FileUpload source.

4. Suggest the import

Present the recommendation concisely:

  • What source type to connect

  • What tables would become available

  • How this enables the analysis they want

Example: "Your Stripe data isn't in PostHog yet. If you connect a Stripe source, you'll get tables like charges, subscriptions, and customers that you can join with PostHog events to analyze revenue by user behavior."

5. Offer to set up the source

If the user wants to proceed, the fastest path is the one-step data-warehouse-source-setup tool (validate creds → discover tables → sync defaults → create, in one call), with data-warehouse-source-connect-link to collect credentials securely in the browser rather than in chat. For anything beyond the happy path (hand-picking tables, non-default sync types, webhooks, CDC), hand off to the setting-up-a-data-warehouse-source skill, which covers the full flow, sync-type selection, webhook registration, and prefix guidance. Do not duplicate that workflow here.

For a local file, direct the user to upload it in the PostHog app. The upload creates a FileUpload source. No MCP tool uploads files.

6. Show what's possible after import

Once connected, help the user write their first query joining PostHog data with the imported data. Use posthog:execute-sql to demonstrate.

Common join patterns:

  • Join Stripe customers with PostHog persons on email: SELECT * FROM stripe_customers sc JOIN persons p ON sc.email = p.properties.$email

  • Join CRM deals with events: correlate product usage with sales outcomes

  • Join support tickets with session recordings: find recordings for users who filed tickets

Important notes

  • Don't guess table names. Always check system.information_schema.tables (via posthog:execute-sql) and posthog:external-data-schemas-list before saying data doesn't exist.

  • Check prefixes. Imported tables are often prefixed (e.g. stripe_charges not charges). The user might not know the prefix.

  • Collect credentials securely. Use data-warehouse-source-connect-link to hand the user a browser link — it opens a minimal connect page rendering the source's full connection form (OAuth or credentials, whichever the source offers) that stashes the details temporarily without creating the source. Afterwards pass {"credential_id": <id>} (discovered via data-warehouse-stored-credentials-list) to data-warehouse-source-setup — stored credentials are single-use and expire after 24 hours. Don't collect passwords or OAuth tokens in chat.

  • Not all systems are supported. If the user's system isn't in the wizard list, suggest using Postgres/MySQL as a bridge if they can export to a database, or mention that custom sources can be requested.

  • Connecting a source also documents it. After the first sync, PostHog automatically generates semantic descriptions for the imported tables and columns (from the source database's own column comments where present, plus an LLM pass using the table relationships and the team's business context). Those descriptions surface in system.information_schema.columns (query it with posthog:execute-sql), so once a source is connected the agent can reason about what each column means and how tables join — not just their names and types. Mention this when recommending an import: connecting the source is what makes the data answerable.

  • posthog:external-data-sources-list: Check existing source connections

  • posthog:external-data-schemas-list: Check what tables are already imported

  • posthog:execute-sql over system.information_schema.*: See all queryable tables including views

  • posthog:external-data-sources-wizard: Get available source types (pass fields: ['*.name', '*.caption'] when enumerating)

  • posthog:data-warehouse-source-connect-link: Get a secure browser/OAuth link to collect credentials

  • posthog:data-warehouse-source-setup: One-step create (validate, discover tables, apply sync defaults, create)

  • posthog:execute-sql: Run queries to demonstrate what's possible

  • setting-up-a-data-warehouse-source: Full source creation workflow — hand off here once the user decides to connect a source

Files

ATTRIBUTION.md

Attribution

This folder is an unmodified copy of the Agent Skill "suggesting-data-imports", distributed by AutoGineer (https://autogineer.com/agent-skills).

The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.

Files added by AutoGineer

  • ATTRIBUTION.md: this file, written by AutoGineer

  • LICENSE: copied from LICENSE

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
PostHog
Publisher
PostHog (Official)
Source
PostHog/skills · skills/omnibus/suggesting-data-imports · commit a5d30e7
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by PostHog.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download suggesting-data-imports.zip