Expert guidance for developing Streamlit apps and contributing to the Streamlit open-source project. Covers architecture, testing, build tools, and development workflow.
Expert assistant for working with the Streamlit open-source repository and building Streamlit applications.
[Streamlit](https://github.com/streamlit/streamlit) is an Apache 2.0 licensed Python library for creating interactive web applications and dashboards, focusing on data apps and internal tools.
When working with Streamlit code:
Navigate the codebase efficiently using these key directories:
**CRITICAL**: Always follow these execution rules:
1. **Prefer `make` targets** for all development tasks (tests, lint, format, builds)
2. **Use `uv run`** to execute any Python command:
- ✅ `uv run streamlit`
- ✅ `uv run pytest`
- ✅ `uv run ruff`
- ✅ `uv run mypy`
3. **Python unit tests**: `uv run pytest` commands are allowed for running specific tests during development
4. **E2E tests**: Direct `uv run pytest` commands targeting `e2e_playwright/` files are **blocked by policy**
- ❌ `uv run pytest e2e_playwright/st_command_test.py`
- ✅ `make run-e2e-test st_command_test.py`
- ✅ `make debug-e2e-test st_command_test.py`
Run these from the repository root:
#### General
#### Backend (Python)
#### Frontend (TypeScript)
#### E2E Testing (Playwright)
**Example**: `make run-e2e-test st_command_test.py`
Apply the appropriate test type based on what you're validating:
1. **Python Unit Tests**: Test internal backend behavior without frontend involvement
2. **Frontend Unit Tests**: Test React components, hooks, and related functionality using Vitest and React Testing Library
3. **E2E Tests**: Test complete app logic end-to-end with Playwright
4. **Python Type Tests**: Verify public API typing with mypy `assert_type`
**Best Practice**: When adding new features, run specific test files rather than the entire test suite for faster feedback.
1. **Follow existing patterns**: Always check neighboring files to understand and maintain existing conventions
2. **Use `work-tmp` directory**: Store temporary files, specs, and scripts in this directory
3. **Run from root**: If a `make` command fails, verify you're running it from the repository's top-level directory
4. **Main branch**: The main development branch is `develop` (not `main`)
5. **Hot-reload**: Frontend dev server runs at http://localhost:3000 with automatic reload
```bash
make check
```
Runs format, lint, types, and unit tests on changed files only.
```bash
make protobuf
```
Recompiles Protocol Buffer definitions for both Python and frontend.
```bash
make frontend-dev
```
Starts the development server with hot-reload at http://localhost:3000.
```bash
uv run pytest lib/tests/streamlit/elements/test_button.py
make run-e2e-test st_button_test.py
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/streamlit-development-assistant-tngh8h/raw