Skip to content

chore: vendor developing-with-streamlit meta-skill, trim local streamlit skill - #274

Merged
iabaako merged 1 commit into
chore/dependency-updatesfrom
chore/vendor-streamlit-meta-skill
Aug 12, 2026
Merged

chore: vendor developing-with-streamlit meta-skill, trim local streamlit skill#274
iabaako merged 1 commit into
chore/dependency-updatesfrom
chore/vendor-streamlit-meta-skill

Conversation

@iabaako

@iabaako iabaako commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Pull Request Summary 🚀

What does this PR do? 📝

Vendors Streamlit's official developing-with-streamlit meta-skill into .claude/skills/ and trims the existing project-local streamlit skill 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 + a discover.py script) 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-local streamlit skill 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? 🛠️

  • Added .claude/skills/developing-with-streamlit/ (SKILL.md + scripts/discover.py), copied verbatim from streamlit/streamlit, with a docstring added to main() 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.
  • Trimmed .claude/skills/streamlit/SKILL.md down to two DataSure-specific sections: Asset Management and Cache Directory Handling (the latter corrected to reference the real get_cache_base_dir() in src/datasure/utils/cache_utils.py instead of an invented platformdirs call that isn't actually used).
  • Removed the now-orphaned generic assets/, references/, and scripts/ files under the old streamlit skill — 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.md inside 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 ✅

  • I have run and tested my changes locally
  • I have limit this PR to less than 1000 lines of code change (if not, explain why)
  • I have updated/added tests to cover my changes (if applicable) — N/A, no application code changed
  • I have updated/added requirements to cover my changes (if applicable) — N/A
  • I have run linting and formatting on any code changes (if applicable)
  • I have updated the documentation (README, etc.) accordingly — N/A, skill docs are self-describing
  • I have reviewed and resolved any merge conflict

🤖 Generated with Claude Code

@iabaako
iabaako requested a review from a team as a code owner August 9, 2026 12:08
@iabaako
iabaako requested a lite review from Copilot August 11, 2026 07:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-streamlit skill and discovery script for locating Streamlit’s bundled skill docs in the active environment.
  • Reduced the local streamlit skill to only DataSure-specific patterns (asset paths and cache directory handling).
  • Removed legacy generic Streamlit templates/references previously stored under the local streamlit skill.

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.

Comment thread .claude/skills/developing-with-streamlit/scripts/discover.py
Comment thread .claude/skills/developing-with-streamlit/scripts/discover.py
…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>
@iabaako
iabaako force-pushed the chore/vendor-streamlit-meta-skill branch from ba4c77f to 788709a Compare August 11, 2026 09:57
@sonarqubecloud

Copy link
Copy Markdown

@NKeleher NKeleher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@iabaako
iabaako merged commit 4f7fa93 into main Aug 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants