Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

brand-yml品牌 yml

Agent Skill

brand-yml 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,691

周安装

228

GitHub Stars

322

下载量

1,842
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:brand-yml(品牌 yml)
来源仓库:https://github.com/posit-dev/skills
仓库路径:skills/brand-yml
安装命令:
npx skills add https://github.com/posit-dev/skills --skill brand-yml
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/posit-dev/skills --skill brand-yml

简介

用于创建和使用 _brand.yml 文件,实现 Shiny 应用与 Quarto 文档的品牌一致性。

  • 适用于定义颜色、字体、徽标等视觉元素,并自动生成机器可读的品牌配置。
  • 支持跨平台使用,适合数据可视化项目中的品牌标准化管理。
  • 需确保文件命名符合规范(如 _brand.yml),并从 manifest.json 读取资产信息。
  • brand-yml 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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/ or brand/ subdirectories

Decision Tree

Determine the user's goal and follow the appropriate workflow:

  1. Creating a new _brand.yml file? → Follow "Creating brand.yml Files"
  2. Using brand.yml in Shiny for R? → Read references/shiny-r.md
  3. Using brand.yml in Shiny for Python? → Read references/shiny-python.md
  4. Using brand.yml in Quarto? → Read references/quarto.md
  5. Using brand.yml in R (general)? → Read references/brand-yml-in-r.md (R Markdown, theming functions, programmatic access)
  6. Modifying existing _brand.yml? → Follow "Modifying Existing Files"
  7. 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: 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

Step 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.yml location
  • All URLs include protocol (https://)

Modifying Existing Files

When modifying existing _brand.yml files:

  1. Read the current file to understand existing structure
  2. Consult brand-yml-spec.md for valid field options
  3. Maintain consistency with existing naming patterns
  4. Preserve references - if other colors/elements reference a name, update consistently
  5. 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/dark structure for multiple variants
  • Light/dark mode: Add light and dark variants to colors

Using with Shiny for R

When the user wants to apply brand.yml to a Shiny for R app:

  1. Read references/shiny-r.md for complete integration guide
  2. Key function: bs_theme(brand = TRUE) or bs_theme(brand = "path")
  3. Automatic discovery: Place _brand.yml at app root
  4. 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:

  1. Read references/shiny-python.md for complete integration guide
  2. Key function: ui.Theme.from_brand(__file__)
  3. Automatic discovery: Place _brand.yml at app root
  4. 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:

  1. Read references/quarto.md for complete integration guide
  2. Automatic discovery: Place _brand.yml at project root with _quarto.yml
  3. Supported formats: HTML, dashboards, RevealJS, Typst PDFs
  4. Theme layering: Use brand keyword 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: default

Troubleshooting

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") or ui.Theme.from_brand("path")
  • For Python: Ensure libsass is installed

Quarto:

  • Verify _brand.yml is at project root
  • Ensure _quarto.yml exists 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: google or source: bunny is 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 rules
  • references/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.yml for auto-detection
  • Test across targets: Verify brand applies correctly in all intended formats
  • Version control: Include _brand.yml in 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-white

Multiple 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: 600

Color 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-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.

Tips

  • Read specification first: Always consult brand-yml-spec.md when 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.yml for automatic discovery
  • Explicit paths: Use custom file names only when necessary (shared branding, multiple variants)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.66%
按下载量换算694

Claude

31.83%
按下载量换算586

Cursor

17.35%
按下载量换算320

Gemini CLI

8.34%
按下载量换算154

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills