How to Create Thumbnails and Graphics with Claude Code
Claude Code is a terminal-first tool, but the projects it helps with often need visual assets. Thumbnails for project READMEs, social preview images, blog post graphics, icon concepts — these come up regularly and usually require stepping outside your workflow. With AgentPatch connected, Claude Code can generate them in-session.
Why This Matters
Graphics for developer projects tend to have specific requirements: they need to match a technical aesthetic, be legible at small sizes, and ideally be consistent across a project or publication. Describing those requirements clearly in a prompt is something that translates well to Recraft, which supports illustration and vector-style output suited to this kind of work.
AgentPatch includes Recraft image generation through MCP. When Claude Code has this available, generating a thumbnail or graphic is a task you can include alongside everything else you’re asking it to do.
Setup
The AgentPatch CLI is designed for AI agents to use via shell access. Install it, and your agent can discover and invoke any tool on the marketplace.
Install (zero dependencies, Python 3.10+):
pip install agentpatch
Set your API key:
export AGENTPATCH_API_KEY=your_api_key
Example commands your agent will use:
ap search "web search"
ap run google-search --input '{"query": "test"}'
Get your API key from the AgentPatch dashboard.
Skill (Recommended)
Install the AgentPatch skill — it teaches Claude Code when to use AgentPatch and how to use the CLI:
/plugin marketplace add fullthom/agentpatch-claude-skill
/plugin install agentpatch@agentpatch
MCP Server (Alternative)
If you prefer raw MCP tool access instead of the skill:
claude mcp add -s user --transport http agentpatch https://agentpatch.ai/mcp \
--header "Authorization: Bearer YOUR_API_KEY"
Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard.
Example
You’re preparing an open-source project for a ProductHunt launch. You ask Claude Code:
“Generate a social preview image for our GitHub repository. The project is called ‘Forge’ — a CLI build tool. I want something clean and bold: a stylized anvil or forge graphic, dark background, orange accent color. Save it to
.github/social-preview.png.”
Claude Code calls Recraft through AgentPatch to generate the image and writes the file to the specified path. If you want to also update the README:
“Add an image reference to the top of the README pointing to
.github/social-preview.png.”
Claude Code handles that too, in the same session.
For blog thumbnails:
“I have posts in
content/posts/. For each post that doesn’t have athumbnailfield in its frontmatter, generate a thumbnail based on the post title. Use a consistent style: dark background, sans-serif typography treatment, minimal geometric graphic. Save topublic/thumbnails/and update frontmatter.”
Claude Code reads each post, calls Recraft for each thumbnail, saves the files, and updates frontmatter. A batch job that would take an hour manually runs in one request.
Wrapping Up
Thumbnail and graphic generation fits naturally into Claude Code’s project-aware workflow when AgentPatch provides the image tool. The same connection covers search, news, email, and more. Get your API key at agentpatch.ai.