I taught Claude Code to draw finished graphics with pure code: posters, quote cards, carousel slides, even 3D product shots. No image model, no API key, nothing to pay. The text comes out perfect every time because it is real typography, not AI brush strokes. Both skills are free in one public repo, linked below.
Every finished graphic in this guide was made without a diffusion model (the tech behind Midjourney and DALL-E). No API was called. Claude Code wrote a Python script, and the script drew it, shape by shape, letter by letter. That's the whole trick, and it's more useful than it sounds.
I built these skills because I kept hitting the same wall: I'd ask an image model for a poster or a thumbnail, and it would give me beautiful pixels with garbage text on them. So I stopped asking AI to paint words and started asking it to write code that typesets them.
The result surprised me. For a whole category of graphics, the code version isn't a compromise. It's better.
Everything here ships in one public repo, linked at the end of this page. And teaching Claude Code your own playbooks like this is the exact pattern I build real products with in Build With AI 1.0 , so consider this guide a working sample of it.
Here's a test. I gave the same brief, a coffee shop logo in a warm palette, to three different systems. One of them is flux-1-schnell, a real AI image model. The other two are pure code.
If you had to look twice to spot the AI one, that's the point. For designed graphics, code holds its own against a diffusion model. And the two code versions bring things the AI one can't: run the script again and you get the exact same image, change one line and only that one thing changes, and the bill is zero forever.
The pipeline behind the two code versions is short:
A diffusion model is like commissioning a painter: you describe the picture and take whatever comes back. This is closer to a print shop. Claude lays out the file, the printer prints exactly that file, and you keep the file. Keeping the file is what changes editing, consistency, and cost.
Both skills are just folders you drop into .claude/skills/ in any project. Each holds a SKILL.md playbook that teaches Claude how to be a designer, plus the rendering engine the playbook drives. No accounts, no keys.
I use diffusion models. I even published a whole guide on generating them for free . But for design work, the kind of graphics a builder actually ships every week, they have four problems that code simply doesn't have.
None of this makes diffusion useless. It makes it the wrong tool for posters, quote cards, carousels, and thumbnails, which is most of what I actually need images for. I put the full decision rule in a table below .
The first skill is called prompt-to-design . It's a small design engine built on Pillow and numpy (fonts included, nothing to install beyond pip install pillow numpy ), plus a playbook that turns Claude into an art director. You ask for a graphic the way you'd ask a designer:
Claude reads the playbook and works through the same steps a designer would. It routes your prompt to a style (typographic, geometric, gradient, soft-minimal, or a poster scene), picks a 3-to-6 color palette, plans one focal element and where the negative space lives, assigns fonts by role, and then writes a short Python script against the engine:
Here's real output, straight from the repo. Four different prompts, four different styles, all drawn by scripts Claude wrote:
Notice what every one of these has in common: the words are crisp. That quote card is the exact use case where diffusion models fall apart, and here it's the easiest thing on the page, because "Build quietly." is a string passed to a font renderer, not a texture generated by a model.
My favorite part is the last step of the playbook: the skill is required to check its own work before showing you anything. It samples the pixels behind the text to confirm contrast, verifies each element actually landed where it should, and re-renders if something is off. You only ever see a checked image.
Want to try it on your own quote?
The full prompt-to-design skill (engine, fonts, playbook, reference examples) is part of my Claude Code image toolkit, one open repo. Clone it and drop the skill into .claude/skills/ .
The second skill, 3d-image-renderer , goes further. Instead of drawing a flat design, Claude builds an actual 3D scene in Three.js , the same library behind most 3D you see in a browser, then renders one frame of it headlessly. No browser window ever opens. Think of every image as frame 0 of an animation that never plays.
That gets you real lighting, real shadows, real depth, still with zero AI models involved:
Two details in this skill tell you it was built by someone who got burned first:
Level 2 has a heavier footprint than Level 1. It needs Node.js and a headless WebGL stack, which the skill installs for you with one setup script, and it renders at three fixed ratios (1:1, 16:9, 9:16). If you just want quote cards and thumbnails, start with Level 1 and come back when you need depth.
🧠New to Claude Code skills? A skill is a folder with an instructions file: a playbook you write once and Claude follows forever. It's the feature that turns Claude Code from an assistant into a worker with your standards. Going from "I get skills" to shipping a full product on this pattern is exactly what Build With AI 1.0 covers.
This is the rule I actually use. It's not "code good, AI bad". It's about which tool owns which job:
When the right answer is diffusion, you still don't need to pay for it. I run flux-1-schnell on Cloudflare's free tier, about 170 images a day at no cost, driven by the same kind of Claude Code skill. That's the sibling guide: How to Generate Unlimited AI Images for Free With Claude Code + Cloudflare . Between that guide and this one, you've got both halves covered for $0.
Everything on this page comes from my claude-image-generation toolkit, one public repo. Cloning it gets you all of it, not just these two skills:
The Claude Code image-generation toolkit
Every skill above, ready to drop into .claude/skills/ . Describe an image in the chat, get the file on disk. It is one open repo, so clone it and go.
Open the repo on GitHub →
The advanced payoff of this toolkit is the story pipeline: keeping the same character consistent across a whole illustrated, narrated story. That guide is live now: Consistent AI Characters: Build a Full Narrated Story in Claude Code .
You describe a picture in plain English and get a finished PNG, so from where you sit it behaves exactly like an image generator. The difference is what happens in the middle. A diffusion model predicts pixels. Here, Claude makes the design decisions (layout, palette, fonts, composition), writes a small program, and the program draws the pixels deterministically. The AI generates the code, not the image.
No, and it doesn't pretend to. Everything is built from gradients, geometry, typography, and 3D meshes, so the ceiling is stylized: designed graphics and low-poly 3D scenes, not photorealism. When you need a photo, use a diffusion model; I cover a completely free way to do that with Cloudflare Workers AI in the sibling guide .
Great at: posters, quote cards, carousel slides, thumbnails, wallpapers, geometric and gradient art, neon and synthwave pieces, soft product-style visuals, and low-poly 3D scenes like product shots and stylized landscapes. Anything with words is where it beats every image model, because the text is real typography. It cannot do photorealism, a specific real person's face, brand logos, or copyrighted characters.
No. Both skills run locally: Level 1 needs Python with Pillow and numpy, Level 2 needs Node.js, and neither calls any external API. There is no key to create, no credits to top up, and no daily cap. The only thing spending anything is Claude Code itself, which you already have open.
No. Claude writes all the code; you write sentences. Knowing a little helps when you want to art-direct a tweak by hand, but the normal loop is conversational: describe, look at the PNG, say what to change, and Claude edits the script and re-renders.
Yes, and this is the biggest win over a diffusion model. The image is a script, so "make the title smaller and move the orb left" is a two-line code edit that changes nothing else. Re-run it and every other pixel stays identical. With a diffusion model, a small change means generating again, and the new image comes back slightly different every time.
Strip away the pictures and this guide taught one move: encode your standards into a skill, and Claude Code executes them on demand, forever. Here the standard was "good design". In a real product it's your architecture, your API patterns, your deploy checklist, applied the same way.
That's what I cover in Build With AI 1.0 . The full course is 38 lessons that walk through:
Want the full system?
Now go draw something an image model can't.
Hasan Aboul Hasan builds open-source tools and teaches solo developers how to build, host, and sell AI-powered products. Founder of LearnWithHasan.com , creator of SimplerLLM and PyRunner .
The exact building blocks I use to ship real products with AI — yours as a free PDF.
Have a question? Ask it in the community — it's tagged #guide and linked back here. Reading is open to everyone; posting needs a free account.