designing-real-world-ai-agents-workshop: Skill for Claude Code

.agents/skills/developing-with-streamlit/skills/building-streamlit-chat-ui/SKILL.md

building-streamlit-chat-ui is a skill for Claude Code, Codex from iusztinpaul/designing-real-world-ai-agents-workshop. It costs 43 tokens per session (1,264 once invoked), scanned A, original, MIT.

A guide to building chat screens in Streamlit, a Python tool for making interactive web apps. It covers chat messages, user input, conversation history, and responses that appear as they are generated.

In plain words
What is it for?
Use it to create chatbots, AI assistants, and other Streamlit interfaces where users send messages and receive replies.
Why use it?
It provides the common structure needed for a conversational app, so you do not have to work out message display, input handling, and streamed output from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is iusztinpaul/designing-real-world-ai-agents-workshop's own configuration. It tells Claude Code and Codex how to work on designing-real-world-ai-agents-workshop itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything designing-real-world-ai-agents-workshop configures →

Reuse

Borrowing it

Nothing to install: this file belongs to iusztinpaul/designing-real-world-ai-agents-workshop. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/iusztinpaul/designing-real-world-ai-agents-workshop/main/.agents/skills/developing-with-streamlit/skills/building-streamlit-chat-ui/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/iusztinpaul/designing-real-world-ai-agents-workshop

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for building-streamlit-chat-ui

README.md
[![agentmods](https://agentmods.dev/badge/skills/iusztinpaul/designing-real-world-ai-agents-workshop/building-streamlit-chat-ui/github.svg)](https://agentmods.dev/skills/iusztinpaul/designing-real-world-ai-agents-workshop/building-streamlit-chat-ui)
Your own site
<a href="https://agentmods.dev/skills/iusztinpaul/designing-real-world-ai-agents-workshop/building-streamlit-chat-ui"><img src="https://agentmods.dev/badge/skills/iusztinpaul/designing-real-world-ai-agents-workshop/building-streamlit-chat-ui/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for building-streamlit-chat-ui

Your own site · 80×15
<a href="https://agentmods.dev/skills/iusztinpaul/designing-real-world-ai-agents-workshop/building-streamlit-chat-ui"><img src="https://agentmods.dev/badge/skills/iusztinpaul/designing-real-world-ai-agents-workshop/building-streamlit-chat-ui.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.01264
Opus 5 $0.00022 $0.00632
Sonnet 5 $0.00009 $0.00253
Haiku 4.5 $0.00004 $0.00126

Measured 12d ago against content hash 9c0011a1b340, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

building-streamlit-chat-ui scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/developing-with-streamlit/skills/building-streamlit-chat-ui/SKILL.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Streamlit chat interfaces

Build conversational UIs with Streamlit's chat elements.

Basic chat structure

import streamlit as st

if "messages" not in st.session_state:
    st.session_state.messages = []

# Display chat history
for msg in st.session_state.messages:
    with st.chat_message(msg["role"]):
        st.write(msg["content"])

# Handle new input
if prompt := st.chat_input("Ask a question"):
    st.session_state.messages.append({"role": "user", "content": prompt})

    with st.chat_message("user"):
        st.write(prompt)

    with st.chat_message("assistant"):
        response = get_response(prompt)  # Your LLM call
        st.write(response)

    st.session_state.messages.append({"role": "assistant", "content": response})

Streaming responses

Use st.write_stream for token-by-token display. Pass any generator that yields strings, including the OpenAI generator directly:

def get_streaming_response(prompt):
    # Replace with your LLM client (OpenAI, Anthropic, Cortex, etc.)
    for chunk in your_llm_client.stream(prompt):
        yield chunk

with st.chat_message("assistant"):
    response = st.write_stream(get_streaming_response(prompt))

st.session_state.messages.append({"role": "assistant", "content": response})

With OpenAI, you can pass the stream directly:

from openai import OpenAI

client = OpenAI()
with st.chat_message("assistant"):
    stream = client.chat.completions.create(
        model="gpt-4o",
        messages=st.session_state.messages,
        stream=True,
    )
    response = st.write_stream(stream)

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:

# With icons
with st.chat_message("assistant", avatar=":material/robot:"):
    st.write(assistant_message)

# With images
with st.chat_message("user", avatar="https://example.com/avatar.png"):
    st.write(user_message)

Read the full file on GitHub · 196 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 196 lines · 43 tokens per session scan A 9c0011a1b340

Subscribe to this mod's changes

building-streamlit-chat-ui is a skill published in the GitHub repository iusztinpaul/designing-real-world-ai-agents-workshop (505 stars, last pushed 3mo ago), licensed MIT. It adds 43 tokens to every session and 1,264 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dspy-streaming

Use when you need to stream LM output tokens to a frontend in real time — progressive responses, typing indicators, server-sent events, or WebSocket feeds. Common scenarios - streaming DSPy responses to a React UI, FastAPI SSE endpoint with DSPy, showing AI typing in a chat interface, streaming multi-field outputs…

lebsral/DSPy-Programming-not-prompting-LMs-skills · 190 tokens

painter

Draw clear, easy-to-understand architecture diagrams, flow charts, and feature explainer graphics from code, system architecture, or DevOps pipelines. Output is an HTML artifact (inline CSS and SVG) styled with a blue-white tech palette, flat vector icons, a card-based multi-step layout, flow arrows, and dark code…

qwedsazxc78/devops-ai-skill · 161 tokens

mediapipe-usage

Provides guidance for Google MediaPipe Pose Landmarker on web using @mediapipe/tasks-vision. Covers setup, landmark indices, running modes, and real-time video patterns. Use when working with MediaPipe, pose detection, body landmarks, or @mediapipe/tasks-vision.

liuchiawei/agent-skills · 63 tokens

LQF_Machine_Learning_Expert_Guide

LQF Machine Learning Expert Guide - Routed skill for ML/Statistical Modeling with Critical Discussion Mode. Triggers on: machine learning, modeling, prediction, training, classification, regression, clustering, deep learning, neural network, model evaluation, feature engineering, hyperparameter tuning, overfitting…

foryourhealth111-pixel/Vibe-Skills · 152 tokens

globe-gl

Use when implementing globe.gl (Globe.GL) for 3D globe data visualization with WebGL/ThreeJS, including setup, data layers (points, arcs, polygons, labels), and integration patterns in plain HTML or React.

MengTo/Skills · 51 tokens

top-design

Create award-winning, immersive web experiences at the level of Awwwards-featured agencies. Use when the user mentions "Awwwards quality", "make my site stunning", "scroll animations", "parallax storytelling", "cinematic web design", "portfolio site", or "brand experience". Also trigger when elevating a standard…

wondelai/skills · 113 tokens