documenting-warehouse-sources

Write and standardize PostHog data warehouse source documentation using canonical MDX templates.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill documenting-warehouse-sources
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: documenting-warehouse-sources
Source: https://github.com/PostHog/posthog-foss/tree/main/.agents/skills/documenting-warehouse-sources
Command: npx skills add https://github.com/PostHog/posthog-foss --skill documenting-warehouse-sources

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostHog data warehouse source docs on posthog.com often become inconsistent, incomplete, or broken (404s, missing rendered fields) because each doc is written ad hoc. This Skill enforces one canonical structure so every source doc renders correctly and stays in sync with the source code.

Core Features & Use Cases

  • Canonical doc template: Provides the required frontmatter (including the sourceId that must match the ExternalDataSourceType enum) and the standard section order from intro through Troubleshooting.
  • Auto-rendered components: Explains how <SourceParameters /> and <SourceTables /> pull connection fields and table lists from the public_source_configs API, so authors never hand-write them.
  • Slug and docsUrl consistency: Defines the kebab-case slug rule linking filename, docsUrl, and listing links, plus the audit_source_docs management command that catches broken docs.
  • Use Case: When adding a new Stripe-like connector, use this Skill to create contents/docs/cdp/sources/<slug>.md with the correct snippets, frontmatter, and sections, then run the audit to verify nothing 404s.

Quick Start

Write a new documentation page for the Postgres data warehouse source following the canonical template and verify it with the audit_source_docs command.

Frequently Asked Questions about documenting-warehouse-sources

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write documentation for a new PostHog data warehouse source?

Create contents/docs/cdp/sources/<slug>.md in the posthog.com repo using the canonical template: frontmatter with a sourceId matching the ExternalDataSourceType value, then intro, Prerequisites, Adding a data source, Sync modes, Configuration, Supported tables, and Troubleshooting sections using shared MDX snippets.

What is the sourceId field in PostHog source doc frontmatter?

sourceId links the doc to its API config so the site can render connection fields and table lists. It must exactly equal a real ExternalDataSourceType enum value in PascalCase, such as ActiveCampaign or Stripe, or the doc renders with no data.

Why is my source doc showing an empty Supported tables section?

The SourceTables component only renders data when the source class sets lists_tables_without_credentials = True and get_schemas iterates a static endpoint catalog. Fix the source code in settings.py and canonical_descriptions.py rather than editing the doc.

How do I prevent 404s when adding or renaming a source doc?

Keep the doc filename, the source's docsUrl, and the kebab-case slug in agreement, then run python manage.py audit_source_docs --docs-dir ../posthog.com/contents/docs/cdp/sources. Renaming a published doc also requires a 301 redirect in posthog.com/vercel.json.

Can I use MDX components in a .md source doc file?

Yes, .md source docs support MDX imports, so you can import shared snippets like source-setup-intro.mdx without renaming to .mdx. Global components such as SourceParameters, SourceTables, and CalloutBox need no import at all.