Token导航 LogoToken导航

Agent Skill · 研究检索

understanding-streamlit-architecture(理解流线型架构)

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

understanding-streamlit-architecture 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 41,842。

总安装 1,129周安装 48GitHub Stars 44,434下载 396核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/streamlit/streamlit --skill understanding-streamlit-architecture

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。支持基于关键词、任务场景或来源线索进行信息筛选与组织,提升研究效率。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

安装前需确认权限范围、维护状态及是否涉及联网或文件操作。understanding-streamlit-architecture 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/understanding-streamlit-architecture

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/streamlit/streamlit --skill understanding-stre…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

understanding-streamlit-architecture 怎么安装?

在终端执行 npx skills add https://github.com/streamlit/streamlit --skill understanding-streamlit-arch…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

understanding-streamlit-architecture 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

understanding-streamlit-architecture 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

understanding-streamlit-architecture 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

understanding-streamlit-architecture 用的人多吗?

公开数据是累计安装 1,129 次,近一周安装 48 次,下载 396 次,GitHub 44,434 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

understanding-streamlit-architecture 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 44,434 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
understanding-streamlit-architecture

理解流线型架构 · 本页

1,12944,434操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Understanding Streamlit architecture

Streamlit is a client-server application with bidirectional WebSocket communication using Protocol Buffers. Use this file as a quick mental model and navigation index; use references/backend.md, references/frontend.md, and references/communication.md for implementation details.

Concepts glossary

