poster-maker
CLAUDE.md8 starsChanged 3 months agoMITView on GitHub
A marketing poster generator powered by Claude Code. Creates visually striking posters as single HTML/CSS files, exportable to PNG/PDF. Works for any type of poster — event flyers, product launches, conference talks, DJ gigs, meetups, sale announcements, or anything else. Think holistically before making CSS changes. Do NOT make random incremental margin/padding tweaks hoping something sticks. Instead:
The file
We split this CLAUDE.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 38
Always include @media print with -webkit-print-color-adjust: exact.
- Very specific: line 39
After creating/editing a poster, open it with open posters/<filename>.html.
- Very specific: line 40
Always take a Playwright screenshot: after creating/editing a poster: node scripts/screenshot.js posters/<filename>.html — then read the …
- Distinctive: line 49
Always include the fit-to-window script so the poster scales down in the browser for preview.
- Very specific: line 54
Use node scripts/screenshot.js posters/<file>.html to take a screenshot at the poster's dimensions (auto-detected from the HTML).
- Distinctive: line 59
Think holistically before making CSS changes: Do NOT make random incremental margin/padding tweaks hoping something sticks.
- Distinctive: line 65
Verify with Playwright screenshot: after every change — read the PNG and check it looks right before showing to user.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Poster Maker
Project Purpose
A marketing poster generator powered by Claude Code. Creates visually striking posters as single HTML/CSS files, exportable to PNG/PDF. Works for any type of poster — event flyers, product launches, conference talks, DJ gigs, meetups, sale announcements, or anything else.
Project Structure
posters/ HTML poster files (the output)
exports/ Exported PNG/PDF files (gitignored)
assets/ Images, logos, photos for use in posters
scripts/
export.js Playwright PNG/PDF export (auto-detects dimensions)
screenshot.js Playwright preview screenshots (auto-detects dimensions)
dimensions.js Shared body-CSS dimension parsing (px, mm, in)
screenshot-url.js Capture a LIVE URL at device viewports into assets/<slug>/ (GPU forced on for WebGL sites)
frame-screenshot.js Frame a screenshot on a social-ready canvas (screenshot-frame.html is its template)
remove-bg.py Background removal (requires rembg)
.claude/commands/
setup.md /setup — install dependencies and verify setup
new-poster.md /new-poster — generate a poster
export-poster.md /export-poster — export to PNG/PDF
remove-bg.md /remove-bg — remove image backgroundCommands
/new-poster— main command. Generates a poster from a description. See the command file for full design principles, font pairings, and image handling./export-poster— export a poster to PNG or PDF using Playwright./remove-bg— remove background from an image using rembg (Python). Installs on first use.
Key Rules
- Posters are single HTML files with all CSS inline — the only external references are Google Fonts and images from
assets/. - Body dimensions are the poster size (default 1080x1920) with no scroll/margin.
- Images go in
assets/, organized in subfolders per project (e.g.,assets/deep-frequencies/,assets/nexus-launch/). Referenced via relative paths from poster files (../assets/project-name/photo.jpg). - Always include
@media printwith-webkit-print-color-adjust: exact. - After creating/editing a poster, open it with
open posters/<filename>.html. - Always take a Playwright screenshot after creating/editing a poster:
node scripts/screenshot.js posters/<filename>.html— then read the PNG to visually verify the result before presenting to user. - Iterate with the user until they're happy, then offer export.
Social Media First
- Default format is Instagram Story (1080x1920) — optimized for social media viewing on phones, not print.
- Always ask the user at the start whether the poster is for social media or print — this determines safe zones and text sizing.
- For social media posters, follow the Instagram Safe Zone rules (see new-poster.md).
- Minimum text size: 24px for social media posters — anything smaller is unreadable on phone screens. Labels, captions, taglines all must be at least 24px.
- Always include the fit-to-window script so the poster scales down in the browser for preview.
Playwright Preview
- Playwright is installed (
npm installthennpx playwright install chromium). - Use
node scripts/screenshot.js posters/<file>.htmlto take a screenshot at the poster's dimensions (auto-detected from the HTML). - Screenshots save to
exports/<name>-preview.png. Always screenshot after creating/editing a poster — read the PNG to visually verify the layout before showing to the user.
Iteration Discipline — IMPORTANT
Think holistically before making CSS changes. Do NOT make random incremental margin/padding tweaks hoping something sticks. Instead:
- Understand the full layout first — calculate the total available space, how much each section takes, and where the remaining space goes. Map out the vertical zones (title zone, photo zone, info zone) with actual pixel values.
- Make intentional changes — when the user asks to "move something lower", think about WHY it's in the wrong position. Is it a padding issue? A flex distribution issue? A container size issue? Fix the root cause, not the symptom.
- Use flex spacers for layout distribution — instead of hardcoding margins, use
flex: 1spacers between major sections so space distributes naturally. Use weighted flex values (e.g.,flex: 1.8vsflex: 1) to bias distribution. - Never make multiple blind tweaks in a row — if the first tweak didn't work, stop and rethink the approach rather than trying another random value.
- Verify with Playwright screenshot after every change — read the PNG and check it looks right before showing to user.
Tech Stack
- HTML + CSS — poster content (no frameworks; the only JS in a poster is the fit-to-window preview script, which does not affect export)
- Google Fonts — typography
- Playwright — screenshot previews (
scripts/screenshot.js) and PNG/PDF export - Node.js — tooling (playwright, serve)
- Python — optional, for rembg background removal
- No build step — open HTML files directly in a browser
Example Posters
Users can generate any type of poster. Example styles:
- Euphoric EDM event flyer with bright gradients and light effects
- Clean minimal product launch with bold stats
- Elegant luxury invite with gold on black and serif type
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

