brand-yml
Skill557 starsChanged 38 days agoMITView on GitHub
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.
- Installs packages
4 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- BrightGold70/skillsedited, first seen Nov 8, 2026
- worldbank/geoPovLearnword for word, first seen Jun 1, 2026
- stephenturner/skillstheir own version, first seen Mar 26, 2026
- stephenturner/skill-brand-ymltheir own version, first seen Feb 24, 2026
Other versions4 projects use a version of this.
Word for word · 1
- worldbank/geoPovLearn★ 2100% same
Edited · 1
- BrightGold70/skills★ 195% same
Wrote their own version · 2
- stephenturner/skills★ 8same name
- stephenturner/skill-brand-yml★ 7same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
47 rules. 0 are common, 20 are distinctive, and 27 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
20
Distinctive
This author's own choices. Worth a look.
27
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Create and use _brand.yml files for consistent branding across Shiny applications and Quarto documents.
- Very specific: line 43
When creating _brand.yml files from brand guidelines:
- Distinctive: line 59
Start with the essential sections and add optional elements:
- Very specific: line 134
Follow these rules from references/brand-yml-spec.md:
- Distinctive: line 136
All fields are optional - only include what's needed
- Very specific: line 137
Use hex color format: "#0066cc"
- Distinctive: line 138
Prefer simple syntax (strings over objects) when possible
- Very specific: line 139
Use lowercase names with hyphens: brand-blue, success-green
- Very specific: line 151
All URLs include protocol (https://)
- Very specific: line 155
When modifying existing _brand.yml files:
- Distinctive: line 160
Preserve references: - if other colors/elements reference a name, update consistently
- Distinctive: line 161
Test integration: - verify changes apply correctly in Shiny/Quarto
- Very specific: line 164
Adding colors: Add to color.palette, then reference in semantic colors
- Very specific: line 165
Changing fonts: Update in typography.fonts, ensure weights/styles are available
- Very specific: line 166
Adding logo variants: Use light/dark structure for multiple variants
- Very specific: line 167
Light/dark mode: Add light and dark variants to colors
- Very specific: line 171
When the user wants to apply brand.yml to a Shiny for R app:
- Very specific: line 175
Automatic discovery: Place _brand.yml at app root
- Very specific: line 192
When the user wants to apply brand.yml to a Shiny for Python app:
- Very specific: line 220
When the user wants to apply brand.yml to Quarto documents:
- Very specific: line 223
Automatic discovery: Place _brand.yml at project root with _quarto.yml
- Very specific: line 225
Theme layering: Use brand keyword to control precedence
- Very specific: line 254
Verify file is named _brand.yml (with underscore)
- Distinctive: line 255
Check file location (app directory or parent directories)
- Very specific: line 260
Verify _brand.yml is at project root
- Very specific: line 261
Ensure _quarto.yml exists for project-level branding
- Distinctive: line 263
Check theme layering order if using custom themes
- Very specific: line 267
Ensure hex colors have quotes: "#0066cc" not #0066cc
- Distinctive: line 268
Verify color names match palette definitions exactly
- Distinctive: line 269
Check semantic colors (primary, success, etc.) reference valid palette names
- Distinctive: line 270
Ensure palette is defined before semantic colors
- Distinctive: line 274
Verify Google Fonts spelling and availability
- Distinctive: line 275
Check internet connection (required for Google Fonts)
- Very specific: line 276
Ensure source: google or source: bunny is specified
- Distinctive: line 277
Verify font family names match exactly in typography elements
- Distinctive: line 282
Check indentation (use spaces, not tabs)
- Very specific: line 283
Ensure hex colors have quotes: "#447099"
- Very specific: line 284
Verify colons have space after them: primary: blue
- Very specific: line 285
Check list items have hyphens: - family: Inter
- Distinctive: line 286
Use YAML validator if syntax issues persist
- Distinctive: line 301
Keep it concise: Only include fields directly relevant to the brand
- Distinctive: line 302
Prefer standard names: Use Bootstrap color names when possible (blue, green, red, etc.)
- Distinctive: line 304
Test across targets: Verify brand applies correctly in all intended formats
- Very specific: line 375
Read specification first: Always consult brand-yml-spec.md when creating or modifying files
- Distinctive: line 377
Validate incrementally: Start with minimal structure, test, then add complexity
- Very specific: line 379
Standard file name: Use _brand.yml for automatic discovery
- Distinctive: line 380
Explicit paths: Use custom file names only when necessary (shared branding, multiple variants)
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
brand.yml Skill
Create and use _brand.yml files for consistent branding across Shiny applications and Quarto documents.
What is brand.yml?
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:
- Colors - Palette and semantic colors (primary, success, warning, etc.)
- Typography - Fonts, sizes, weights, line heights
- Logos - Multiple sizes and light/dark variants
- Meta - Company name, links, identity information
File Naming Convention
- Standard name:
_brand.yml(auto-discovered by Shiny and Quarto) - Custom names: Any name like
company-brand.yml(requires explicit paths) - Location: Typically at project root, or in
_brand/orbrand/subdirectories
Decision Tree
Determine the user's goal and follow the appropriate workflow:
- Creating a new _brand.yml file? → Follow "Creating brand.yml Files"
- Using brand.yml in Shiny for R? → Read
references/shiny-r.md - Using brand.yml in Shiny for Python? → Read
references/shiny-python.md - Using brand.yml in Quarto? → Read
references/quarto.md - Using brand.yml in R (general)? → Read
references/brand-yml-in-r.md(R Markdown, theming functions, programmatic access) - Modifying existing _brand.yml? → Follow "Modifying Existing Files"
- Troubleshooting integration? → Follow "Troubleshooting"
Creating brand.yml Files
When creating _brand.yml files from brand guidelines:
Step 1: Gather Information
Collect brand information:
- Colors: Primary, secondary, accent colors with hex values
- Fonts: Font families and where they're sourced (Google Fonts, local files, etc.)
- Logos: Logo file paths or URLs for different sizes
- Company info: Name, website, social links (optional)
Step 2: Read the Specification
Load references/brand-yml-spec.md to understand the complete brand.yml structure, field options, and syntax.
Step 3: Build the File Incrementally
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: InterAdd 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 CodeAdd logos:
logo:
small: logos/icon.png
medium: logos/header.png
large: logos/full.svgAdd meta information:
meta:
name: Company Name
link: https://example.comStep 4: Apply Best Practices
Follow these rules from references/brand-yml-spec.md:
- All fields are optional - only include what's needed
- Use hex color format:
"#0066cc" - Prefer simple syntax (strings over objects) when possible
- Use lowercase names with hyphens:
brand-blue,success-green - Include
https://in all URLs - Define colors/fonts before referencing them
- For color ranges (shades/tints), choose the midpoint color
Step 5: Validate Structure
Check that:
- YAML syntax is valid (proper indentation, quotes on hex colors)
- Color references match palette names
- Font families are defined before use
- File paths are relative to
_brand.ymllocation - All URLs include protocol (
https://)
Modifying Existing Files
When modifying existing _brand.yml files:
- Read the current file to understand existing structure
- Consult brand-yml-spec.md for valid field options
- Maintain consistency with existing naming patterns
- Preserve references - if other colors/elements reference a name, update consistently
- Test integration - verify changes apply correctly in Shiny/Quarto
Common modifications:
- Adding colors: Add to
color.palette, then reference in semantic colors - Changing fonts: Update in
typography.fonts, ensure weights/styles are available - Adding logo variants: Use
light/darkstructure for multiple variants - Light/dark mode: Add
lightanddarkvariants to colors
Using with Shiny for R
When the user wants to apply brand.yml to a Shiny for R app:
- Read
references/shiny-r.mdfor complete integration guide - Key function:
bs_theme(brand = TRUE)orbs_theme(brand = "path") - Automatic discovery: Place
_brand.ymlat app root - Page functions: Works with
page_fluid(),page_sidebar(), etc.
Quick example:
library(shiny)
library(bslib)
ui <- page_fluid(
theme = bs_theme(brand = TRUE),
# ... UI elements
)Using with Shiny for Python
When the user wants to apply brand.yml to a Shiny for Python app:
- Read
references/shiny-python.mdfor complete integration guide - Key function:
ui.Theme.from_brand(__file__) - Automatic discovery: Place
_brand.ymlat app root - Installation: Requires
pip 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
)Using with Quarto
When the user wants to apply brand.yml to Quarto documents:
- Read
references/quarto.mdfor complete integration guide - Automatic discovery: Place
_brand.ymlat project root with_quarto.yml - Supported formats: HTML, dashboards, RevealJS, Typst PDFs
- Theme layering: Use
brandkeyword to control precedence
Quick example (document):
---
title: "My Document"
format:
html:
brand: _brand.yml
---Quick example (project in _quarto.yml):
project:
brand: _brand.yml
format:
html:
theme: defaultTroubleshooting
Brand Not Applying
Shiny:
- Verify file is named
_brand.yml(with underscore) - Check file location (app directory or parent directories)
- Try explicit path:
bs_theme(brand = "path/to/_brand.yml")orui.Theme.from_brand("path") - For Python: Ensure
libsassis installed
Quarto:
- Verify
_brand.ymlis at project root - Ensure
_quarto.ymlexists for project-level branding - Try explicit path in document frontmatter
- Check theme layering order if using custom themes
Colors Not Matching
- Ensure hex colors have quotes:
"#0066cc"not#0066cc - Verify color names match palette definitions exactly
- Check semantic colors (primary, success, etc.) reference valid palette names
- Ensure palette is defined before semantic colors
Fonts Not Loading
- Verify Google Fonts spelling and availability
- Check internet connection (required for Google Fonts)
- Ensure
source: googleorsource: bunnyis specified - Verify font family names match exactly in typography elements
- For Typst: Check font cache with
quarto typst fonts
YAML Syntax Errors
- Check indentation (use spaces, not tabs)
- Ensure hex colors have quotes:
"#447099" - Verify colons have space after them:
primary: blue - Check list items have hyphens:
- family: Inter - Use YAML validator if syntax issues persist
Reference Documentation
Load 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
Key Principles
- Start simple: Begin with colors and one font family
- Keep it concise: Only include fields directly relevant to the brand
- Prefer standard names: Use Bootstrap color names when possible (blue, green, red, etc.)
- Use automatic discovery: Name file
_brand.ymlfor auto-detection - Test across targets: Verify brand applies correctly in all intended formats
- Version control: Include
_brand.ymlin git repository
Common Patterns
Light/Dark Mode Colors
color:
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 Variants
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-whiteMultiple Font Weights
typography:
fonts:
- family: Inter
source: google
weight: [300, 400, 500, 600, 700]
style: [normal, italic]
base:
family: Inter
weight: 400
headings:
family: Inter
weight: 600Color Aliases
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-blueInclude 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.
Tips
- Read specification first: Always consult
brand-yml-spec.mdwhen creating or modifying files - Framework-specific guides: Load the appropriate reference (shiny-r.md, shiny-python.md, quarto.md) for integration details
- Validate incrementally: Start with minimal structure, test, then add complexity
- Use references: Define colors in palette, then reference by name in semantic colors
- Standard file name: Use
_brand.ymlfor automatic discovery - Explicit paths: Use custom file names only when necessary (shared branding, multiple variants)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

