brand-yml/SKILL.md
Create and use brand.yml files for consistent branding across Shiny apps and Quarto documents. Covers: (1) Creating new _brand.yml files, (2) Applying to Shiny (R and Python), (3) Using in Quarto, (4) Modifying existing files, and (5) Troubleshooting. Includes complete specifications and integration guides.
npx skillsauth add posit-dev/skills brand-ymlInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create and use _brand.yml files for consistent branding across Shiny applications and Quarto documents.
brand.yml is a YAML-based format that translates brand guidelines into a machine-readable file usable across Shiny and Quarto. A single _brand.yml file defines:
_brand.yml (auto-discovered by Shiny and Quarto)company-brand.yml (requires explicit paths)_brand/ or brand/ subdirectoriesDetermine the user's goal and follow the appropriate workflow:
references/shiny-r.mdreferences/shiny-python.mdreferences/quarto.mdreferences/brand-yml-in-r.md (R Markdown, theming functions, programmatic access)When creating _brand.yml files from brand guidelines:
Collect brand information:
Load references/brand-yml-spec.md to understand the complete brand.yml structure, field options, and syntax.
Start with the essential sections and add optional elements:
Minimum viable _brand.yml:
color:
palette:
brand-blue: "#0066cc"
primary: brand-blue
background: "#ffffff"
typography:
fonts:
- family: Inter
source: google
weight: [400, 600]
base: Inter
Add colors as needed:
color:
palette:
brand-blue: "#0066cc"
brand-orange: "#ff6600"
brand-gray: "#666666"
primary: brand-blue
secondary: brand-gray
warning: brand-orange
foreground: "#333333"
background: "#ffffff"
Add typography details:
typography:
fonts:
- family: Inter
source: google
weight: [400, 600, 700]
style: [normal, italic]
- family: Fira Code
source: google
weight: [400, 500]
base:
family: Inter
size: 16px
line-height: 1.5
headings:
family: Inter
weight: 600
monospace: Fira Code
Add logos:
logo:
small: logos/icon.png
medium: logos/header.png
large: logos/full.svg
Add meta information:
meta:
name: Company Name
link: https://example.com
Follow these rules from references/brand-yml-spec.md:
"#0066cc"brand-blue, success-greenhttps:// in all URLsCheck that:
_brand.yml locationhttps://)When modifying existing _brand.yml files:
Common modifications:
color.palette, then reference in semantic colorstypography.fonts, ensure weights/styles are availablelight/dark structure for multiple variantslight and dark variants to colorsWhen the user wants to apply brand.yml to a Shiny for R app:
references/shiny-r.md for complete integration guidebs_theme(brand = TRUE) or bs_theme(brand = "path")_brand.yml at app rootpage_fluid(), page_sidebar(), etc.Quick example:
library(shiny)
library(bslib)
ui <- page_fluid(
theme = bs_theme(brand = TRUE),
# ... UI elements
)
When the user wants to apply brand.yml to a Shiny for Python app:
references/shiny-python.md for complete integration guideui.Theme.from_brand(__file__)_brand.yml at app rootpip install "shiny[theme]"Quick example (Shiny Express):
from shiny.express import ui
ui.page_opts(theme=ui.Theme.from_brand(__file__))
Quick example (Shiny Core):
from shiny import App, ui
app_ui = ui.page_fluid(
theme=ui.Theme.from_brand(__file__),
# ... UI elements
)
When the user wants to apply brand.yml to Quarto documents:
references/quarto.md for complete integration guide_brand.yml at project root with _quarto.ymlbrand keyword to control precedenceQuick example (document):
---
title: "My Document"
format:
html:
brand: _brand.yml
---
Quick example (project in _quarto.yml):
project:
brand: _brand.yml
format:
html:
theme: default
Shiny:
_brand.yml (with underscore)bs_theme(brand = "path/to/_brand.yml") or ui.Theme.from_brand("path")libsass is installedQuarto:
_brand.yml is at project root_quarto.yml exists for project-level branding"#0066cc" not #0066ccsource: google or source: bunny is specifiedquarto typst fonts"#447099"primary: blue- family: InterLoad these as needed for detailed information:
references/brand-yml-spec.md: Complete brand.yml specification with all sections, fields, examples, and validation rulesreferences/shiny-r.md: Using brand.yml with Shiny for R via bslib (bs_theme, automatic discovery, Shiny-specific integration)references/shiny-python.md: Using brand.yml with Shiny for Python via ui.Theme (from_brand(), installation, performance)references/quarto.md: Using brand.yml with Quarto (formats, light/dark mode, layering, extensions, Typst)references/brand-yml-in-r.md: General R usage including R Markdown integration, theming functions (ggplot2, gt, flextable, plotly, thematic), and programmatic brand access_brand.yml for auto-detection_brand.yml in git repositorycolor:
primary:
light: "#0066cc"
dark: "#3399ff"
background:
light: "#ffffff"
dark: "#1a1a1a"
foreground:
light: "#333333"
dark: "#e0e0e0"
Light/dark color modes were added in Quarto version 1.8 and currently are not supported in the R or Python brand.yml packages.
logo:
images:
logo-dark: logos/logo-dark.svg
logo-white: logos/logo-white.svg
icon: logos/icon.png
small: icon
medium:
light: logo-dark
dark: logo-white
typography:
fonts:
- family: Inter
source: google
weight: [300, 400, 500, 600, 700]
style: [normal, italic]
base:
family: Inter
weight: 400
headings:
family: Inter
weight: 600
color:
palette:
navy: "#003366"
ocean-blue: "#0066cc"
sky-blue: "#3399ff"
primary-color: ocean-blue # Alias
brand-blue: ocean-blue # Alias
blue: sky-blue # Alias for primary colors
primary: brand-blue
Include Bootstrap color names when possible, either defined directly or as aliases: blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, white, black. This is useful for consistency and these colors are picked up automatically by tools that use brand.yml.
brand-yml-spec.md when creating or modifying files_brand.yml for automatic discoverytools
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.
development
Review test code for quality, design, and completeness after implementing a feature or fixing a bug. Use when the user asks to "review my tests", "check my test quality", "are these tests good enough", "review testing", or after completing a feature implementation that includes tests. Also use when tests feel brittle, flaky, or superficial. Cross-references production code to find coverage gaps.
tools
Guide for drafting issue closure and decline responses as an open-source package maintainer. Use when helping compose a reply that says "no" to a feature request, closes an issue as won't-fix, redirects a user to a different package, explains why a design choice is intentional, or otherwise declines or closes a community contribution. Also use when the maintainer needs to explain a deprecation, point out a user misunderstanding, or communicate an effort/scope tradeoff to a contributor.
tools
R package development with devtools, testthat, and roxygen2. Use when the user is working on an R package, running tests, writing documentation, or building package infrastructure.