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

  1. The library has a canonicalLogoUrl (set via set-canonical-logo --libraryId --assetId). The asset's role is logo_reference.
  2. Logo compositing is a preset option. A generation preset carries includeLogo (stored in the preset settings and surfaced as a first-class field). When a generation resolves to a preset with includeLogo: true, generate-image composites the logo. A generate call's own includeLogo arg, when passed, overrides the preset for that run; when omitted, the preset's value wins.
  3. 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 a foreground layer with source: "canonicalLogo", includeLogo is treated as a no-op for that run so the logo is not stamped twice. If the skeleton does not include the logo and includeLogo is true, the existing canonical-logo layer is appended at the default upper-right position during compositing.
  4. 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.

  5. Gemini returns an image with empty space in that corner.
  6. compositeLogo() from server/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 use applyPresetSkeleton() at the same seam.
  7. 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:

Installs
1
GitHub Stars
3.8K
First Seen
8 days ago
logo-composite — builderio/agent-native