agilab-streamlit-pages

Enforce session-state safety and modular page patterns for AGILAB Streamlit projects.

19|2|Updated Mar 14, 2025
One-click install
npx skills add https://github.com/ThalesGroup/agilab --skill agilab-streamlit-pages
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agilab-streamlit-pages
Source: https://github.com/ThalesGroup/agilab/tree/main/.claude/skills/agilab-streamlit-pages
Command: npx skills add https://github.com/ThalesGroup/agilab --skill agilab-streamlit-pages

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamline Streamlit page development for AGILAB by codifying safe session-state patterns, stable widget keys, and clear page boundaries to prevent state leaks and UI glitches across apps.

Core Features & Use Cases

  • Enforces session-state best practices to prevent duplicate widget keys and unintended reruns.
  • Guides app-page boundaries with a clear separation between apps-pages and main app code.
  • Documents reusable patterns for page composition, argument forms, and UI diagnostics to improve reliability and collaboration across AGILAB projects.

Quick Start

Open your AGILAB Streamlit project and apply the recommended session-state patterns by introducing consistent keys, guarded state initialisation, and modular pages as described in the Skill.

Frequently Asked Questions about agilab-streamlit-pages

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent Streamlit session state leaks across multiple pages?

To prevent Streamlit session state leaks, enforce guarded state initialization and consistent widget keys within each page. This ensures isolated page boundaries and stops unintended reruns or duplicate keys across modular app surfaces.

What's the best way to structure a scalable Streamlit app with pages?

Structure scalable Streamlit apps by separating main app code from apps-pages directories and using modular page composition. Enforcing explicit frontmatter metadata and consistent page patterns prevents UI glitches and improves reliability across projects.

Why does Streamlit throw duplicate widget key errors during reruns?

Streamlit throws duplicate widget key errors during reruns when page boundaries are unclear and keys are not safely managed. Applying stable widget key management and session-state safety patterns resolves these UI glitches.

Does this Streamlit page pattern work with apps-pages and main_page.py files?

Yes, these Streamlit page patterns directly target AGILAB projects containing main_page.py, pages/*, and apps-pages/*/src files. The guidance enforces safe state initialization and modular app surfaces across these specific project structures.

How do I add argument forms and diagnostics to Streamlit pages?

Add argument forms and diagnostics to Streamlit pages by applying documented reusable page composition patterns. Utilizing app_args_form.py views and modular components ensures reliable UI diagnostics rendering and clear state boundaries.

When do I need explicit frontmatter metadata in Streamlit pages?

Explicit frontmatter metadata in Streamlit pages is needed when enforcing consistent page patterns and governance across AGILAB projects. It ensures safe session-state initialization, stable widget keys, and reliable modular app surfaces.