Runs a small interactive data app written in Python inside PostHog, where your team can open it — from first upload through new versions to switching it off. Anyone who opens the app sees data with your level of access, so publishing one means sharing that data.
WHEN TO USE
SCOPE
USE FOR
Launch a new Streamlit app in PostHog and get a link teammates can open once they are logged in.
Ship a new version of an app's code and restart it, so it stops serving the old version.
Roll an app back by uploading a saved copy of an earlier version, since there is no undo button.
Give an app more memory or processing power when it keeps large tables of data open.
Work out why an app failed to start, or why PostHog says the feature is not available yet.
NOT FOR
Writing the app's code, or fixing a query inside it that fails — that is the writing-streamlit-apps skill.
Fixing failing queries by making the app bigger; the query limits do not change with app size.
This is a saved copy of the skill's SKILL.md instructions. It may differ from the upstream file or the version you install.
Managing Streamlit apps
A Streamlit app is a Python data app running in an isolated sandbox inside PostHog.
Each app has immutable versions of its code; one version is active; a sandbox process serves the active version.
The full lifecycle is driven with the streamlit-apps-* MCP tools.
The happy path: create → set source → start → share
streamlit-apps-create with a name (optionally description, cpu_cores 0.25–8, memory_gb 0.5–16, defaults 0.5 / 1).
The app exists but has no code yet.
streamlit-apps-set-source with the complete app.py source as one string.
Extra files ride along in the same call: files maps a project-relative path to text (helper modules, CSV, JSON), assets maps a path to base64 (Parquet, images).
This creates version 1 and activates it.
Write the source per the writing-streamlit-apps skill — in particular use posthog_apps.query() for PostHog data, never import posthog.
streamlit-apps-start.
Returns immediately; the sandbox boots asynchronously.
Poll streamlit-apps-status until status is running (typically well under a minute).
If it lands on error, read last_error — see Troubleshooting below.
Share the app: the _posthogUrl returned by create/get/start (/streamlit-apps/{short_id}) is the app's page in PostHog.
That link is what you give humans.
Viewers need to be logged into PostHog with access to the project (the app renders in an authenticated iframe; there is no public URL).
Whose data the app reads
The app's queries run with the data access of the person who authored the active version — set the source, and the app reads what you can read.
Anyone who can view the app sees those results, so treat publishing an app as sharing that data with everyone on the project.
An app whose version author has since been deleted can't start; upload a new version to fix it.
Updating code
Call streamlit-apps-set-source again: it creates the next version and activates it.
Every call ships the complete app, so pass files and assets again too; a version holds only what that call carried.
A running sandbox is stopped so it can't keep serving stale code — call streamlit-apps-start afterwards to serve the new version.
Versions are immutable, but not permanent: streamlit-apps-versions lists the newest 50, and non-active versions older than 30 days are deleted along with their code.
There is no rollback tool: to roll back, set the old source, files, and assets again, so a rollback needs a saved copy of the complete bundle.
Fetch that copy from your conversation or wherever it's kept — versions store the zip, not an inline source view.
Stopping, idling, and deleting
streamlit-apps-stop stops the sandbox; code and versions are untouched. Starting again later is cheap.
Idle sandboxes are stopped automatically after a period of no activity — a stopped app is normal, not an error. Start it again when needed.
streamlit-apps-delete stops any sandbox and soft-deletes the app. Confirm with the user before deleting anything you didn't create in this conversation.
Troubleshooting
status: error with last_error: "Start failed: ..." — the sandbox failed to provision or boot. Retry streamlit-apps-start once; if it persists, surface last_error to the user (provisioning failures are usually platform-side, not app-side).
Tool calls return 403 "Streamlit apps is not available." — the streamlit-apps feature flag is off for this organization. This is a rollout gate, not an error you can fix; tell the user.
App runs but a query inside it fails — that's an app-code concern; see writing-streamlit-apps (bridge limits: 30s execution, 256 MB memory per query).
App shows old code after set-source — you skipped step "start after set-source"; the sandbox was stopped and needs a start.
Renaming and resizing
streamlit-apps-update changes an app's name, description, cpu_cores (0.25–8), or memory_gb (0.5–16); only the fields you pass change.
New sizing applies the next time the sandbox starts, so stop + start after resizing a running app.
Defaults (0.5 CPU / 1 GB) fit typical dashboard apps.
Raise memory_gb only when the app itself holds large DataFrames in memory — the 256 MB HogQL bridge query cap is server-side and does NOT change with sandbox sizing, so bigger sandboxes don't fix failing queries.
MCP connection required
2 FOR YOU
All items below are required.
01
Connect the PostHog MCP server
Connect the PostHog MCP server so the assistant can call the streamlit-apps-* tools (create, set-source, start, status, stop, update, delete) that drive the whole app lifecycle.
02
Have Streamlit apps enabled for your PostHog organization
The streamlit-apps feature flag must be on for the organization; while it is off every tool returns 403 "Streamlit apps is not available." This is a PostHog rollout gate, not something the assistant can fix.
🔌 This skill ships inside the PostHog AI Plugin. Listed package contents include 3 slash commands, 1 agent, hooks and an MCP server. Installed components and skill versions may vary by AI tool.
Install just this skill
Run this outside your AI tool, using Node.js 22.20.0 or newer. Skills CLI 1.7.2 skips skill selection; prompts cancel installation without an interactive terminal. If choosing Project when asked about installation scope, open your project's folder before running this.
Install checklist
Check selected tools if a picker appears; Claude Code may be unchecked under Additional agents. ↑/↓ moves, Space toggles selections, Enter confirms.
Without a tool picker, check Installing to: for your intended tool. Stop if it names a different tool.
If asked, choose Symlink (Recommended) for shared files or Copy to all agents for separate copies; review the summary before confirming installation.
Install the find-skills skill? defaults to Yes, adding another skill for all projects. Choose No if you don't want that extra installation.
Skills CLI 1.7.2 sends install data to skills.sh by default, including the source, skill names, target tools and file details; GitHub sources are reported only when GitHub confirms the repository is public, while other remote sources can also be reported. Confirmed-public GitHub sources also trigger a security-audit request. Before installing, set the environment variable DO_NOT_TRACK=1 or DISABLE_TELEMETRY=1 to disable both.
After installing for Claude Code, open it in the installation project if you chose Project; Global makes the skill available across projects on this computer. Once Claude Code loads the skill, its description helps Claude decide when to use it.
If installation created a top-level skills folder that did not exist when your Claude Code session started, run /reload-skills in that session. Run it again after later changes in that folder.
MCP server required
The skill's steps call for tools from the PostHog MCP server. Installing just this skill doesn't add that connection; set it up in your AI tool if it isn't there yet: PostHog MCP setup. Installing the whole plugin instead includes the connection settings.
Requirements for the PostHog MCP server
Connecting is free; sign in with your PostHog account.
Some tools use AI internally and may incur PostHog AI charges. Those tools require AI data processing to be enabled in your organization settings.
Install the whole plugin
This route installs the posthog plugin package selected for your AI tool.
Claude Code
Add PostHog's marketplace, then install the plugin
Run both lines in a terminal. They install PostHog's posthog plugin: this skill, PostHog's other skills, and a connection to PostHog's hosted MCP server.
01
claude plugin marketplace add PostHog/ai-plugin
02
claude plugin install posthog@posthog
Installation and loading
The plugin installs for you in every project and loads the next time you start Claude Code, or after /reload-plugins in an open session.
To connect your PostHog account, start claude, type /mcp, select plugin:posthog:posthog and follow the browser prompts.
Good to know
The plugin includes PostHog's session-capture hook; PostHog's README says it sends sessions to LLM Analytics only when POSTHOG_LLMA_CC_ENABLED=true and POSTHOG_API_KEY are both set.
If you use the separate posthog-telemetry plugin, PostHog says to keep only one of the two, because both register the same hook.
On a self-hosted PostHog, this route's MCP connection won't reach your instance: the plugin's config is fixed to https://mcp.posthog.com/mcp, which routes to PostHog's US or EU region. POSTHOG_MCP_URL works only for the Gemini CLI extension.
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties already work: feature flag targeting, cohorts, insight filters and breakdowns, surveys, session replay filters, workflows, and the person profile. Use when the user wants to "add a person property from my warehouse", "enrich people with Stripe/Postgres/Salesforce data", "put ARR or plan tier on my persons", "target a feature flag by a warehouse column", "sync warehouse columns onto groups or organizations", or wants to inspect, backfill, disable, or debug an existing warehouse-backed person or group property.Read full description
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 LLM cost, user-level cost drivers, or patterns behind high AI observability spend.Read full description
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with different experiment variants, identify usability issues, compare behavior patterns between control and test groups, or get qualitative insights to complement quantitative experiment results. Also covers pairing the observed behavior with a linked survey when the user wants qualitative feedback beyond what recordings show.Read full description
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 cross-referencing autocapture events on the same page, and can create a saved heatmap the user opens in PostHog, then summarizes the behavior and proposes improvements.
TRIGGER when: user asks what a heatmap shows, why people aren't clicking something, where users rage-click, how far they scroll, what to change on a page based on heatmap/click data, or to 'analyze/assess/review the heatmap' for a URL.
DO NOT TRIGGER when: the user only wants to create a saved heatmap screenshot with no analysis (use heatmaps-saved-create directly), or is asking about session replay in general (use investigating-replay).Read full description
Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can I clean up?", "are any of my endpoints broken?", "which materialised versions are still being called?", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.Read full description
Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check, or review experiments or feature flags, check flag hygiene, or verify experiment setup.Read full description