logo-composite
Installation
SKILL.md
Logo composite
LLMs — including Gemini Pro — degrade complex logos. They smear gradients, drop text, and rearrange elements. The Assets app sidesteps this entirely with a generate-then-composite pipeline that every serious brand-imagery system uses today.
How it works
- The library has a
canonicalLogoUrl(set viaset-canonical-logo --libraryId --assetId). The asset's role islogo_reference. - Logo compositing is a preset option. A generation preset carries
includeLogo(stored in the presetsettingsand surfaced as a first-class field). When a generation resolves to a preset withincludeLogo: true,generate-imagecomposites the logo. A generate call's ownincludeLogoarg, when passed, overrides the preset for that run; when omitted, the preset's value wins. - Preset skeletons generalize logo compositing. A preset can also carry
settings.skeletonSpec: background first, generated subject second, foreground layers last. If the skeleton already has aforegroundlayer withsource: "canonicalLogo",includeLogois treated as a no-op for that run so the logo is not stamped twice. If the skeleton does not include the logo andincludeLogois true, the existing canonical-logo layer is appended at the default upper-right position during compositing. - When logo compositing is on, the prompt envelope adds:
Leave a clean uncluttered area in the upper-right for the real brand logo; do not draw or approximate the logo yourself.
- Gemini returns an image with empty space in that corner.
compositeLogo()fromserver/lib/image-processing.ts(Sharp) loads the canonical logo PNG / SVG, resizes it to ~16% of the image width with reasonable inset, and composites it onto the generated image. Skeleton runs useapplyPresetSkeleton()at the same seam.- Output: the image with the actual logo, pixel-perfect, vector-quality if the source is SVG.
Preset skeletons
settings.skeletonSpec is the prototype storage shape: