Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

agilab-streamlit-pages

БесплатноБез исполняемых скриптовНе проверен

Native Python view authoring patterns for AGILAB (agi_web.python_ui, session_state safety, keys, rerun, UX).

ThalesGroupот ThalesGroup★ 23 звезды на GitHub

Об этом скилле

Python Views Skill (AGILAB)

Use this skill when editing:

  • src/agilab/main_page.py
  • src/agilab/pages/*.py
  • src/agilab/apps-pages/*/src/*/*.py
  • custom app_args_form.py views in AGILAB-managed app repos

Retained Python views import agi_web.python_ui, typically as st. Do not import Streamlit or its internals. Tests use agi_web.testing.AppTest; direct views run with python -m agi_web.react_python_host VIEW.py --address 127.0.0.1, with view arguments after --. The existing skill name and agi_env.streamlit_args helper names remain compatibility identifiers.

Apps-Pages Versus Apps Boundary

  • Treat apps-pages as app-agnostic analysis sidecars by default. A page should inspect artifacts, manifests, metrics, or settings from the selected active app; it should not own the domain workflow.
  • Before promoting a native Python UI surface as an apps-page, check whether it generates its own dataset, trains a model, runs an optimizer, owns evidence generation, or encodes project-specific semantics. If yes, it is probably an app project with a companion analysis page, not a generic page bundle.
  • If a self-contained teaching surface must stay under apps-pages for packaging or launch reasons, document it as an explicit opt-in playground or exception. Do not describe it as a generic app-agnostic view.
  • Prefer the split architecture when the surface has both execution and review concerns: the app owns reproducible execution and artifact/evidence export; the page reads those artifacts and renders the analysis.
  • AGILAB app projects do not always need workers. Use a workerless app template for local/UI prototypes, notebook-derived tools, explainers, and reports that can write artifacts from the manager process. Use a worker template only when the app needs AGILAB Install/Execute worker deployment, Dask, worker-specific dependencies, or a distributed task plan.

App Args Forms And Sidebar Controls

  • Custom app_args_form.py views are app UI, not apps-pages. Use them when an app needs persisted execution fields in ORCHESTRATE.
  • For custom app_args_form.py views, do a field-consistency pass before closing the change: compare the app ArgsModel, seed app_settings.toml, guided-mode widgets, preview-helper inputs, and persisted candidate payload. Runtime-relevant args must either be visible in the guided form or explicitly documented as intentionally advanced; do not leave required execution fields available only through generic edit mode. Preview helpers should consume the current widget value for any exposed field, not the stale defaults_model value.
  • For compact app-specific controls, use agi_env.streamlit_args.render_form with an explicit container such as st.sidebar: render_form(defaults_model, container=st.sidebar).
  • Keep the capability generic in agi_env.streamlit_args; do not hard-code a project name or page bundle just because one app wants sidebar controls.
  • If a native Python UI surface owns training, optimization, generated data, or evidence export, make it an app project first. Keep any app-owned standalone native Python UI surface under that app project unless a separate generic analysis page reads only exported artifacts.
  • For an app-owned native Python UI surface that should appear as the app's primary ANALYSIS experience, declare [app_surface] in the app's app_settings.toml with a project-local entrypoint such as pytorch_playground/app_surface.py. Use [pages] restrict_to_view_module = true for app-surface-first projects; an empty or missing pages.view_module may be migrated to the virtual view_app_ui launcher so the app surface is selected and visible in the ANALYSIS sidebar. Do not create a generic apps-pages/view_<app> bridge for this.
  • Treat view_app_ui as an internal route key, not a user-facing label. Sidebar links for app surfaces should use [app_surface].title, route through the app surface renderer, and avoid exposing duplicate view_app_ui bridge links.
  • Keep the standard ANALYSIS view multiselect usable for app-surface projects: view_app_ui may be the default selected sidebar launcher, but users must still be able to add other installed analysis views through the same existing selector instead of a custom "additional views" control.
  • Render an ANALYSIS sidebar launcher from one place per page route. If the main page persists selected views after rendering controls, do not also render the same project label or app-surface link before the main-page body; add a regression assertion that the compact project caption and app-surface link appear exactly once.

Session State Rules (Avoid Common Crashes)

  • Never assign st.session_state["k"] = … after a widget with key="k" was created.
    • Prefer st.session_state.setdefault("k", default) before the widget.
    • Or use widget return values and compute derived state separately.
    • If a ren
Полный SKILL.md на GitHub

Установить agilab-streamlit-pages в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл agilab-streamlit-pages?

Native Python view authoring patterns for AGILAB (agi_web.python_ui, session_state safety, keys, rerun, UX).

Как установить скилл agilab-streamlit-pages?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл agilab-streamlit-pages запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить agilab-streamlit-pages с