Agent skill

Shiny Bslib

by posit-dev in posit-dev/skills

Build modern Shiny dashboards and applications using bslib (Bootstrap 5).

MITAuto-check passedFrontend & Design

Install Shiny Bslib

skills CLI
$ npx skills add posit-dev/skills --skill shiny-bslib -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install posit-dev/skills shiny-bslib --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/posit-dev/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/shiny/shiny-bslib .claude/skills/shiny-bslib && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
shiny-bslib
GitHub stars
529
Token cost
~2.5k tokens
SKILL.md length
817 words
Files
16 (incl. references)
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

Build modern Shiny dashboards and applications using bslib (Bootstrap 5).

  • Works in 7 steps: Choose page layout: page_sidebar()… → Add theme with bs_theme() (consider… → Create sidebar with inputs for… → …
  • Creating new Shiny apps
  • SKILL.md covers Quick Start, Core Concepts, Common Workflows and Guidelines, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Shiny Bslib is an agent skill from posit-dev/skills. Build modern Shiny dashboards and applications using bslib (Bootstrap 5). Use when creating new Shiny apps, modernizing legacy apps (fluidPage, fluidRow/column, tabsetPanel, wellPanel, shinythemes), or working with bslib page layouts, grid systems, cards, value boxes, navigation, sidebars, filling layouts, theming, accordions, tooltips, popovers, toasts, or bslib inputs. Assumes familiarity with basic Shiny.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 16 other files, including reference files (for example `references/accordions.md`, `references/best-practices.md` and `references/cards.md`).

It sits in Frontend & Design, covering Theming and dark mode. The repository describes itself as: A collection of Claude Skills from Posit. The licence is MIT.

When your agent uses it

  • Creating new Shiny apps
  • Modernizing legacy apps (fluidPage
  • FluidRow/column
  • Working with bslib page layouts

Example prompts

  • “/shiny-bslib”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Choose page layout: page_sidebar() (single-page) or page_navbar() (multi-page)
  2. Add theme with bs_theme() (consider Bootswatch for quick start)
  3. Create sidebar with inputs for filtering/controls
  4. Add value boxes at top for key metrics (set fill = FALSE on container)
  5. Arrange cards with layout_column_wrap() or layout_columns()
  6. Enable full_screen = TRUE on all visualization cards
  7. Add thematic::thematic_shiny() for plot theming

What it can do on your machine

Read from SKILL.md and the folder at commit 0300946. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are r).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • icons.getbootstrap.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Shiny Bslib loads about 2.5k tokens when it runs, and up to ~32k if it reads all its reference files. Until then it costs about 106 tokens; SKILL.md has 817 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~32k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from posit-dev/skills at commit 0300946, republished under its MIT licence (© posit-dev). 817 words, ~2,480 tokens.

Download SKILL.mdSave it as .claude/skills/shiny-bslib/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.
name
shiny-bslib
description
Build modern Shiny dashboards and applications using bslib (Bootstrap 5). Use when creating new Shiny apps, modernizing legacy apps (fluidPage, fluidRow/column, tabsetPanel, wellPanel, shinythemes), or working with bslib page layouts, grid systems, cards, value boxes, navigation, sidebars, filling layouts, theming, accordions, tooltips, popovers, toasts, or bslib inputs. Assumes familiarity with basic Shiny.
metadata.author
Garrick Aden-Buie (@gadenbuie)
metadata.version
1.0
license
MIT

Modern Shiny Apps with bslib

Build professional Shiny dashboards using bslib's Bootstrap 5 components and layouts. This skill focuses on modern UI/UX patterns that replace legacy Shiny approaches.

Quick Start

Single-page dashboard:

r
library(shiny)
library(bslib)

ui <- page_sidebar(
  title = "My Dashboard",
  theme = bs_theme(version = 5),  # "shiny" preset by default
  sidebar = sidebar(
    selectInput("variable", "Variable", choices = names(mtcars))
  ),
  layout_column_wrap(
    width = 1/3,
    fill = FALSE,
    value_box(title = "Users", value = "1,234", theme = "primary"),
    value_box(title = "Revenue", value = "$56K", theme = "success"),
    value_box(title = "Growth", value = "+18%", theme = "info")
  ),
  card(
    full_screen = TRUE,
    card_header("Plot"),
    plotOutput("plot")
  )
)

server <- function(input, output, session) {
  output$plot <- renderPlot({
    hist(mtcars[[input$variable]], main = input$variable)
  })
}

shinyApp(ui, server)

Multi-page dashboard:

r
ui <- page_navbar(
  title = "Analytics Platform",
  theme = bs_theme(version = 5),
  nav_panel("Overview", overview_ui),
  nav_panel("Analysis", analysis_ui),
  nav_panel("Reports", reports_ui)
)

Core Concepts

Page Layouts
  • page_sidebar() -- Single-page dashboard with sidebar (most common)
  • page_navbar() -- Multi-page app with top navigation bar
  • page_fillable() -- Viewport-filling layout for custom arrangements
  • page_fluid() -- Scrolling layout for long-form content

See page-layouts.md for detailed guidance.

Grid Systems
  • layout_column_wrap() -- Uniform grid with auto-wrapping (recommended for most cases)
  • layout_columns() -- 12-column Bootstrap grid with precise control

See grid-layouts.md for detailed guidance.

Cards

Primary container for dashboard content. Support headers, footers, multiple body sections, and full-screen expansion.

See cards.md for detailed guidance.

Value Boxes

Display key metrics and KPIs with optional icons, sparklines, and built-in theming.

See value-boxes.md for detailed guidance.

Navigation
  • Page-level: page_navbar() for multi-page apps
  • Component-level: navset_card_underline(), navset_tab(), navset_pill() for tabbed content

See navigation.md for detailed guidance.

Sidebars
  • Page-level: page_sidebar() or page_navbar(sidebar = ...)
  • Component-level: layout_sidebar() within cards
  • Supports conditional content, dynamic open/close, accordions
  • resizable = TRUE by default — users can drag the edge to resize on desktop

See sidebars.md for detailed guidance.

Filling Layouts

The fill system controls how components resize to fill available space. Key concepts: fillable containers, fill items, fill carriers. Fill activates when containers have defined heights.

See filling.md for detailed guidance.

Theming
  • bs_theme() with Bootswatch themes for quick styling
  • Custom colors: bg, fg, primary affect hundreds of CSS rules
  • Fonts: font_google() for typography
  • Dynamic theming: input_dark_mode() + session$setCurrentTheme()

See theming.md for detailed guidance.

UI Components
  • Accordions -- Collapsible sections, especially useful in sidebars
  • Tooltips -- Hover-triggered help text
  • Popovers -- Click-triggered containers for secondary UI/inputs
  • Toasts -- Temporary notification messages
  • Toolbars -- Compact horizontal strips of buttons, selects, and dividers for card headers and footers

See accordions.md, tooltips-popovers.md, toasts.md, and toolbars.md.

Icons

Recommended: bsicons package (Bootstrap Icons, designed for bslib):

r
bsicons::bs_icon("graph-up")
bsicons::bs_icon("people", size = "2em")

Browse icons: https://icons.getbootstrap.com/

Alternative: fontawesome package:

r
fontawesome::fa("envelope")

Accessibility for icon-only triggers: When an icon is used as the sole trigger for a tooltip, popover, or similar interactive element (no accompanying text), it must be accessible to screen readers. By default, icon packages mark icons as decorative (aria-hidden="true"), which hides them from assistive technology.

  • bsicons::bs_icon(): Provide title — this automatically sets a11y = "sem"
    r
    tooltip(
      bs_icon("info-circle", title = "More information"),
      "Tooltip content here"
    )
  • fontawesome::fa(): Set a11y = "sem" and provide title
    r
    tooltip(
      fa("circle-info", a11y = "sem", title = "More information"),
      "Tooltip content here"
    )

The title should describe the purpose of the trigger (e.g., "More information", "Settings"), not the icon itself (e.g., not "info circle icon").

Special Inputs
  • input_switch() -- Toggle switch (modern checkbox alternative)
  • input_dark_mode() -- Dark mode toggle
  • input_task_button() -- Button for long-running operations
  • input_code_editor() -- Code editor with syntax highlighting
  • input_submit_textarea() -- Textarea with explicit submission

See inputs.md for detailed guidance.

Common Workflows

Building a Dashboard
  1. Choose page layout: page_sidebar() (single-page) or page_navbar() (multi-page)
  2. Add theme with bs_theme() (consider Bootswatch for quick start)
  3. Create sidebar with inputs for filtering/controls
  4. Add value boxes at top for key metrics (set fill = FALSE on container)
  5. Arrange cards with layout_column_wrap() or layout_columns()
  6. Enable full_screen = TRUE on all visualization cards
  7. Add thematic::thematic_shiny() for plot theming
Show full SKILL.md (331 more words)Show less
Modernizing an Existing App

See migration.md for a complete mapping of legacy patterns to modern equivalents. Key steps:

  1. Replace fluidPage() with page_sidebar() or page_navbar()
  2. Replace fluidRow()/column() with layout_columns()
  3. Wrap outputs in card(full_screen = TRUE)
  4. Add theme = bs_theme(version = 5)
  5. Convert key metrics to value_box() components
  6. Replace tabsetPanel() with navset_card_underline()

Guidelines

  1. Prefer bslib page functions (page_sidebar(), page_navbar(), page_fillable(), page_fluid()) over legacy equivalents (fluidPage(), navbarPage())
  2. Use layout_column_wrap() or layout_columns() for grid layouts instead of fluidRow()/column(), which don't support filling layouts
  3. Wrap outputs in card(full_screen = TRUE) when building dashboards -- full-screen expansion is a high-value feature
  4. Set fill = FALSE on layout_column_wrap() containers holding value boxes (they shouldn't stretch to fill height)
  5. Pin Bootstrap version: include theme = bs_theme(version = 5) or a preset theme
  6. Use thematic::thematic_shiny() in the server so base R and ggplot2 plots match the app theme
  7. Use responsive widths like width = "250px" in layout_column_wrap() for auto-adjusting columns
  8. Group sidebar inputs with accordion() when sidebars have many controls
  9. See migration.md for mapping legacy Shiny patterns to modern bslib equivalents

Avoid Common Errors

  1. Avoid directly nesting card() containers. navset_card_*() functions are already cards; nav_panel() content goes directly inside them without wrapping in card()
  2. Only use layout_columns() and layout_column_wrap() for laying out multiple elements. Single children should be passed directly to their container functions.
  3. Never nest page_*() functions. Only use one top-level page function per app.

Reference Files

© posit-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 15 other files (references) in shiny/shiny-bslib of posit-dev/skills.

  • SKILL.md
  • references/accordions.md
  • references/best-practices.md
  • references/cards.md
  • references/filling.md
  • references/grid-layouts.md
  • references/inputs.md
  • references/migration.md
  • references/navigation.md
  • references/page-layouts.md
  • references/sidebars.md
  • references/theming.md
  • references/toasts.md
  • references/toolbars.md
  • references/tooltips-popovers.md
  • references/value-boxes.md

Open the folder on GitHubat commit 0300946

Compare with similar skills

Shiny Bslib next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Shiny Bslib compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shiny Bslib this skillposit-dev/skills529—~2.5kAutomated safety check: PassMIT
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0
Tailwindcss Developmentanonaddy/anonaddy4.9k10 repos~865Automated safety check: PassMIT
UI StylingOhh-889/skyroc79513 repos~2.5kAutomated safety check: PassMIT
MCP Developmentcoollabsio/coolify63k1 repos~949Automated safety check: PassMIT

Similar skills

  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed
  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed
  • MCP Development

    coollabsio/coolify

    A skill your agent uses for Laravel MCP development. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 1 repo~949 tokens
    Frontend & DesignAuto-check passed
  • UI UX Pro Max

    saoudi-h/solar-icons

    UI/UX design intelligence for web and mobile. An agent skill from saoudi-h/solar-icons.

    182 GitHub starsUsed in 18 repos~11k tokens
    Frontend & DesignAuto-check: notes

More from posit-dev/skills

All 17 skills in this repo
  • R CLI App

    posit-dev/skills

    Build command-line apps in R using the Rapp package. An agent skill from posit-dev/skills.

    529 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • R Lifecycle

    posit-dev/skills

    Guidance for managing R package lifecycle according to tidyverse principles using the lifecycle package.

    529 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • PR Create

    posit-dev/skills

    Creates a pull request from current changes, monitors GitHub CI, and debugs any failures until CI passes.

    529 GitHub stars~4.3k tokensUpdated today
    Auto-check: warnings
  • Shiny Bslib Theming

    posit-dev/skills

    Advanced theming for Shiny apps using bslib and Bootstrap 5.

    529 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Critical Code Reviewer

    posit-dev/skills

    Rigorously review code or pull requests for correctness, security, accessibility, maintainability, tests, and edge cases.

    529 GitHub stars~3.9k tokensUpdated today
    Auto-check passed
  • Deploy To Connect

    posit-dev/skills

    Deploy or publish Python and R content to a Posit Connect server using rsconnect-python or the R rsconnect package.

    529 GitHub stars~5k tokensUpdated today
    Auto-check: notes

Questions about Shiny Bslib

What does Shiny Bslib do?

Build modern Shiny dashboards and applications using bslib (Bootstrap 5). Shiny Bslib is an agent skill from posit-dev/skills. Build modern Shiny dashboards and applications using bslib (Bootstrap 5).

When should I use Shiny Bslib?

Shiny Bslib fits situations like: creating new Shiny apps; modernizing legacy apps (fluidPage; fluidRow/column; working with bslib page layouts.

How do I install Shiny Bslib in Claude Code?

Run `npx skills add posit-dev/skills --skill shiny-bslib -a claude-code`. Or copy the skill folder (shiny/shiny-bslib in posit-dev/skills) into .claude/skills/shiny-bslib in your project. Claude Code loads it when a task matches its description.

How do I install Shiny Bslib in Codex?

Run `npx skills add posit-dev/skills --skill shiny-bslib -a codex`. Or copy the skill folder (shiny/shiny-bslib in posit-dev/skills) into .agents/skills/shiny-bslib in your project. Codex loads it when a task matches its description.

Can I use Shiny Bslib in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add posit-dev/skills --skill shiny-bslib -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/shiny-bslib, .gemini/skills/shiny-bslib, .github/skills/shiny-bslib and .opencode/skills/shiny-bslib in your project.

What does Shiny Bslib need to run?

SKILL.md names no scripts, command-line tools or credentials: Shiny Bslib is instructions for the agent only.

Does Shiny Bslib access the network?

SKILL.md names 1 domain. As links in the text: icons.getbootstrap.com. This is read from the text; nothing was executed.

Is Shiny Bslib safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Shiny Bslib use?

Shiny Bslib is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shiny Bslib use?

About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 29k tokens, read only when the agent opens those files.

What are the alternatives to Shiny Bslib?

Skills that share tags, products or a category with Shiny Bslib: Impeccable (bestofjs/bestofjs, 3.1k stars), Figma Design System Builder (warpdotdev/warp, 65k stars), Tailwindcss Development (anonaddy/anonaddy, 4.9k stars) and UI Styling (Ohh-889/skyroc, 795 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shiny Bslib?

posit-dev (a GitHub organization) maintains it in posit-dev/skills, which has 529 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 6, 2026.

Source: posit-dev/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.