ddtully/dotfiles/building-streamlit-chat-ui
Claude Code and agent skill by ddtully/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
Building chat interfaces in Streamlit. Use when creating conversational UIs, chatbots, or AI assistants. Covers st.chat_message, st.chat_input, message history, and streaming responses.
Install
npx vskill@latest install ddtully/dotfiles/building-streamlit-chat-uiSKILL.md
The same SKILL.md was published earlier as ddtully/dotfiles/building-streamlit-chat-ui.
Streamlit chat interfaces
Build conversational UIs with Streamlit's chat elements.
Basic chat structure
Streaming responses
Use st.write_stream for token-by-token display. Pass any generator that yields strings, including the OpenAI generator directly:
With OpenAI, you can pass the stream directly:
Chat message avatars
Streamlit provides default avatars for "user" and "assistant" roles—only customize if you have a specific need. You can use icons or images:
Suggestion chips
Offer clickable suggestions before the first message. The pills disappear once the user sends a message, creating a clean onboarding experience:
The if not st.session_state.messages check ensures the suggestions only appear on an empty chat. Once a message is added, the pills vanish and the conversation takes over.
File uploads
Enable file attachments with accept_file. When enabled, st.chat_input returns a dict-like object with text and files attributes:
Use accept_file="multiple" to allow multiple files.
Audio input
Enable voice recording with accept_audio. The recorded audio is available as a WAV file:
Dictation with speech-to-text
Convert audio to text and inject it back into the chat input:
User feedback
Add thumbs up/down feedback to assistant messages. Also supports "stars" and "faces" ratings:
Clear chat
Add a button to reset the conversation:
Related skills
connecting-streamlit-to-snowflake: Database queries and Cortex chat exampleoptimizing-streamlit-performance: Caching strategies for LLM calls
References
Security
- Security scanPassed, 90 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 repositoryCheckingskills/.agent_skills/developing-with-streamlit/skills/building-streamlit-chat-ui/SKILL.md
Popularity
- 7-day trend score
- 0
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/ddtully/dotfiles/building-streamlit-chat-ui)