ConceptDescriptionKey files
CommandAny function exposed in Streamlit's public API (st.* namespace). Commands can create elements/widgets, control execution flow, or configure app behavior.lib/streamlit/delta_generator.py, lib/streamlit/elements/, lib/streamlit/commands/
ElementUmbrella term for all UI components in Streamlit: widgets, containers, and display elements. Represented in Element.proto as a oneof union of ~50+ types.proto/streamlit/proto/Element.proto, lib/streamlit/elements/
WidgetInteractive element (button, slider, text_input) that triggers reruns on user interaction. Value accessible via return value or st.session_state. Some elements become widgets conditionally (e.g., dataframe/chart with on_select).lib/streamlit/elements/widgets/, frontend/lib/src/components/widgets/
Display ElementNon-interactive element (text, markdown, image, chart) that renders content without triggering reruns by itself.lib/streamlit/elements/, frontend/lib/src/components/elements/
ContainerLayout block that groups elements spatially (sidebar, columns, expander, tabs, form). Represented as BlockNode in the element tree.lib/streamlit/elements/layouts.py, Block.proto
DeltaGeneratorThe st object; API entry point that queues UI deltas. Uses mixin pattern to compose all st.* commands.lib/streamlit/delta_generator.py
Session StatePer-session dictionary (st.session_state) persisting data across reruns. Stores widget values and user variables.lib/streamlit/runtime/state/session_state.py
RerunRe-execution of the user script for the current page. Triggered by widget interactions, st.rerun(), file changes, or fragment timers. Rebuilds the element tree while preserving session state.lib/streamlit/runtime/scriptrunner/script_runner.py, lib/streamlit/commands/execution_control.py
FormContainer (st.form) that batches widget inputs, deferring reruns until form submission.lib/streamlit/elements/form.py, WidgetStateManager.ts
FragmentDecorator (@st.fragment) enabling partial reruns of specific UI sections without full script re-execution.lib/streamlit/runtime/fragment.py
CachingDecorators (@st.cache_data, @st.cache_resource) that memoize function results to avoid redundant computation.lib/streamlit/runtime/caching/
PagesMultipage app system using st.navigation() and st.Page() or auto-discovery from pages/ directory.lib/streamlit/navigation/, lib/streamlit/runtime/pages_manager.py
ConfigApp configuration via .streamlit/config.toml controlling server, client, and theme settings.lib/streamlit/config.py, lib/streamlit/config_option.py
ThemingCustomizable UI themes (Light/Dark/Custom) defined in config or via theme editor.lib/streamlit/runtime/theme_util.py, frontend/lib/src/theme/
SecretsSecure credential storage via .streamlit/secrets.toml (local) or platform settings (deployed). Accessed via st.secrets.lib/streamlit/runtime/secrets.py
ConnectionDatabase/service abstraction (st.connection) with built-in caching and secrets integration.lib/streamlit/connections/
Custom ComponentsUser-built extensions using React/iframe. v1 (legacy): declare_component() API. v2 (current): Bidirectional components with improved state management.frontend/component-lib/, frontend/component-v2-lib/, lib/streamlit/components/v1/, lib/streamlit/components/v2/
Static File ServingFiles in static/ directory served directly via /app/static/* (when static serving is enabled).lib/streamlit/web/server/server.py, lib/streamlit/web/server/starlette/starlette_routes.py
App TestingTesting framework (AppTest) for simulating user interactions and inspecting rendered output.lib/streamlit/testing/

Core mental model

flowchart TB
    subgraph Backend["Backend (Python)"]
        Script[User Script]
        DG[DeltaGenerator]
        Runtime[Runtime/AppSession]
    end

    subgraph Protocol["WebSocket + Protobuf"]
        FM[ForwardMsg]
        BM[BackMsg]
    end

    subgraph Frontend["Frontend (React)"]
        App[App.tsx]
        Tree[AppRoot Tree]
        Renderer[ElementNodeRenderer]
        WSM[WidgetStateManager]
    end

    Script --> DG
    DG --> FM
    FM --> App
    App --> Tree
    Tree --> Renderer
    Renderer --> WSM
    WSM -->|User interaction| BM
    BM --> Runtime
    Runtime -->|Rerun| Script

Key insight: Script execution is rerun-driven: most widget interactions trigger reruns (full app or fragment-scoped). State persists via st.session_state and caching decorators.

Execution model

Streamlit's execution model differs from traditional web frameworks:

Rerun triggers:

  1. Widget interaction: User clicks button, moves slider, etc.
  2. Source code change: File watcher detects script modification
  3. st.rerun(): Explicit programmatic rerun
  4. Fragment timer: @st.fragment(run_every=...) periodic reruns

Execution order nuances:

  • Scripts execute top-to-bottom on every rerun
  • Callbacks first: on_change/on_click handlers run *before* the main script body
  • Fragments typically isolate reruns: Widget interactions inside @st.fragment usually rerun only that fragment
  • Control flow exceptions: st.stop(), st.rerun(), st.switch_page() raise exceptions to halt/redirect execution

Session isolation:

  • Each browser tab = separate AppSession with its own SessionState
  • Refreshing the page creates a new session (unless reconnecting within TTL)
  • No shared state between sessions (use external storage for multi-user state)

What persists across reruns (within a session):

  • st.session_state values
  • Cached function results (@st.cache_data, @st.cache_resource)
  • Uploaded files
  • Fragment registrations

What resets on each rerun:

  • Local variables in script
  • Widget return values (re-read from SessionState)
  • Element tree (rebuilt from scratch, then diffed)

Architecture layers

Backend (Python)

ComponentFilePurpose
Runtimelib/streamlit/runtime/runtime.pySingleton managing app lifecycle and sessions
AppSessionlib/streamlit/runtime/app_session.pyPer-browser-tab: ScriptRunner + SessionState + ForwardMsgQueue
ScriptRunnerlib/streamlit/runtime/scriptrunner/script_runner.pyExecutes user scripts in separate thread
DeltaGeneratorlib/streamlit/delta_generator.pyAPI entry point using mixin pattern
SessionStatelib/streamlit/runtime/state/session_state.pyWidget values and user variables
Elementslib/streamlit/elements/Backend implementation of st.* commands

For backend deep dive: See references/backend.md

Frontend (TypeScript/React)

ComponentFilePurpose
Appfrontend/app/src/App.tsxCentral orchestrator
AppRootfrontend/lib/src/render-tree/AppRoot.tsImmutable element tree with 4 containers
ElementNodeRendererfrontend/lib/src/components/core/Block/ElementNodeRenderer.tsxMaps protos to React components
WidgetStateManagerfrontend/lib/src/WidgetStateManager.tsWidget state, forms, query params
ConnectionManagerfrontend/connection/src/ConnectionManager.tsWebSocket state machine

For frontend deep dive: See references/frontend.md

Communication (Protobuf)

ProtoPurpose
ForwardMsg.protoServer to client: deltas, session events, navigation
BackMsg.protoClient to server: rerun requests with widget states
Element.proto~50+ element types in oneof type union
WidgetStates.protoWidget values: trigger_value, string_value, bool_value, etc.

Location: proto/streamlit/proto/

For protocol deep dive: See references/communication.md

Essential concepts (quick map)

  • Layout system: Width/height parameters for elements, flexbox containers, and responsive sizing.

- Deep dive: references/layout.md

  • Script rerun model: Widget interaction -> BackMsg (ClientState) -> backend updates SessionState -> script rerun -> ForwardMsg deltas.

- Deep dive: references/communication.md#widget-interaction-to-script-rerun

  • Delta path system: Elements are addressed by delta paths (for example [0, 2, 3]) to support efficient tree updates.

- Deep dive: references/communication.md#delta-ui-changes

  • active_script_hash semantics: ForwardMsg.metadata.active_script_hash scopes node ownership across multipage and fragment reruns.

- Deep dive: references/communication.md#forwardmsg-metadata-active_script_hash

  • Element tree structure: Frontend AppRoot maintains main, sidebar, event, and bottom containers with BlockNode/ElementNode.

- Deep dive: references/frontend.md#element-tree-frontendlibsrcrender-tree

  • Element identity semantics: Delta paths decide where a node lives; element IDs decide whether stateful elements can reconnect to prior state after remounts.

- Deep dive: references/element-identity.md

  • Fragments (@st.fragment): Fragment interactions usually trigger fragment-scoped reruns and update only affected regions.

- Deep dive: references/backend.md

Element identity

  • Delta path controls where a node is placed in the render tree.
  • Element ID controls whether a stateful element can reconnect to prior state after remounts.
  • Widgets use the ID to connect frontend WidgetStateManager state, BackMsg.WidgetStates, backend SessionState, callbacks, and st.session_state.
  • Some non-widgets also use IDs for frontend-only reconstruction (for example chart view state or media autoplay guards).
  • Delta-path changes can remount elements, but a stable element.id can still let React preserve a leaf when it remains under the same rendered parent list.

Deep dive: references/element-identity.md

Key implementation patterns

  • Backend mixin composition: DeltaGenerator composes st.* API via mixins.

- Deep dive: references/backend.md#deltagenerator-libstreamlitdelta_generatorpy

  • Frontend visitor pattern: Render-tree updates/staleness cleanup use visitors.

- Deep dive: references/frontend.md#visitor-pattern

  • Message deduplication: ForwardMsg.hash + ref_hash with frontend ForwardMsgCache reduces bandwidth.

- Deep dive: references/communication.md#message-caching

Quick reference: adding features

  1. Proto definition: proto/streamlit/proto/<Element>.proto
  2. Register in Element.proto: Add to oneof type
  3. Backend mixin: lib/streamlit/elements/<element>.py
  4. Frontend component: frontend/lib/src/components/elements/<Element>/ or frontend/lib/src/components/widgets/<Element>/ (depending on element vs widget)
  5. Register in ElementNodeRenderer: Add case to switch statement
  6. Compile protos: make protobuf

See wiki/new-feature-guide.md for a detailed implementation guide.

Maintaining this documentation

When making changes that impact any of the concepts documented here (Runtime, AppSession, DeltaGenerator, element tree, communication protocol, element identity, etc.), update the relevant sections in this skill's files (SKILL.md, references/backend.md, references/frontend.md, references/communication.md, references/element-identity.md) to keep them accurate.

平台分布

Codex

34.36%
按下载量换算136

Claude

29.06%
按下载量换算115

Cursor

20.57%
按下载量换算81

Gemini CLI

10.67%
按下载量换算42

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills