# managing-streamlit-apps

managing-streamlit-apps controls Streamlit apps in PostHog sandboxes using MCP tools, handling everything from provisioning to safe code patching.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 179 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/managing-streamlit-apps/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/managing-streamlit-apps

## What it does

This skill guides the agent through operating Streamlit data apps inside PostHog sandboxes via `streamlit-apps-*` MCP tools. The model initializes the app entry, uploads `app.py` alongside extra text files or binary assets, triggers container boot, and surfaces the internal authenticated URL.

Code modifications follow a strict two-step pattern: reading active files with `streamlit-apps-get-source` and applying precise diffs with `streamlit-apps-edit-source`. If a teammate commits a revision in the meantime, the tool returns a 409 conflict to prevent overwriting newer work. Inactive versions past 30 days are pruned automatically.

Without the `streamlit-apps` feature flag enabled for the PostHog organization, all tool calls fail with HTTP 403. Bumping container memory beyond the default 1 GB will not fix failing HogQL queries, because the data bridge enforces an immutable 256 MB cap and a 30-second runtime ceiling.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill managing-streamlit-apps -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/managing-streamlit-apps/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/managing-streamlit-apps/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill managing-streamlit-apps -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/managing-streamlit-apps/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill managing-streamlit-apps -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/managing-streamlit-apps/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/managing-streamlit-apps
```

2. **Manually: put the files in place**
- File: `.github/skills/managing-streamlit-apps/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill managing-streamlit-apps -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/managing-streamlit-apps
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/managing-streamlit-apps/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill managing-streamlit-apps -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/managing-streamlit-apps/SKILL.md

## When to use it
- deploy a Streamlit sandbox directly within a PostHog organization
- apply safe text patches without clobbering concurrent revisions
- adjust sandbox CPU allocations and memory limits
- inspect sandbox boot errors and restart stopped instances

## Example prompts
- Deploy a new Streamlit app in PostHog using the code from app.py
- Check sandbox status and start the app again if it went idle
- Patch the active version of the PostHog dashboard to update metrics logic

## Similar
- [streamlit-to-marimo](https://affpapa.org/en/nevibecode/skills/streamlit-to-marimo.md) — skill · 2400 installs
- [harvard-artifacts-etl-streamlit-analytics](https://affpapa.org/en/nevibecode/skills/harvard-artifacts-etl-streamlit-analytics.md) — skill · 1900 installs
- [debugging-streamlit](https://affpapa.org/en/nevibecode/skills/debugging-streamlit.md) — skill · 502 installs
- [understanding-streamlit-architecture](https://affpapa.org/en/nevibecode/skills/understanding-streamlit-architecture.md) — skill · 123 installs
- [databricks-apps-python](https://affpapa.org/en/nevibecode/skills/databricks-apps-python.md) — skill · 363 installs

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
