skills/suggesting-data-imports/SKILL.md
Use when the user asks about revenue, payments, subscriptions, billing, CRM deals, support tickets, ad spend, production database tables, or other data PostHog does not collect natively — or wants to join or correlate PostHog product events with that external business data. Also use when a query fails because a table does not exist or returns no results for expected external data. The data warehouse can import from SaaS tools (Stripe, Hubspot, Zendesk, etc.), ad platforms, production databases (Postgres, MySQL, BigQuery, Snowflake), and other arbitrary data sources. Covers checking existing sources, identifying the right source type, and guiding the setup.
npx skillsauth add posthog/ai-plugin suggesting-data-importsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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.
Listen for signals that the user needs external data:
If a query failed, check the error — if it's "table not found" or similar, the data likely needs to be imported.
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.
If the data isn't imported yet, call posthog:external-data-sources-wizard to see available source types. Match the user's need to a source:
Common patterns:
| User wants | Source type | Key tables | | -------------------------- | ---------------------------------------------- | ------------------------------------------- | | Revenue / payment data | Stripe, Chargebee, Shopify | charges, subscriptions, invoices, customers | | CRM / sales pipeline | Hubspot, Salesforce, Attio | contacts, deals, companies | | Support tickets | Zendesk | tickets, users, organizations | | Product data from their DB | Postgres, MySQL, BigQuery, Snowflake, Redshift | user's own tables | | Marketing / ads | Google Ads, Meta Ads, LinkedIn Ads, TikTok Ads | campaigns, ad_groups, ads | | Email marketing | Mailchimp, Klaviyo | campaigns, lists, subscribers | | Project management | Linear | issues, projects | | Error tracking (external) | Sentry | issues, events |
Present the recommendation concisely:
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."
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.
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:
SELECT * FROM stripe_customers sc JOIN persons p ON sc.email = p.properties.$emailsystem.information_schema.tables (via posthog:execute-sql) and posthog:external-data-schemas-list before saying data doesn't exist.stripe_charges not charges). The user might not know the prefix.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.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 connectionsposthog:external-data-schemas-list: Check what tables are already importedposthog:execute-sql over system.information_schema.*: See all queryable tables including viewsposthog:external-data-sources-wizard: Get available source typesposthog:data-warehouse-source-connect-link: Get a secure browser/OAuth link to collect credentialsposthog:data-warehouse-source-setup: One-step create (validate, discover tables, apply sync defaults, create)posthog:execute-sql: Run queries to demonstrate what's possiblesetting-up-a-data-warehouse-source: Full source creation workflow — hand off here once the user decides to connect a sourcedata-ai
Signals scout for PostHog Tasks, the agent work items a project runs. Two lenses: delivery health (runs failing, clustered by repository and error class, and retry storms) every run, and on a slower rotation demand (recurring asks across human-authored tasks that point at a product gap). Skips the scout fleet's own run rows.
devops
Signals scout for the PostHog Conversations (support inbox) product. Watches the `$conversation_*` ticket-lifecycle events for support-delivery regressions — SLA breach-rate steps, first-response latency blowouts, backlog inflow-vs-resolution imbalance, and channel / assignment concentration — and files each dated regression as a report. Complements the per-ticket product-feedback signals the emission pipeline already fires; does not re-surface individual ticket content.
development
Populates and maintains a project's data catalog (semantic layer): canonical metrics, trust marks (certifications) on warehouse tables/views, and reviewed table relationships. Use when asked to set up / seed / bootstrap the data catalog or semantic layer, to catalog a project's metrics, to certify or deprecate data sources, to propose or review table joins, or to work through the proposal review queue. To *use* an existing catalog to answer a business-number question, see querying-posthog-data instead. Trigger terms: data catalog, semantic layer, canonical metric, certify table, deprecate source, relationship proposal, metric drift, review queue.
tools
Investigate logs in a PostHog project: verify a service or deployment is healthy, explain an error spike, triage an incident, or understand what a log stream is saying. Use when the user asks to "check the logs", asks whether a service, deploy, release, or change is working or broke anything, asks why errors are up or what changed, or wants the root cause of failures visible in logs. Routes the logs MCP tools (services overview, pattern mining, before/after pattern diffing, bucketed counts, facets, raw rows) so investigations start from summaries instead of raw rows or hand-written SQL over the logs table.