managing-streamlit-apps
하는 일
이 스킬은 PostHog 안에서 Streamlit 데이터 앱을 첫 버전부터 공유 가능한 링크까지 만들고 실행하는 과정을 안내합니다. PostHog 데이터를 바탕으로 한 간단한 대화형 대시보드나 도구를 원하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓PostHog 데이터를 보여 주는 Streamlit 앱을 만들고 싶을 때.
- ✓Streamlit 앱이 실행되지 않아서 그 이유를 찾아야 할 때.
- ✓팀과 함께 앱을 시작, 중지 또는 공유하고 싶을 때.
스킬 링크
https://github.com/PostHog/posthog/blob/master/products/streamlit_apps/skills/managing-streamlit-apps/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“주간 가입자 수를 보여 주는 Streamlit 앱을 만들고, 그 링크를 팀과 공유해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
앱을 만들고, Python 소스를 설정하고, 그것을 실행하는 샌드박스를 시작합니다. 앱이 실행 중으로 표시되면 공유할 PostHog 링크가 생기며, 보는 사람은 로그인해야 볼 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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-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. Extra files ride along in the same call:filesmaps a project-relative path to text (helper modules, CSV, JSON),assetsmaps a path to base64 (Parquet, images). 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
Change an existing app in two steps, so you never ship an old copy over newer work:
streamlit-apps-get-sourcereads the active version (orversion_numberfor an older one). It returnsversion_number, a manifest of every file, and the text of each text file. Binary files appear without content. For a large app, passpaths(comma-separated) to read only the files you need.streamlit-apps-edit-sourcewithbase_versionset to thatversion_number.file_editsholds exactold→newtext replacements per file,create_filesadds new text files,delete_filesremoves files. Eacholdmust match exactly once, so include enough surrounding lines to make it unique. Files you do not touch stay byte-for-byte the same in the new version.
If the active version changed after your read, edit-source returns 409 with current_version.
This happens when another session ships a version, or when a person rolls the app back to an older version.
Read current_version again and redo your edits on it.
Do not fall back to set-source to force your copy through.
Keep streamlit-apps-set-source for a new app or a full rewrite.
It replaces every file, so pass files and assets again too; a version holds only what that call carried.
Both tools create the next version and activate 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, read the old version with streamlit-apps-get-source and set its files again with set-source.
Binary assets are not inlined there, so a rollback of an app with assets also needs a saved copy of those files.
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-si
자주 묻는 질문
공유된 앱은 누가 열 수 있나요?
보는 사람은 앱을 보려면 PostHog에 로그인해야 합니다.
앱에 오류가 표시되면 어떻게 하나요?
스킬이 앱의 마지막 오류를 읽고 문제 해결을 도와줍니다.
앱이 쓸 컴퓨팅 자원을 고를 수 있나요?
네. 만들 때 정해진 한도 안에서 CPU와 메모리를 설정합니다.
상세 정보
작성자의 원본 설명
Create, deploy, and operate Streamlit apps in PostHog via the streamlit-apps MCP tools — create an app, set its source, read and patch its code, start and stop its sandbox, poll status, list versions, delete, and share the app with humans via its PostHog URL. Use when asked to "create a streamlit app", "deploy a data app", "ship a dashboard app", "restart/stop my app", "why is my app not running", or "give me a link to the app".
repo: PostHog/posthog
인기도
- GitHub 스타
- 41k
- 순위
- #6954
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
depot-ci
41k에이전트가 GitHub Actions 대안인 Depot CI 워크플로를 설정하고 실행하도록 돕습니다. 기존 워크플로 이전과 실행 로그 읽기를 포함합니다.
depot-container-builds
41k에이전트가 Depot 원격 빌더에서 Docker 이미지를 빌드하도록 돕습니다. 다중 플랫폼 이미지, 레지스트리 푸시, 빌드 실패 수정을 포함합니다.
depot-github-runners
41k에이전트가 GitHub Actions 작업을 Depot 관리형 러너로 옮기고, 러너 크기와 라벨을 고르도록 돕습니다.
editing-agents-md
41k에이전트가 규칙을 AGENTS.md나 CLAUDE.md 중 어디에 둘지 정하고, 파일을 키우지 않으면서 잘 지켜지도록 쓰게 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.