kvdomingo/dotrepo/organizing-streamlit-code
Claude Code and agent skill by kvdomingo/dotrepo
- community
Checking that the SKILL.md file is still in the repository.
Organizing Streamlit code for maintainability. Use when structuring apps with separate modules and utilities. Covers separation of concerns, keeping UI code clean, and import patterns.
Install
npx vskill@latest install kvdomingo/dotrepo/organizing-streamlit-codeSKILL.md
The same SKILL.md was published earlier as igonro/streamlit-bubble-chat/organizing-streamlit-code.
Streamlit code organization
For most simple apps, keep everything in one file—it's cleaner and more straightforward. The app file should read like a normal Python script for data processing, with a few Streamlit commands sprinkled in.
Name the main file streamlit_app.py (Streamlit's default).
When to split
Keep in one file (most apps):
- Apps under ~1000 lines
- One-off scripts and prototypes
- Apps where logic is straightforward
Consider splitting when:
- Data processing is complex (50+ lines of non-UI code)
- Multiple pages share logic
- You want to test business logic separately
If splitting makes sense, here's how to organize it.
Directory structure
Separating UI from logic
When you do split, keep Streamlit files focused on UI and move complex logic to utility modules:
Avoid if name == "main"
Streamlit apps run the entire file on each interaction. Don't use the main guard in Streamlit files.
The main guard is fine in utility modules for quick testing:
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude/skills/developing-with-streamlit/skills/organizing-streamlit-code/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kvdomingo/dotrepo/organizing-streamlit-code)