agentsclimarketplace

Image generation pillow

Skill cxcscmu/SkillLearnBench/skills/b1-one-shot-gemini-3-flash-preview/anthropic-poster-design/image-generation-pillow

[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.

Install
npx -y skills add cxcscmu/SkillLearnBench --skill image-generation-pillow

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Technical image generation using Python's Pillow library. Use this when you need to programmatically create diagrams, posters, or technical drawings.

SKILL.md

2.3 KB, as published. Nobody here has run it

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.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.