Streamlit Agent Skills

repository·main·Indexed 42 days ago

https://github.com/streamlit/agent-skills

A meta-skill repository that enables AI coding assistants such as Claude Code, Cursor, Copilot, and Gemini CLI to discover and use Streamlit-specific development skills. For Streamlit 1.58+, skills can be installed via the `streamlit skills` command. The `developing-with-streamlit` skill assists with creating, debugging, styling, and deploying apps by dynamically resolving reference documentation bundled within the Streamlit pip package (requires Streamlit >=1.57).

Tokens
1.7K
Snippets
8
Records
11
Agent score
3%

What's inside Streamlit Agent Skills

  1. How to use the Streamlit development skill

    main

    The developing-with-streamlit skill is designed to assist with all Streamlit-related tasks, including creating, editing, debugging, styling, theming, optimizing, and deploying apps. It also covers custom components (st.components.v2), HTML/JS/CSS work, and session state management.

    This skill works by discovering and loading version-matched reference documentation directly from the user's installed Streamlit package (requires Streamlit >=1.57). It is triggered by keywords such as streamlit, st., dashboard, app.py, beautify, style, CSS, theme, session state, cache, fragment, and custom component.

  2. What are Agent Skills and how do they work?

    main

    Agent Skills are specialized instruction sets that enhance AI coding assistants' capabilities for specific tasks.

    How it works:

    1. The Meta-Skill: This repository provides a 'meta-skill' (developing-with-streamlit) that acts as a bootstrap. It detects your active Python interpreter (virtualenv, conda, poetry, etc.) and locates the installed Streamlit package.
    2. Bundled Skills: Since Streamlit 1.57, the actual development skills (instructions for dashboards, themes, session state, etc.) are bundled directly inside the Streamlit pip package at <streamlit_path>/.agents/skills/.
    3. Dynamic Discovery: The meta-skill points the AI agent to these bundled files. This means if you upgrade Streamlit, the agent automatically uses the newer skills without needing to re-install the meta-skill.
  3. Install Streamlit skills for Gemini CLI

    main

    Install Streamlit skills using the gemini skills install command. By default, this installs to the user scope (~/.gemini/skills/). Use --scope workspace for a local project installation.

    # User scope (default)
    gemini skills install https://github.com/streamlit/agent-skills.git
    
    # Workspace scope
    gemini skills install https://github.com/streamlit/agent-skills.git --scope workspace
  4. Install Streamlit skills for GitHub Copilot

    main

    Use the GitHub CLI (gh) to install the Streamlit meta-skill. Use --scope user for a global installation or omit it to install to the current repository only.

    # Global installation
    gh skill install streamlit/agent-skills developing-with-streamlit --scope user
    
    # Version-pinned installation
    gh skill install streamlit/agent-skills developing-with-streamlit@v1 --scope user
  5. Install Streamlit skills for Claude Code

    main

    Claude Code does not currently have an official skills install CLI. To use Streamlit skills, clone the repository and manually copy the skill folder into your Claude skills directory.

    • User-level install: Copy to ~/.claude/skills/.
    • Project-level install: Copy to .claude/skills/ in your repository root.
    git clone https://github.com/streamlit/agent-skills.git
    cp -r agent-skills/developing-with-streamlit ~/.claude/skills/
  6. Run the Streamlit skill discovery script

    main

    To use the skill, you must run the discovery script pointing to your specific project directory. The script identifies your environment (via .venv, Pipfile, poetry.lock, pdm.lock, or uv.lock) to ensure the correct version of Streamlit documentation is loaded.

    Command Syntax:

    python <SKILL_DIR>/scripts/discover.py --project-dir <USER_PROJECT_DIR>

    Outputs:

    • Success (Exit 0): The script prints the path to the bundled SKILL.md on stdout. You should then read that file to access the topic-specific documentation located in the references/ folder.
    • Failure (Non-zero exit): The script prints an ERROR: block on stderr. Follow the specific instructions provided in the error message and re-run the command.
    python <SKILL_DIR>/scripts/discover.py --project-dir <USER_PROJECT_DIR>
  7. Install Streamlit skills for OpenAI Codex

    main

    Codex uses an interactive installer. Run the installer command from within an active Codex session and point it to the streamlit/agent-skills repository.

    $skill-installer
    # Then point the installer at: streamlit/agent-skills
  8. Install Streamlit skills via npx skills (Cross-agent)

    main

    Use the skills package (by Vercel Labs) to install Streamlit skills across multiple agents like Claude Code, Cursor, Copilot, and Gemini CLI with a single command.

    To install the meta-skill globally (user level) so it works for every project, use the -g flag. To install it only for the current project, omit the -g flag.

    # Install globally for all projects
    npx skills add streamlit/agent-skills -s developing-with-streamlit -g
  9. Install Streamlit Meta-Skill manually for Streamlit 1.57 or other agents

    main

    If you are on Streamlit 1.57 (which lacks the streamlit skills command) or are using an AI agent that doesn't support the built-in command, you must install the developing-with-streamlit meta-skill manually.

    Installing this at the user level is recommended because the meta-skill dynamically detects your active Python interpreter and locates the bundled skills inside your installed Streamlit package (<streamlit_path>/.agents/skills/). This allows one global installation to work across all your projects and Streamlit versions.

  10. Install Streamlit Agent Skills (Streamlit 1.58+)

    main

    If you are using Streamlit 1.58 or newer, use the built-in streamlit skills command. This command is idempotent and can be run at either the project level or the user/global level.

    • Project level: Symlinks bundled skills into your current project (under .agents/skills/ and .claude/skills/). This ensures skills stay in sync with your project's specific Streamlit version.
    • User/global level: Installs the meta-skill to your user account, allowing it to work across all projects by dynamically resolving skills against whichever Streamlit version is active in the current environment.

    Use the --yes flag to skip interactive prompts, which is useful for CI/CD or scripts.

    # Interactive installation
    streamlit skills
    
    # Non-interactive installation (e.g., for CI/CD)
    streamlit skills --yes