算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
generate-social【设计与创意】Generates platform-sized, on-brand social templates as SVG from the active brand profile, with editable headline, subhead, and call-to-action zones. Vector output needs no account, key, or network. Use when a user asks for an Instagram post or story, an Open Graph or social card, a YouTube thumbnail, or a banner. Trigger with "make an Instagram post"…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: generate-social description: | Generates platform-sized, on-brand social templates as SVG from the active brand profile, with editable headline, subhead, and call-to-action zones. Vector output needs no account, key, or network. Use when a user asks for an Instagram post or story, an Open Graph or social card, a YouTube thumbnail, or a banner. Trigger with "make an Instagram post", "social card", or "/brand-make social". allowed-tools: Read, Write, Glob, Bash(node:*) argument-hint: '[platform] [headline] [optional subhead] [optional cta]' version: "0.5.1" author: localplugins localplugins@proton.me license: MIT compatibility: Designed for Claude Code tags:
Generates a platform-sized, on-brand social template as SVG from the active brand profile, with editable text zones the user can tweak afterward.
The generate-social skill turns a headline (and optional subhead and call-to-action)
into a correctly sized social graphic that uses the brand's palette and fonts. Output
is vector SVG, so it scales cleanly and needs no account, key, or network call. The
generator (lib/social.mjs) lays out a brand band, a wrapped headline, an optional
subhead, and an optional accent pill; the skill resolves the active profile, picks the
platform, runs the generator, and saves the file. For a photographic background behind
the template, the raster path lives in the generate-graphic skill.
/brand-new (a brand/ directory, or brands/[slug]/). Read loads its color-system.json and typography.json.node lib/social.mjs.output/ directory in the working repository.Run /brand-status to confirm the active brand; 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.
Choose the platform preset — instagram-square (default), instagram-story, og-card, or youtube-thumb. Ask the user when unspecified.
Generate the template by running the node generator:
import { loadProfile } from '../../lib/brand.mjs';
import { buildSocial } from '../../lib/social.mjs';
const profile = loadProfile(activeDir);
const { svg, platform } = buildSocial(profile, {
platform: 'instagram-square',
headline: 'We just raised our Series A',
subhead: 'Building the future of logistics',
cta: 'Read the story',
});
Write the result with the Write tool to output/[slug]-[platform].svg.
Hand the file to the visual-guardian subagent for a palette, contrast, and type pass; apply its fixes or surface its flags.
Report the saved path and point out the editable zones so the user can customize or adapt the copy: id="headline", id="subhead", and id="cta".
One SVG file under output/, named for the slug and platform:
output/northwind-instagram-square.svg
instagram-square).id="headline", id="subhead", id="cta" — that wrap automatically.| Condition | Behavior |
|---|---|
| No active brand profile | Stop and direct the user to /brand-new. |
Profile fails validateProfile | Report the offending field and stop. |
| Headline missing | Ask the user for the headline before generating. |
| Unknown platform requested | List the four supported presets and ask the user to pick one. |
| Headline too long for the canvas | The generator wraps text; verify the result and shorten copy if the guardian flags overflow. |
To troubleshoot a clipped layout, verify the copy length against references/platform-sizes.md, then re-run and re-check with the guardian.
Example — launch announcement post
/brand-make an instagram post announcing our Series A
Builds a 1080×1080 square with the brand band, a wrapped headline, and an accent call-to-action, saved as output/northwind-instagram-square.svg.
Example — link card
/brand-make an og card for the blog post
Generates a 1200×630 Open Graph card sized for link previews and hands it to the guardian.
Example — story cover
/brand-make an instagram story
Produces a 1080×1920 story, insetting text clear of the platform's top and bottom safe zones.
references/platform-sizes.md — every preset size, safe zones, the layout the generator produces, and how to add a preset./brand-make command.og-card targets.