chore: vendor developing-with-streamlit meta-skill, trim local streamlit skill - #274
Conversation
There was a problem hiding this comment.
Pull request overview
This PR vendors Streamlit’s official developing-with-streamlit meta-skill into the repository so contributors can discover version-matched Streamlit reference docs from their installed Streamlit package, and it trims the repo’s existing streamlit skill down to DataSure-specific guidance.
Changes:
- Added a vendored
developing-with-streamlitskill and discovery script for locating Streamlit’s bundled skill docs in the active environment. - Reduced the local
streamlitskill to only DataSure-specific patterns (asset paths and cache directory handling). - Removed legacy generic Streamlit templates/references previously stored under the local
streamlitskill.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .claude/skills/streamlit/SKILL.md | Trimmed to DataSure-only Streamlit patterns and references get_cache_base_dir() for cache resolution. |
| .claude/skills/streamlit/scripts/create_streamlit_app.py | Removed old helper script for generating Streamlit app templates. |
| .claude/skills/streamlit/references/widget_reference.md | Removed generic widget reference (superseded by version-matched upstream docs). |
| .claude/skills/streamlit/references/session_state_patterns.md | Removed generic session state patterns reference. |
| .claude/skills/streamlit/references/caching_guide.md | Removed generic caching guide reference. |
| .claude/skills/streamlit/assets/multipage_template.py | Removed generic multipage template. |
| .claude/skills/streamlit/assets/form_template.py | Removed generic form template. |
| .claude/skills/streamlit/assets/app_template.py | Removed generic single-page template. |
| .claude/skills/developing-with-streamlit/SKILL.md | Added meta-skill entrypoint describing how to run discovery and route to bundled docs. |
| .claude/skills/developing-with-streamlit/scripts/discover.py | Added discovery script to locate Streamlit’s bundled skill content via the project’s interpreter/environment. |
Suppressed comments (1)
.claude/skills/streamlit/SKILL.md:19
- The Asset Management snippet uses
st.image(...)but doesn’t import Streamlit (import streamlit as st), so the example as written won’t run when copied.
from pathlib import Path
# Package-relative asset paths
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…lit skill Vendors Streamlit's official developing-with-streamlit meta-skill into the repo so it travels with every clone instead of relying on a user-level install; project-level skills take precedence over user-level ones with the same name, so this shadows any existing global copy without conflict. Trims the local streamlit skill down to DataSure-specific patterns (asset paths, cache directory resolution) and drops the generic Streamlit content/templates now superseded by the version-matched reference docs the meta-skill discovers from the installed Streamlit package. Also fixes a stale cache-directory example that referenced platformdirs, which isn't actually used by cache_utils.py. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ba4c77f to
788709a
Compare
|
NKeleher
left a comment
There was a problem hiding this comment.
seems sensible to trim this down.
my reproduction:
❯ uv run python .claude/skills/developing-with-streamlit/scripts/discover.py --project-dir .
Uninstalled 48 packages in 2.26s
Installed 49 packages in 3.96s
C:\Users\NKeleher\code\datasure\.venv\Lib\site-packages\streamlit\.agents\skills\developing-with-streamlit\SKILL.md



Pull Request Summary 🚀
What does this PR do? 📝
Vendors Streamlit's official
developing-with-streamlitmeta-skill into.claude/skills/and trims the existing project-localstreamlitskill down to just DataSure-specific patterns.Why is this change needed? 🤔
Streamlit (>=1.57) ships detailed, version-matched Streamlit reference documentation as an agent skill inside its own pip package. A lightweight meta-skill (routing
SKILL.md+ adiscover.pyscript) locates that bundled documentation in the active interpreter. This meta-skill was only installed at the user level (~/.claude/skills/), so it wasn't guaranteed to be available to other contributors cloning this repo. Our existing project-localstreamlitskill also duplicated a lot of generic Streamlit knowledge that drifts out of date as Streamlit is upgraded, and contained an inaccurate cache-directory example.How was this implemented? 🛠️
.claude/skills/developing-with-streamlit/(SKILL.md+scripts/discover.py), copied verbatim from streamlit/streamlit, with a docstring added tomain()to satisfy this repo's ruff config. Project-level skills take precedence over user-level ones with the same name, so this shadows any contributor's existing global copy without conflict..claude/skills/streamlit/SKILL.mddown to two DataSure-specific sections: Asset Management and Cache Directory Handling (the latter corrected to reference the realget_cache_base_dir()insrc/datasure/utils/cache_utils.pyinstead of an inventedplatformdirscall that isn't actually used).assets/,references/, andscripts/files under the oldstreamlitskill — their content (widget reference, caching guide, session-state patterns, app templates) is superseded by the version-matched reference docs the new meta-skill discovers.How to test or reproduce ? 🧪
python .claude/skills/developing-with-streamlit/scripts/discover.py --project-dir .This should print the path to the bundled
SKILL.mdinside the project's installed Streamlit package (.venv/Lib/site-packages/streamlit/.agents/skills/developing-with-streamlit/SKILL.md) with exit code 0.Screenshots (if applicable) 📷
N/A — skill/documentation change only, no UI impact.
Checklist ✅
🤖 Generated with Claude Code