Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计提醒

developing-with-streamlit使用 streamlit 进行开发

Agent Skill

developing-with-streamlit 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

24,720

周安装

1,040

GitHub Stars

178

下载量

7,760
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:developing-with-streamlit(使用 streamlit 进行开发)
来源仓库:https://github.com/streamlit/agent-skills
仓库路径:skills/developing-with-streamlit
安装命令:
npx skills add https://github.com/streamlit/agent-skills --skill developing-with-streamlit
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/streamlit/agent-skills --skill developing-with-streamlit

简介

所有 Streamlit 开发任务的路由技能:应用程序创建、编辑、调试、样式设置、优化和部署。

  • 根据任务类型路由到专门的子技能:性能优化、仪表板构建、设计改进、小部件选择、主题、布局、数据显示、多页面应用程序、会话状态、聊天 UI、自定义组件和 Snowflake 集成
  • 包括用于定位 Streamlit 源文件、识别入口点的工作流程 (streamlit_app.py, 应用程序.py),并应用子技能指导
  • 提供常见仪表板模式(指标、公司、计算、股票同行)和预构建主题(Snowflake、Dracula、Nord、Stripe、Solarized、Spotify、GitHub、minimal)的模板
  • 自动检测正在运行的 Streamlit 应用程序,并在编辑后启动或刷新它们

SKILL.md

Developing with Streamlit

This is a routing skill that directs you to specialized sub-skills for Streamlit development.

When to Use

Invoke this skill when the user's request involves:

  • Creating a new Streamlit app
  • Editing or modifying an existing Streamlit app
  • Debugging Streamlit issues (errors, session state bugs, performance problems)
  • Beautifying or improving the visual design of a Streamlit app
  • Optimizing Streamlit performance (caching, fragments, reruns)
  • Deploying Streamlit apps (locally or to Snowflake)
  • Styling widgets (button colors, backgrounds, CSS customization)
  • Any question about Streamlit widgets, layouts, or components

Trigger phrases: "streamlit", "st.", "dashboard", "app.py", "beautify app", "make it look better", "style", "CSS", "color", "background", "theme", "button", "slow rerun", "session state", "performance", "faster", "cache", "deploy"

Workflow

Step 1: Locate the Streamlit source code
    ↓
Step 2: Identify task type and load appropriate sub-skill(s)
    ↓
Step 3: Apply guidance from sub-skill to edit code
    ↓
Step 4: Check if app is running and offer to run it

Step 1: Locate the Streamlit Source Code (if needed)

Goal: Identify the app file(s) to edit. Skip this step if already clear from context.

When to skip:

  • User mentioned a specific file path (e.g., "edit src/app.py")
  • User has file(s) already in conversation context
  • Working directory has an obvious single entry point (app.py, streamlit_app.py)

When to search:

  • User says "my streamlit app" without specifying which file
  • Multiple Python files exist and it's unclear which is the entry point

If searching is needed:

  1. Quick scan for Streamlit files: find. -name "*.py" -type f | xargs grep -l "import streamlit\|from streamlit" 2>/dev/null | head -10
  2. Apply entry point heuristics (in priority order):

- streamlit_app.py at root → this is the entry point (canonical name) - app.py at root → likely entry point - File using st.navigation → entry point for multi-page apps - Single .py file at root with streamlit import → entry point - Files in pages/ or app_pages/ subdirectory → NOT entry points (these are sub-pages)

  1. If entry point is obvious → use it, no confirmation needed Example: Found streamlit_app.py and pages/metrics.py → use streamlit_app.py
  2. Only ask if genuinely ambiguous (e.g., multiple root-level candidates, none named streamlit_app.py): Found multiple potential entry points: - dashboard.py - main.py Which is your main app?

Output: Path to the main Streamlit source file(s)

Step 2: Identify Task Type and Route to Sub-Skill

Goal: Determine what the user needs and load the appropriate guidance.

Use this routing table to select sub-skill(s). Always read the sub-skill file before making changes:

User NeedSub-skill to Read
Performance issues, slow apps, cachingread skills/optimizing-streamlit-performance/SKILL.md
Building a dashboard with KPIs/metricsread skills/building-streamlit-dashboards/SKILL.md
Improving visual design, icons, polishread skills/improving-streamlit-design/SKILL.md
Choosing widgets (selectbox vs radio vs pills)read skills/choosing-streamlit-selection-widgets/SKILL.md
Styling widgets (button colors, backgrounds, CSS)read skills/creating-streamlit-themes/SKILL.md
Layouts (columns, tabs, sidebar, containers)read skills/using-streamlit-layouts/SKILL.md
Displaying data (dataframes, charts)read skills/displaying-streamlit-data/SKILL.md
Multi-page app architectureread skills/building-streamlit-multipage-apps/SKILL.md
Session state and callbacksread skills/using-streamlit-session-state/SKILL.md
Markdown, colored text, badgesread skills/using-streamlit-markdown/SKILL.md
Custom themes and colorsread skills/creating-streamlit-themes/SKILL.md
Comprehensive theme design and brand alignmentread skills/creating-streamlit-themes/SKILL.md
Chat interfaces and AI assistantsread skills/building-streamlit-chat-ui/SKILL.md
Connecting to Snowflakeread skills/connecting-streamlit-to-snowflake/SKILL.md
Building or packaging a custom component, triggering events back to Python from JS/HTML, custom HTML/JS with event handling (CCv2), OR any UI element that doesn't exist as a native Streamlit widget (e.g., drag-and-drop, custom interactive visualization, canvas drawing)read skills/building-streamlit-custom-components-v2/SKILL.mdIMPORTANT: st.components.v1 is deprecated. Never use v1 for new components; always use st.components.v2.component().
Third-party componentsread skills/using-streamlit-custom-components/SKILL.md
Code organizationread skills/organizing-streamlit-code/SKILL.md
Environment setupread skills/setting-up-streamlit-environment/SKILL.md
CLI commandsread skills/using-streamlit-cli/SKILL.md

