image-generation-pillow

image-generation-pillow is a skill for Claude Code, Codex from cxcscmu/SkillLearnBench. It costs 31 tokens per session (643 once invoked), scanned A, original, MIT.

A Python guide for creating technical images with Pillow, a library for drawing and editing bitmap images.

In plain words
What is it for?
Use it to create canvases, geometric shapes, layered hardware illustrations, exploded views, and labels.
Why use it?
It provides patterns for making diagrams and annotated graphics directly from code instead of drawing each element by hand.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create canvases, geometric shapes, layered hardware illustrations, exploded views, and labels.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cxcscmu/skilllearnbench/image-generation-pillow
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cxcscmu/SkillLearnBench --skill image-generation-pillow
Clone the repo
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for image-generation-pillow

README.md
[![agentmods](https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/image-generation-pillow.svg)](https://agentmods.dev/skills/cxcscmu/skilllearnbench/image-generation-pillow)
Your own site
<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/image-generation-pillow"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/image-generation-pillow.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 643 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.00643
Opus 5 $0.00015 $0.00321
Sonnet 5 $0.00006 $0.00129
Haiku 4.5 $0.00003 $0.00064

Measured 3d ago against content hash 320dbeb51736, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

image-generation-pillow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/b1-one-shot-gemini-3-flash-preview/anthropic-poster-design/image-generation-pillow/SKILL.md · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Overview

Pillow (PIL) is a robust library for image processing and creation in Python. It's ideal for generating technical diagrams, exploded views, and annotated posters.

Installation

Ensure Pillow is installed in your environment:

pip install Pillow

Usage Patterns

Basic Canvas Setup

from PIL import Image, ImageDraw, ImageFont

# Create a blank canvas
width, height = 1200, 1600
background_color = (250, 249, 245)  # Anthropic Identity Light
image = Image.new('RGB', (width, height), background_color)
draw = ImageDraw.Draw(image)

Drawing Technical Shapes

Use draw.polygon, draw.rectangle, and draw.line to create exploded views. Parallelograms can represent layered hardware components.

def draw_hardware_layer(draw, top_left, size, color, offset=20):
    # top_left: (x, y)
    # size: (w, h)
    # color: (r, g, b)
    # Draw a 3D-like box
    x, y = top_left
    w, h = size
    # Base rectangle
    draw.rectangle([x, y, x + w, y + h], fill=color, outline=(20, 20, 19), width=2)

Exploded View Strategy

To create an exploded view, stack layers vertically with a consistent Y-offset and use leader lines for annotations.

layers = [
    {"name": "Casing", "color": (20, 20, 19)},
    {"name": "Thermal Unit", "color": (106, 155, 204)},
    {"name": "PCB", "color": (120, 140, 93)},
    {"name": "Battery", "color": (176, 174, 165)},
    {"name": "Interface", "color": (217, 119, 87)}
]

for i, layer in enumerate(layers):
    draw_hardware_layer(draw, (300, 200 + i * 200), (600, 100), layer['color'])

Annotations and Typography

# Load a font (ensure the font file exists or use a default)
try:
    font_heading = ImageFont.truetype("Poppins-Bold.ttf", 48)
except:
    font_heading = ImageFont.load_default()

draw.text((50, 50), "NOVA", fill=(20, 20, 19), font=font_heading)

Best Practices

  • Use high DPI (e.g., 300) for print-quality posters (multiply width/height accordingly).
  • Use ImageDraw.line with specific widths for leader lines.
  • Antialias lines by drawing at 2x size and resizing down.

Read the full file on GitHub · 74 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 74 lines · 31 tokens per session scan A 320dbeb51736

Subscribe to this mod's changes

image-generation-pillow is a skill published in the GitHub repository cxcscmu/SkillLearnBench (83 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 643 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

Ferramenta Python de Divisão de Áudio com GUI e FFmpeg Local

Cria um script Python completo com interface gráfica (Tkinter) para dividir arquivos de áudio em segmentos, utilizando um executável FFmpeg localizado na mesma pasta do script.

ECNU-ICALK/AutoSkill · 51 tokens

manimgl-best-practices

Trigger when: (1) User mentions "manimgl" or "ManimGL" or "3b1b manim", (2) Code contains from manimlib import , (3) User runs manimgl CLI commands, (4) Working with InteractiveScene, self.frame, self.embed(), ShowCreation(), or ManimGL-specific patterns. Best practices for ManimGL (Grant Sanderson's 3Blue1Brown…

calesthio/OpenMontage · 167 tokens

comfyui-node-registry

Authoring & publishing ComfyUI custom nodes to the Comfy Registry, covering node structure, pyproject.toml spec, comfy-cli publishing, and CI.

artokun/comfyui-mcp · 38 tokens

rdkit

Cheminformatics toolkit for fine-grained molecular control. SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure search, 2D/3D generation, similarity, reactions. For standard workflows with simpler interface, use datamol (wrapper around RDKit). Use rdkit for advanced control, custom…

benchflow-ai/skillsbench · 80 tokens

pcap-analysis

Guidance for analyzing network packet captures (PCAP files) and computing network statistics using Python, with tested utility functions.

benchflow-ai/skillsbench · 28 tokens

composing-with-pytheory

Compose music with PyTheory — chord progressions, melodies, basslines, drum grooves, and full multi-part arrangements written in pure Python and rendered to audio or MIDI. Use whenever the user wants to write, sketch, generate, or arrange music — "write me a bossa nova in G minor", "make a four-chord pop loop", "lay…

kennethreitz/pytheory · 138 tokens