adding-warehouse-perso…
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
Author, save, and edit email templates in the PostHog workflows library — compose email design JSON with Liquid personalization and create and round-trip-edit templates over MCP. Use when asked to design, build, update, or fix an email template for workflows, broadcasts, or
$ npx -y skills add PostHog/ai-plugin --skill designing-email-templates --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/designing-email-templatesContext preview
The summary Claude sees to decide when to auto-load this skill.
Author, save, and edit email templates in the PostHog workflows library — compose email design JSON with Liquid personalization and create and round-trip-edit templates over MCP. Use when asked to design, build, update, or fix an email template for workflows, broadcasts, or
name: designing-email-templates description: 'Author, save, and edit email templates in the PostHog workflows library — compose email design JSON with Liquid personalization and create and round-trip-edit templates over MCP. Use when asked to design, build, update, or fix an email template for workflows, broadcasts, or campaigns.'
Use this skill when creating or editing email templates for PostHog workflows — broadcast campaigns and `function_email` workflow actions send the rendered template.
You author the **design JSON** (`content.email.design`) and save it with `workflows-create-email-template`. The server renders the sent email from your design with the same renderer PostHog's visual editor uses, so the template opens as editable blocks for humans and sends exactly what the design describes. Schema and a working example in [references/unlayer-design-json.md](references/unlayer-design-json.md).
When talking to the user, call it the template's **design** — the design document format is an internal implementation detail. Always share the template's `_posthogUrl` edit link in your reply after creating or updating, so the user can open it in PostHog directly.
Read [references/design-guidelines.md](references/design-guidelines.md) before composing — it covers committing to a design direction, typography, color, and the patterns that make an email look designed rather than generated. For one fragment the block editor can't express, use an `html`-type content block inside the design.
Email content uses Liquid templating. Liquid tags pass through the renderer as plain text, so use them anywhere — block text, subject, links:
Hi {{ person.properties.first_name | default: 'there' }},Marketing emails must include an unsubscribe link — render it with the built-in variables:
<a href="{{ unsubscribe_url }}">Unsubscribe</a>(`{{ unsubscribe_url_one_click }}` is also available for one-click list-unsubscribe flows.)
Every link is automatically rewritten through a click-tracking redirect. This breaks mobile universal links / app deeplinks, which only resolve when the href stays on their own domain. To keep a link untracked, mark its anchor (use an `html` block) with `clicktracking="off"` or `data-ph-no-track`:
<a href="https://app.example.com/deeplink" data-ph-no-track>Open in app</a>
The marker must be on the `<a>` tag itself, not a child element. Opted-out links get no click metrics.
Call `media-images-list` with `purpose="email"` first — reuse an existing image (a logo, a header banner) instead of uploading a duplicate.
To add a new image, upload it with the presigned flow rather than embedding bytes in the design:
1. `media-image-upload-start` with the file's name and `purpose="email"` — returns `id`, `upload_url`, and `form_fields`. 2. From a shell, POST the local file to `upload_url`: `curl -X POST <upload_url> -F key=value... -F file=@/path/to/image.png` (the `form_fields` from the response, `file` last). Never base64-encode image bytes into a tool call — a flipped token corrupts the image. 3. `media-image-upload-complete` with the `id` — returns the permanent `url`.
Put that `url` in the image block's `values.src.url` (see [references/unlayer-design-json.md](references/unlayer-design-json.md)). The block also takes `values.src.width`/`height`; the media tools don't return dimensions, so if you have shell access to the local file, measure it yourself rather than guessing.
Images must be under 4MB and decode as PNG, JPEG, GIF, WebP, AVIF or BMP.
Call `workflows-create-email-template` with:
{
"name": "Welcome email",
"description": "Sent to new signups on day 0",
"type": "email",
"content": {
"templating": "liquid",
"email": {
"subject": "Welcome to {{ person.properties.company | default: 'our product' }}",
"design": { "counters": { "u_row": 1 }, "schemaVersion": 16, "body": { "rows": ["…"] } },
"text": "Plain-text fallback of the same message"
}
}
}Pass the design directly in the tool call — no scratch files, no pre-validation subprocesses, no payload preview rounds. Liquid tags (`{{ }}`, `{% %}`), apostrophes, single quotes, and emoji are ordinary characters inside JSON strings; only standard JSON escaping applies. Never rewrite content to avoid them — converting Liquid's single quotes to double quotes inside markup attributes breaks the markup. If the tool call is rejected as malformed, fix the JSON escaping and resend the same content unchanged.
`content` is replaced as a whole on update, never merged — and humans may have edited the design in PostHog's visual editor since you last saw it:
1. `workflows-get-email-template` — always fetch fresh; the returned `design` is the current source of truth. 2. Modify the `design` (keep subject/text alongside it). 3. `workflows-update-email-template` — send the complete `content` back. The server re-renders the sent email from the edited design. 4. `workflows-show-email-template` — render the updated template so the user sees the change; its response carrie
Official PostHog plugin for AI clients. Access PostHog products directly from your AI coding tool.
Repo: PostHog/ai-plugin
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user…
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with…
Split a completed PostHog task run into activity records — what the agent tried, whether it worked, what blocked it — and record each one through the…
Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click / rageclick / scroll-depth data for a URL, names the hot elements by…
Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can…