skills/brand-setup/SKILL.md
Extract brand identity (fonts, colors, typography, spacing, favicons) from any URL and install fonts in an AEM Edge Delivery Services project via Adobe Fonts (Typekit) or Google Fonts. Detects fonts using 4 browser API layers (document.fonts, CSS import-rule walk, Performance API, computed style voting), then resolves via a 5-step cascade: system font, Typekit kit match, Adobe Fonts add-to-kit, Google Fonts fallback, or not-found. Updates head.html with font embed tags. Use when starting a site migration, setting up an EDS project, or extracting a site's visual identity. Triggers on: brand setup, brand extract, brand fonts, install fonts, configure brand.
npx skillsauth add catalan-adobe/skills brand-setupInstall 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.
Extract brand identity from a URL. Detect and install fonts in an EDS project via Adobe Fonts or Google Fonts. Extract colors, spacing, favicons.
Own scripts:
if [[ -n "${CLAUDE_SKILL_DIR:-}" ]]; then
BRAND_DIR="${CLAUDE_SKILL_DIR}/scripts"
else
BRAND_DIR="$(dirname "$(find ~/.claude \
-path "*/brand-setup/scripts/font-detect.js" \
-type f 2>/dev/null | head -1)" 2>/dev/null)"
fi
Sibling css-query.js (from migrate-header):
if [[ -n "${CLAUDE_SKILL_DIR:-}" ]]; then
CSS_QUERY="$(dirname "$CLAUDE_SKILL_DIR")/migrate-header/scripts/css-query.js"
else
CSS_QUERY="$(find ~/.claude \
-path "*/migrate-header/scripts/css-query.js" \
-type f 2>/dev/null | head -1)"
fi
Verify both paths exist before proceeding.
| Argument | Purpose |
|----------|---------|
| <url> | Target URL (required) |
| --kit=<kitId> | Typekit kit ID (default: detected from page, or cwm0xxe) |
| --no-configure | Extract only — skip EDS project configuration |
| --only=fonts | Detect and install fonts only, skip colors/spacing/favicons |
| --browser-recipe=<path> | Pass to css-query.js for bot-protected sites |
| --output=<path> | Output path for brand.json (default: ./brand.json) |
| --session=<name> | Playwright session name (default: brand-setup) |
| --dry-run | Preview font resolution without mutations |
| Variable | Purpose |
|----------|---------|
| ADOBE_FONTS_API_TOKEN | Typekit API token for adding fonts to kits. Get from fonts.adobe.com/account/tokens. Without this, fonts found in Adobe Fonts cannot be auto-added — falls through to Google Fonts. |
Set SESSION from --session (default: brand-setup), OUTPUT
from --output (default: ./brand.json).
node "$CSS_QUERY" open "$URL" --session="$SESSION"
If --browser-recipe was provided, add the flag. If the open fails,
suggest running browser-probe first to detect CDN bot protection.
Run the 4-layer font detection IIFE. This awaits document.fonts.ready
internally, so no separate wait step is needed.
node "$BRAND_DIR/font-detect.js" --session="$SESSION" \
--output=fonts-detected.json
Output: fonts-detected.json with body/heading fonts (by computed
style voting across all p/h1-h3 elements), loaded font families from
document.fonts, and source detection (Typekit kit ID via CSS import
rules, Google Fonts URLs, Performance API resource entries).
Resolve detected fonts through the 5-step cascade and update head.html:
node "$BRAND_DIR/font-install.js" \
--detected=fonts-detected.json \
--kit="$KIT_ID" \
--head-html=head.html
The --kit value comes from (in order of precedence):
--kit argumentfonts-detected.json → sources.typekit.kitId)cwm0xxeIf ADOBE_FONTS_API_TOKEN is set, fonts found in Adobe Fonts are
automatically added to the kit and published. Without the token, only
fonts already in the kit are used; others fall through to Google Fonts.
Add --dry-run to preview resolution without making changes.
If --only=fonts was passed, skip to Step 6 (close session) after
this step.
Run the DOM extraction for colors, spacing, heading sizes, and favicons:
node "$BRAND_DIR/brand-extract-dom.js" --session="$SESSION"
Output includes:
colors: background, text, link, linkHoverspacing: sectionPadding, contentMaxWidth, navHeightheadingSizes: h1→xxl through h6→xs with desktop font-sizefavicons: all icon links with URLs, sizes, typesMerge font detection + installation results with visual extraction:
{
"url": "<source URL>",
"fonts": {
"body": { "family": "...", "stack": "...", "delivery": "typekit" },
"heading": { "family": "...", "stack": "...", "delivery": "same-as-body" },
"headingSizes": { "xxl": { "desktop": "44px" } },
"sources": { "typekit": { "kitId": "...", "method": "css-import" } }
},
"colors": { "background": "...", "text": "...", "link": "...", "linkHover": "..." },
"spacing": { "sectionPadding": "...", "contentMaxWidth": "...", "navHeight": "..." },
"favicons": [{ "url": "...", "rel": "icon" }]
}
Write to $OUTPUT.
node "$CSS_QUERY" close --session="$SESSION"
Always close, even if earlier steps fail.
Skip if --no-configure was passed.
Detect EDS project by checking for fstab.yaml, scripts/aem.js, or
head.html in cwd. If none found, skip and report brand.json only.
Note: head.html font links were already added in Step 3 by font-install.js. This step handles the remaining configuration.
curl -sL "<favicon-url>" -o "<filename>"
:root {
--heading-font-family: "<heading stack>";
--body-font-family: "<body stack>";
--background-color: <background>;
--text-color: <text>;
--link-color: <link>;
--link-hover-color: <linkHover>;
--content-max-width: <contentMaxWidth>;
--section-padding: <sectionPadding>;
--nav-height: <navHeight>;
}
Only include properties with values.
Add @import url('brand.css'); as the very first line.
Idempotent — check before adding.
Brand extracted from <url>
Body font: <family> (<resolution>)
Heading font: <family> (<resolution>)
Typekit kit: <kitId> (published: yes/no)
Colors: bg=<bg> text=<text> link=<link>
Favicons: <count>
Output: <brand.json path>
browser-probe for recipetools
Reduce a webpage to a structural skeleton with semantic tokens. Two-phase pipeline: Phase 1 injects a browser script that tokenizes content ({TEXT}, {HEADING:n}, {IMAGE:WxH}, {CTA:label}, {LINK:label}, {INPUT:type}, {VIDEO}, {ICON}). Phase 2 applies LLM structural reasoning to collapse repeated patterns ({REPEAT:N}), remove decorative wrappers, strip utility classes, and produce skeleton.html + manifest.json. Use when migrating pages to EDS, analyzing page structure, extracting page blueprints, or preparing input for GenAI block generation. Triggers on: reduce page, page skeleton, page blueprint, extract structure, tokenize page, page reduction, structural skeleton, reduce URL.
tools
Capture a spatial hierarchy of rendered DOM elements from any webpage. Injects a pre-built script via playwright-cli that walks the DOM, detects layout grids, extracts backgrounds, prunes invisible nodes, promotes elements rendered outside their DOM parent (overlays, fixed navs, modals), and tags overlay nodes with occlusion metadata. Returns three outputs: LLM-friendly indented text, structured JSON tree, and a nodeMap mapping positional IDs to CSS selectors with background and overlay data. Use before page decomposition, overlay detection, brand extraction, or any workflow that needs structured page analysis. Triggers on: visual tree, capture tree, page structure, page hierarchy, DOM tree, capture visual, page analysis, extract tree.
tools
Summarize any video by analyzing both audio and visuals. Downloads via yt-dlp, extracts transcript (YouTube captions or Whisper), pulls scene-detected keyframes, and produces a multimodal summary with clickable timestamped YouTube links. Use this skill whenever the user wants to summarize a YouTube video, digest a talk or tutorial, get notes from a video, extract key points from a recording, or says things like "tl;dw", "summarize this video", "what's in this video", or pastes a YouTube URL and asks for a summary. Also triggers for non-YouTube URLs that yt-dlp supports.
development
Design and build web UIs with Adobe Spectrum 2 design system. Applies S2 layout principles, visual hierarchy, spacing, and component composition to produce accessible interfaces. Outputs vanilla CSS with Spectrum tokens (static pages) or Spectrum Web Components (interactive apps). Recommends tier based on complexity. Covers sp-theme setup, side-effect imports, overlay system, form patterns, --mod-* token customization, and 14 critical gotchas. Use for: spectrum 2 web, SWC, sp-button, sp-theme, build UI with spectrum, S2 layout, spectrum application, adobe design system, web component form, spectrum overlay.