
Managing Streamlit Apps
FreeEasily create and deploy Streamlit apps in PostHog.
Free · Opens the source repo
What Managing Streamlit Apps does
Managing Streamlit Apps is a skill designed for developers and data professionals who want to create, deploy, and manage Streamlit applications directly within the PostHog environment. This skill utilizes the streamlit-apps-* MCP tools to streamline the entire lifecycle of a Streamlit app, from creation to sharing. Users can start by creating an app with a specified name, optional description, CPU cores, and memory allocation. Once created, the source code can be set, and the app can be started in a sandbox environment, allowing for rapid development and testing.
The skill provides essential commands to monitor the app's status and share it with users via a PostHog URL. This makes it particularly useful for teams looking to collaborate on data-driven applications, as the app's data access is determined by the author of the active version. Users can also update their apps by setting new source code, which creates new immutable versions while ensuring that the sandbox is stopped before serving the updated code.
Additionally, the skill includes functionalities for stopping, deleting, and managing app resources. Users can stop an app to save resources when not in use, and the skill handles automatic idle timeouts. Troubleshooting support is also integrated, allowing users to quickly identify and resolve common issues related to app deployment and execution. This skill is ideal for developers looking to integrate data applications into their workflows without needing to manage complex infrastructure.
Overall, Managing Streamlit Apps simplifies the process of building and sharing interactive data applications, making it a valuable tool for data scientists, analysts, and developers working within the PostHog ecosystem.
When to use it
Use this skill when you need to create, deploy, or manage Streamlit apps within PostHog, especially for data visualization and dashboarding tasks.
When not to use it
This skill may not be suitable for users needing public-facing applications, as the apps are rendered in an authenticated iframe and require PostHog access.
What you can build with it
Creating a New Streamlit App
Use the skill to quickly create a new Streamlit app by specifying its name and resources, setting you up for immediate development.
Updating App Code
When you need to make changes to your Streamlit app, simply update the source code and deploy the new version with minimal downtime.
Sharing Apps with Team Members
Once your app is running, share the PostHog URL with team members for collaborative data exploration and visualization.
How to install Managing Streamlit Apps
View source1. Install with the skills CLI
npx skills add posthog/posthog/managing-streamlit-apps --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by posthogManaging 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-createwith aname(optionallydescription,cpu_cores0.25–8,memory_gb0.5–16, defaults 0.5 / 1). The app exists but has no code yet.streamlit-apps-set-sourcewith the completeapp.pysource as one string. This creates version 1 and activates it. Write the source per thewriting-streamlit-appsskill — in particular useposthog_apps.query()for PostHog data, neverimport posthog.streamlit-apps-start. Returns immediately; the sandbox boots asynchronously.- Poll
streamlit-apps-statusuntilstatusisrunning(typically well under a minute). If it lands onerror, readlast_error— see Troubleshooting below. - Share the app: the
_posthogUrlreturned 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.
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 again (fetch it from your conversation or wherever it's kept — versions store the zip, not an inline source view).
Stopping, idling, and deleting
streamlit-apps-stopstops 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-deletestops any sandbox and soft-deletes the app. Confirm with the user before deleting anything you didn't create in this conversation.
Troubleshooting
status: errorwithlast_error: "Start failed: ..."— the sandbox failed to provision or boot. Retrystreamlit-apps-startonce; if it persists, surfacelast_errorto the user (provisioning failures are usually platform-side, not app-side).- Tool calls return 403 "Streamlit apps is not available." — the
streamlit-appsfeature 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.
Frequently asked questions about Managing Streamlit Apps
Similar skills
Python PyPI Package Builder
Streamline the process of creating and publishing Python packages.
Minecraft Plugin Development
Streamline your Minecraft server plugin creation.
MCP Server Builder
Easily build .NET MCP servers with the latest standards.
CommunityToolkit.Mvvm Messenger
Decoupled communication for ViewModels in .NET applications.
MVVM Toolkit DI
Streamline ViewModel integration with Dependency Injection in .NET.
MCP Apps Builder
Essential guidelines for MCP server development.
