New to Claude Skills? Learn how to install them →

jeremylongshore on GitHub

Generate Graphic

Free

Create on-brand marketing graphics effortlessly.

Get this skill

Free · Opens the source repo

What Generate Graphic does

The Generate Graphic skill allows users to produce high-quality marketing graphics tailored to their brand's identity. This skill utilizes an image model to generate visuals such as hero images, ad creatives, backgrounds, or textures, which can be further customized with a brand logo and a caption. It is particularly useful for designers and marketers who need to create visually appealing graphics without the hassle of manual design processes.

To use this skill, users must have a brand profile set up, which includes essential elements like color schemes and typography. The skill operates by building a brand-aware prompt that captures the essence of the brand, ensuring that the generated graphics align with the desired aesthetic. The process begins with verifying the necessary opt-in signals, followed by generating the image through a network call to an external provider. This ensures that the graphics are not only visually appealing but also consistent with the brand's guidelines.

Once the image is generated, users have the option to overlay their logo and a caption, creating a composite graphic that is ready for use in marketing campaigns. The skill emphasizes a clear separation between image content and text, ensuring that any text is added as a vector overlay rather than being baked into the image itself. This approach maintains the quality and legibility of the final output, which is crucial for professional branding.

Overall, the Generate Graphic skill is designed for users who require quick and efficient graphic generation while maintaining brand consistency. It streamlines the graphic creation process, making it an essential tool for those in marketing and design roles.

When to use it

Use this skill when you need to create a photographic or illustrative graphic that aligns with your brand's identity.

When not to use it

This skill is not suitable for generating text-heavy assets or when a vector-only solution is needed.

What you can build with it

Creating a Hero Image

Generate a visually appealing hero image for your website by using the command to make a graphic that fits your brand.

Designing Ad Creatives

Quickly create ad backgrounds that are consistent with your branding for use in marketing campaigns.

Branding for Social Media

Produce branded images for social media posts that maintain your visual identity and engage your audience.

How to install Generate Graphic

View source

1. Install with the skills CLI

npx skills add jeremylongshore/claude-code-plugins-plus-skills/generate-graphic --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by jeremylongshore

Generate Graphic

Generates an on-brand marketing graphic through an image model — the one opt-in feature that reaches the network — optionally stamped with the brand logo and a caption.

Overview

The generate-graphic skill is the opt-in raster engine. Everything else in brand-forge (logos, social, docs) stays vector and zero-permission; this skill is the only path that calls an external image provider, so it runs only when a user explicitly wants a photographic or illustrative graphic. The generator builds a brand-aware prompt with lib/raster.mjs, calls the provider with lib/genimage.mjs, and can composite a crisp vector logo and caption over the result with lib/composite.mjs. Text is deliberately kept out of the image and added as vector on top.

Prerequisites

  • An active brand profile created with /brand-new. Read loads its color-system.json, typography.json, and visual-identity.md.
  • Two opt-in signals, both required: BRAND_FORGE_RASTER=1 and a provider key (GEMINI_API_KEY by default, or OPENAI_API_KEY). The 30-preflight emitter surfaces this at session start.
  • Authentication: the provider api key is read from that environment variable and sent as a request header, never placed in the URL. No credentials are written to disk.
  • Node.js on the PATH and Write access to an output/ directory.

Instructions

  1. Verify both opt-in signals are set. If either is missing, stop, explain how to enable raster, and offer the vector path (generate-social or a template) instead, which needs neither.

  2. Use Glob to locate the active brand directory, then Read and validate the profile with validateProfile.

  3. Build the prompt with lib/raster.mjs (no network). It encodes the palette in words, the imagery style, and the tone, and turns the brand's don't-rules into an "Avoid:" clause. Warn the user when literal text is requested and route text-heavy work to the vector engine.

    import { loadProfile } from '../../lib/brand.mjs';
    import { buildRasterPrompt } from '../../lib/raster.mjs';
    const profile = loadProfile(activeDir);
    const prompt = buildRasterPrompt(profile, { subject: 'a mountain trail at dawn' });
    
  4. Generate the image (the network call). The provider is swappable and failures retry with backoff, never leaving a half-written file:

    import { generateImage } from '../../lib/genimage.mjs';
    await generateImage({ prompt, outPath: 'output/northwind-hero.png', provider: 'gemini' });
    
  5. Optionally composite the brand logo and a caption over the raster with lib/composite.mjs, which writes an SVG overlay referencing the PNG.

  6. Hand the result to the visual-guardian subagent for a palette and legibility pass. Write the final files and report the saved paths.

Output

A raster PNG under output/, plus an optional vector overlay:

output/northwind-hero.png
output/northwind-hero-overlay.svg
  • The PNG is the model's image, steered toward the brand palette, style, and tone.
  • The optional overlay is a small SVG that references the PNG and adds a crisp logo and caption. Flatten it to a single PNG with /brand-export.
  • Output is local files only — the skill never auto-posts or uploads.

Error Handling

ConditionBehavior
BRAND_FORGE_RASTER unsetStop; explain the opt-in and offer the vector alternative.
Provider key missingStop; name the expected environment variable and do not proceed.
User requests literal text in the imageWarn that models render text unreliably; route text to the vector engine.
Provider call failsRetry with backoff; if it still fails, report the error and leave no partial file.
Profile fails validateProfileReport the offending field and stop.

To troubleshoot a failed generation, verify the two opt-in signals with /brand-status, then re-run; check references/brand-raster-prompting.md to debug an off-brand result.

Examples

Example — hero background

/brand-make a hero image of a mountain trail at dawn

Builds a brand-aware prompt, generates output/northwind-hero.png, and offers to composite the logo over it.

Example — opt-in not enabled

/brand-make a photo background

With BRAND_FORGE_RASTER unset, the skill stops, explains how to enable raster, and offers a vector template instead.

Example — text routed to vector

/brand-make a graphic that says "Now hiring"

Warns that baked-in text renders poorly, generates the background here, and composes the words as a vector overlay on top.

Resources

  • references/brand-raster-prompting.md — how the prompt is built from the profile, why text stays out of the image, provider notes, and steering tips.
  • Sibling skills: generate-social and generate-doc-template for text-heavy, zero-permission assets — route between them with the /brand-make command.
  • Gemini image generation docs — the default provider's API.
  • Agent Skills documentation — how skills are authored and invoked.

Frequently asked questions about Generate Graphic

Similar skills