本文へ移動
cccskills
無料GitHub で公開日本語紹介

logo-composite

画像生成モデルにロゴを描かせず、ブランドキットの正規ロゴを生成画像へ合成する仕組みを説明し、テンプレートや背景レイヤーを使った配置を案内します。

原文原文の説明を見る

How the generate-then-composite pipeline puts a pixel-perfect canonical logo onto a generated image without letting the LLM regenerate the logo.

BuilderIO/agent-nativeスター 7,519(GitHub 7,519 + cccskills 0)
連携ツールGemini

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 生成画像に正規ロゴを加えたいとき
  • ロゴ合成付きテンプレートを設定したいとき
  • ブランド背景に被写体を配置したいとき
  • 商品画像のロゴ配置方法を検討するとき

日本語での紹介

できること

画像生成モデルにロゴを描かせず、ブランドキットに登録した正規ロゴを生成画像へ後から合成する流れを案内します。テンプレートにロゴ合成を設定すると、そのテンプレートで生成する画像にロゴを配置できます。単発の生成では、テンプレート設定を上書きして合成を指定する方法もあります。ロゴを含む前景レイヤーやブランド背景を持つテンプレートスケルトンにも対応し、背景・生成した被写体・前景を重ねて最終画像を構成します。ロゴの元画像がSVGなら、ベクター品質を保った合成が可能です。

こんなときに便利

ブランドロゴの形や文字を正確に保ったまま、告知画像や顧客向け画像を作りたいときに向いています。生成した被写体を既存のブランド背景に配置し、テンプレートとして繰り返し使う場合にも役立ちます。

使い方の例

  • 「このテンプレートで生成する画像に正規ロゴを合成して」
  • 「ブランド背景に生成した商品を配置して」
  • 「この画像にロゴを入れる設定方法を教えて」

注意点

正規ロゴの登録と、ブランドキットに関連付けたテンプレートが必要です。角への平面的な合成は、商品表面など曲面・遠近感のあるロゴ配置や、複数ロゴのシーンには適しません。こうした構図にはマスクを使ったテンプレートスケルトンが必要です。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(1)

  • SKILL.md7.8 KB

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 an associated-template option. A Template carries includeLogo (stored in its settings and surfaced as a first-class field). Global templates cannot enable it because a canonical logo belongs to a brand kit. When a generation resolves to an associated template with includeLogo: true, generate-image composites the logo. A generate call's own includeLogo arg, when passed, overrides the template for that run; when omitted, the template's value wins.
  3. Template skeletons generalize logo compositing. An associated template can 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.

Set includeLogo via create-template / update-template after associating the template with a brand kit. The *-generation-preset actions are deprecated aliases retained for existing threads. generate-image / generate-image-batch stamp the library's pixel-perfect canonical logo onto the result when the resolved template has it on, and it is a no-op if the library has no canonical logo. The model never draws the logo itself.

Template skeletons

Template skeletons live in settings.skeletonSpec on associated templates and are edited from /templates/:templateId. They composite a generated subject onto an uploaded brand background image and optional foreground layers.

settings.skeletonSpec is the prototype storage shape:

{
  background: { type: "asset"; assetId: string };
  mask?: { type: "asset"; assetId: string };
  contentMode: "fill" | "cutout";
  contentRegion?: { x: number; y: number; w: number; h: number };
  dropShadow?: boolean;
  foreground?: Array<{
    source: "canonicalLogo" | { assetId: string };
    x: number;
    y: number;
    w: number;
  }>;
}
  • The background is an uploaded or selected brand-library image asset. The compositor cover-fits it to the preset canvas and throws if the asset pixels are unavailable.
  • fill drops an opaque generation into the content region, so it works through the normal managed provider path.
  • When the resolved skeleton model is gpt-image-2, the action sends a managed edit/inpaint request instead of generate-then-composite: the uploaded plate is the edit_target, an optional same-size mask asset becomes the editable-area mask, and maskFromPlateAlpha() is only the fallback when no manual mask is set. Transparent mask pixels are editable, opaque pixels are sent as preserved regions, and the returned image is final. The manual mask or plate fallback must have transparent pixels.
  • Other cutout skeletons ask for an isolated transparent subject, force gpt-image-1, attach the background plate as a background_reference/composition reference, request background: "transparent" through the managed Builder image provider, and only fall back to OpenAI BYOK when the managed provider fails. They clamp only the provider subject ratio to 1:1, 2:3, or 3:2. The final skeleton canvas still uses the preset's requested aspect ratio.
  • The prompt envelope for cutout mode asks for an isolated subject on an empty transparent background. The gpt-image-2 inpaint branch instead asks the model to render the requested foreground content inside the mask's transparent/open region while preserving logos, text, framing, and other opaque plate content.
  • Background and foreground assetId values must belong to the selected brand kit and must be images.

When to use it

  • The user turned on "Composite canonical logo" on an associated template (the template then stamps the logo on every image made with it).
  • The agent infers the user wants the logo for a one-off (e.g. "make a hero with our brand logo") — pass includeLogo: true on that single generate call to override the template.
  • The image will appear in a customer-facing context where logo accuracy matters.

When NOT to use it

  • Logo on a product (a t-shirt mockup, a billboard scene, a coffee cup). Compositing onto a flat corner is fine; compositing onto a curved or perspective surface needs mask-based inpainting. Use a gpt-image-2 skeleton plate with transparent editable regions when that exact layout is required.
  • Multi-logo scenes (a partner-logo wall, a footer sponsor row). Same reason: use a prepared plate plus mask-inpaint skeleton, or ask the user to mock it up in design.

Setting a canonical logo

upload reference image (role: logo_reference, category: logo) →
set-canonical-logo --libraryId=<id> --assetId=<asset-id>

set-canonical-logo flips the asset's role to logo_reference AND its status to reference. This means the reference selector won't pick up generated logo candidates as canonical — only intentionally pinned uploads.

Sharp composite parameters (current defaults)

In image-processing.ts:compositeLogo():

  • Logo width: max(120, round(imageWidth * 0.16)) — ~16% of the image, but never smaller than 120 px.
  • Inset: max(24, round(min(width, height) * 0.035)) — ~3.5% of the smaller dimension, but never less than 24 px.
  • Position: upper-right (top: inset, left: width - logoWidth - inset).
  • Output format: PNG (preserves transparency).

If you change these, also update the corresponding language in the prompt envelope ("upper-right") so the LLM's clean area aligns with where Sharp will composite.

Why not in-image text?

The same logic applies to body and headline text. Image models still smear small letters and rearrange long strings. The Assets app's prompt envelope explicitly says:

Do not render headlines, body text, UI labels, or prompt wording inside the image unless the user explicitly asks for exact visible text.

Overlay text in HTML/CSS in the calling app (slides, design, mail) — it's more reliable, more accessible, and the user can edit it without re-running the generation.

Failure modes & detection

  • Gemini ignores the placeholder ask and renders something in the corner. The composite still works, but the hand-drawn-looking element underneath will peek out behind a transparent logo. Fix: re-roll, or ask the user to crop.
  • The canonical logo's transparency is lost on a non-PNG source. Fix: re-upload as PNG; SVG works too via Sharp's rasterization.
  • The user swaps a logo mid-generation. The action reads canonicalLogoAssetId at generate time, so racing here is rare; but the variant slot will reflect whichever logo was current when the call landed.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

a2a-assets

無料概要あり

複数のアプリやMCPホストからブランド画像・動画を生成、調整、書き出し、挿入する作業を支援します。ライブラリ選択や修正依頼も扱います。

  • スライド用のブランド画像を作りたいとき
  • 既存素材をフィードバックに合わせて直したいとき
  • 動画素材を生成して書き出したいとき
BuilderIO/agent-native7,5192026年10月26日 更新

account-health

無料概要あり

特定の顧客企業について、契約と製品利用の数値を照らし合わせ、根拠や不足情報を明記した健全性レポートをまとめます。

  • 顧客の健全性を確認したいとき
  • 契約席数と実利用を比べたいとき
  • 更新前に利用状況を整理したいとき
BuilderIO/agent-native7,5192026年10月26日 更新

actions

無料概要あり

アプリの操作をエージェントと画面の両方から呼び出せるアクションとして実装し、API連携や画面のデータ取得を一貫した形で追加するスキルです。

  • 新しいアプリ操作を追加したいとき
  • 外部APIと連携したいとき
  • 画面からデータを取得したいとき
BuilderIO/agent-native7,5192026年10月26日 更新

adding-a-feature

無料概要あり

新機能をUI・エージェント用アクション・説明資料・画面状態の4領域でそろえ、利用者とエージェントのどちらからも一貫して使えるようにするチェックリストです。

  • 新機能追加の作業範囲を整理したいとき
  • UIとエージェント操作をそろえたいとき
  • 画面状態の同期漏れを防ぎたいとき
BuilderIO/agent-native7,5192026年10月26日 更新

adhoc-analysis

無料概要あり

複数のデータソースを照合して、傾向や指標、根拠をまとめた分析結果を作成します。必要に応じて、再実行できるダッシュボードとして保存できます。

  • 商談と通話記録を照合したいとき
  • 顧客の利用状況を横断して調べたいとき
  • 繰り返し更新できる分析を保存したいとき
BuilderIO/agent-native7,5192026年10月26日 更新

admin-surfaces

無料概要あり

Analyticsの管理画面で、機能フラグの状態確認と切り替え、ダッシュボード利用状況の調査、接続先アプリのデータベース管理を行います。

  • アプリごとの機能フラグを確認・変更したいとき
  • ダッシュボードの所有者や利用状況を調べたいとき
  • 接続済みアプリのテーブルを管理したいとき
BuilderIO/agent-native7,5192026年10月26日 更新

BuilderIO のスキルをすべて見る

このスキルの問題を報告する