Fallback — "this widget doesn't exist in Streamlit":

If the user asks for a UI element or interaction that has never been part of Streamlit's API and cannot be built with any combination of native widgets (e.g., drag-and-drop, canvas drawing, custom interactive visualizations), route to the CCv2 sub-skill (skills/building-streamlit-custom-components-v2/SKILL.md). Do not route to CCv2 for features that exist in newer Streamlit versions (e.g., st.connection, st.segmented_control) — suggest upgrading instead.

Common combinations:

For beautifying/improving an app, read in order:

  1. skills/improving-streamlit-design/SKILL.md
  2. skills/using-streamlit-layouts/SKILL.md
  3. skills/choosing-streamlit-selection-widgets/SKILL.md

For building a dashboard, read:

  1. skills/building-streamlit-dashboards/SKILL.md
  2. skills/displaying-streamlit-data/SKILL.md

IMPORTANT - Use templates:

When creating a new dashboard app, prefer starting from a template in templates/apps/:

  • If a template closely matches the request, copy it and adapt:

- dashboard-metrics / dashboard-metrics-snowflake — KPI cards with time-series charts - dashboard-companies — company/entity comparison - dashboard-compute / dashboard-compute-snowflake — resource/credit monitoring - dashboard-feature-usage — feature adoption tracking - dashboard-seattle-weather — public dataset exploration (local only) - dashboard-stock-peers / dashboard-stock-peers-snowflake — financial peer analysis

  • If no template is a close match, start from scratch but borrow relevant patterns from the templates (e.g., caching with @st.cache_data, filter_by_time_range(), st.set_page_config(), chart utilities, layout structure)
  • See templates/apps/README.md for template descriptions

When editing an existing app, use templates as reference for best practices:

  • Check templates/apps/ for caching patterns, layout structure, and Snowflake integration
  • Apply consistent patterns from templates to improve the existing code

When applying a custom theme, use a template from templates/themes/:

  • Copy a theme directory (snowflake, dracula, nord, stripe, solarized-light, spotify, github, minimal)
  • Themes use Google Fonts for easy setup
  • See templates/themes/README.md for theme previews

For performance optimization, read:

  1. skills/optimizing-streamlit-performance/SKILL.md

Step 3: Apply Guidance to Edit Code

Goal: Make changes to the Streamlit app following sub-skill best practices.

Actions:

  1. Apply the patterns and recommendations from the loaded sub-skill(s)
  2. Make edits to the source file(s) identified in Step 1
  3. Preserve existing functionality while adding improvements

Step 4: Check Running Apps and Offer to Run

Goal: Help the user see their changes by checking if their app is running.

Actions:

  1. Check for running Streamlit apps on ports 850*: lsof -nP -iTCP -sTCP:LISTEN 2>/dev/null | grep -i python | awk '{print $2, $9}' | grep ':85' || echo "No Streamlit apps detected on ports 850*"
  2. Present findings to user: If app is running: Found Streamlit app running: - PID: [pid] at http://localhost:[port] Your changes should be visible after a page refresh (Streamlit hot-reloads on file save). If no app is running: No Streamlit app detected on ports 850*. Would you like me to run the app? I can start it with: streamlit run [app_file.py]
  3. If user wants to run the app, start it: streamlit run [path/to/app.py] --server.port 8501

Stopping Points

  • Step 2: If multiple sub-skills seem relevant, ask user which aspect to focus on first
  • Step 4: Ask before starting the Streamlit app

Skill map

SkillCovers
building-streamlit-chat-uiChat interfaces, streaming responses, message history
building-streamlit-dashboardsKPI cards, metrics, dashboard layouts
building-streamlit-multipage-appsPage structure, navigation, shared state
building-streamlit-custom-components-v2Streamlit Custom Components v2 (inline and template-based packaged), bidirectional state/trigger callbacks, bundling, theme CSS variables
choosing-streamlit-selection-widgetsSelectbox vs radio vs segmented control vs pills vs multiselect
connecting-streamlit-to-snowflakest.connection, query caching, credentials
creating-streamlit-themesTheme configuration, colors, fonts, light/dark modes, professional brand alignment, CSS avoidance
displaying-streamlit-dataDataframes, column config, charts
improving-streamlit-designIcons, badges, colored text, visual polish
optimizing-streamlit-performanceCaching, fragments, forms, static vs dynamic widgets
organizing-streamlit-codeWhen to split into modules, separating UI from logic
setting-up-streamlit-environmentPython environment, dependency management
using-streamlit-custom-componentsThird-party components from the community
using-streamlit-cliCLI commands, running apps
using-streamlit-layoutsSidebar, columns, containers, tabs, expanders, dialogs, alignment, spacing
using-streamlit-markdownColored text, badges, icons, LaTeX, and all markdown features
using-streamlit-session-stateSession state, widget keys, callbacks, state persistence

Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.74%
按下载量换算2,153

Antigravity

22.28%
按下载量换算1,729

OpenCode

19.68%
按下载量换算1,527

Cursor

12.33%
按下载量换算957

Gemini CLI

8.54%
按下载量换算663

github-copilot

3.51%
按下载量换算272

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills