算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
generate-logo【设计与创意】Generates on-brand, editable SVG logo assets — wordmark, monogram, and favicon — from the active brand profile, reusing its exact palette and heading font. Vector output needs no account, key, or network. Use when a user asks for a logo, wordmark, icon, monogram, or favicon. Trigger with "make a logo", "generate a wordmark", or "/brand-make logo".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: generate-logo description: | Generates on-brand, editable SVG logo assets — wordmark, monogram, and favicon — from the active brand profile, reusing its exact palette and heading font. Vector output needs no account, key, or network. Use when a user asks for a logo, wordmark, icon, monogram, or favicon. Trigger with "make a logo", "generate a wordmark", or "/brand-make logo". allowed-tools: Read, Write, Glob, Bash(node:*) argument-hint: '[logo text — defaults to the brand name]' version: "0.5.1" author: localplugins localplugins@proton.me license: MIT compatibility: Designed for Claude Code tags:
Generates on-brand, editable SVG logo assets — wordmark, monogram, and favicon — from the active brand profile as pure vector output.
The generate-logo skill turns a saved brand profile into three ready-to-use logo
variants that reuse the brand's exact palette and heading font. Output is vector SVG,
so every asset scales without loss and needs no account, key, or network call. The
generator (lib/logo.mjs) draws each variant deterministically; the skill resolves
the active profile, runs that generator, saves the files, and routes them through
review. Raster copies are produced only on demand through the /brand-export command.
/brand-new (a brand/ directory, or brands/[slug]/ with a brand/.active pointer). Read loads its color-system.json and typography.json.node lib/logo.mjs.output/ directory in the working repository.sharp dependency, only if PNG copies are wanted later.Run /brand-status (or resolveActive in lib/brand.mjs) to confirm which brand is active; if none exists, tell the user to run /brand-new and stop.
Use Glob to locate the active brand directory, then Read and validate the profile with validateProfile. Stop with the offending field if validation fails, for example a non-hex color.
Decide the logo text — the optional text argument, defaulting to the brand name. Ask the user when it is ambiguous.
Generate the three variants by running the deterministic node generator:
import { loadProfile } from '../../lib/brand.mjs';
import { buildLogos } from '../../lib/logo.mjs';
const profile = loadProfile(activeDir);
const { wordmark, monogram, favicon } = buildLogos(profile, { text: 'Northwind' });
Write each variant with the Write tool: output/[slug]-wordmark.svg, output/[slug]-monogram.svg, and output/[slug]-favicon.svg.
Hand the files to the visual-guardian subagent for a palette, contrast, and clear-space pass; apply its fixes or surface its flags.
Report the saved paths and describe each variant. To customize sizing or adapt the geometry, edit the SVG directly or consult the reference below.
Three SVG files under output/, one per variant:
output/northwind-wordmark.svg
output/northwind-monogram.svg
output/northwind-favicon.svg
[slug]-wordmark.svg — the brand name in the heading font with an accent mark (the everyday logo).[slug]-monogram.svg — one or two initials in a rounded square, for square or tight placements.[slug]-favicon.svg — a single initial at 64×64 for browser tabs and app icons.Each file carries role="img" and an aria-label, uses palette colors only, and embeds text that is HTML-escaped before it enters the markup. No PNGs are written unless the user runs /brand-export.
| Condition | Behavior |
|---|---|
| No active brand profile | Stop and direct the user to /brand-new; do not invent a palette. |
Profile fails validateProfile | Report the offending field (non-hex color, missing font family) and stop. |
| Logo text ambiguous | Ask the user; default to the brand name only when unambiguous. |
| Heading font unavailable at render time | The declared fallback in typography.json applies — flag the substitution, never mismatch silently. |
visual-guardian flags a contrast miss | Apply the fix or surface it; do not ship an asset below the profile's minContrast. |
To troubleshoot a bad render, verify the profile with /brand-status, then re-run the generator and re-check with the guardian.
Example — everyday wordmark
/brand-make wordmark logo
Resolves the active brand, builds all three variants, and reports output/northwind-wordmark.svg plus the monogram and favicon.
Example — monogram for an app icon
/brand-make a square monogram for our app icon
Generates the rounded-square monogram from the brand initials and hands it to the guardian for a clear-space check.
Example — validation stop
/brand-make logo
When color-system.json holds an invalid hex, the skill stops at step 2 and reports that field rather than emitting an off-brand asset.
references/logo-construction.md — variant geometry, clear-space rules, color roles, and accessibility notes the generator applies./brand-make command.