Agent skill

Drawing With Pycairo

by oaustegard in oaustegard/claude-skills

Draws images, PDF/SVG vector files and animation frames with pycairo, and supplies what cairo lacks: shaped text for Arabic, Indic and other scripts, text along curves, blur/glow/drop shadows, path…

MITAuto-check passedMedia & Creative

Install Drawing With Pycairo

skills CLI
$ npx skills add oaustegard/claude-skills --skill drawing-with-pycairo -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install oaustegard/claude-skills drawing-with-pycairo --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/oaustegard/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/drawing-with-pycairo .claude/skills/drawing-with-pycairo && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
drawing-with-pycairo
GitHub stars
150
Token cost
~1.9k tokens
SKILL.md length
964 words
Files
5 (incl. scripts)
Skills in repo
67
Repo updated
First seen
Licence
MIT

At a glance

Draws images, PDF/SVG vector files and animation frames with pycairo, and supplies what cairo lacks: shaped text for Arabic, Indic and other scripts, text along curves, blur/glow/drop shadows, path…

  • Writing pycairo
  • SKILL.md covers Setup, Render, then look, What cairokit provides and Measured behaviour (800×600…, plus 2 more sections
  • Runs Python scripts from its folder; calls pip, python3 and ffmpeg
  • Cairo drawing code

What it does

Drawing With Pycairo is an agent skill from oaustegard/claude-skills. Draws images, PDF/SVG vector files and animation frames with pycairo, and supplies what cairo lacks: shaped text for Arabic, Indic and other scripts, text along curves, blur/glow/drop shadows, path booleans, stroke-to-outline, and Gouraud-shaded 3D. Use when writing pycairo or cairo drawing code, generative art, custom diagrams or posters rendered in Python, or when cairo output needs non-Latin text, soft effects, merged shapes or shaded surfaces.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `CHANGELOG.md`, `README.md` and `scripts/cairokit.py`).

It sits in Media & Creative, covering Generative and creative coding and Diagrams. It works with Python. The repository describes itself as: My collection of Claude skills. The licence is MIT.

When your agent uses it

  • Writing pycairo
  • Cairo drawing code
  • Custom diagrams
  • Posters rendered in Python

Example prompts

  • “Use the drawing-with-pycairo skill to draw images, PDF/SVG vector files and animation frames with pycairo, and supplies what cairo lacks: shaped…”
  • “/drawing-with-pycairo”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 90b0f1b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip
    • python3
    • ffmpeg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Drawing With Pycairo loads about 1.9k tokens when it runs. Until then it costs about 118 tokens; SKILL.md has 964 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~118
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from oaustegard/claude-skills at commit 90b0f1b, republished under its MIT licence (© oaustegard). 964 words, ~1,942 tokens.

Download SKILL.mdSave it as .claude/skills/drawing-with-pycairo/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
drawing-with-pycairo
description
Draws images, PDF/SVG vector files and animation frames with pycairo, and supplies what cairo lacks: shaped text for Arabic, Indic and other scripts, text along curves, blur/glow/drop shadows, path booleans, stroke-to-outline, and Gouraud-shaded 3D. Use when writing pycairo or cairo drawing code, generative art, custom diagrams or posters rendered in Python, or when cairo output needs non-Latin text, soft effects, merged shapes or shaded surfaces.
metadata.version
0.1.0

Drawing with pycairo

Cairo paints paths with solid colours, gradients, mesh gradients and images, and composites them with 20-odd operators. It writes PNG, PDF, SVG and PostScript. It does not shape text, filter pixels, combine paths, outline strokes, or do depth. scripts/cairokit.py fills each gap; scripts/selftest.py exercises all of it. Both were verified on pycairo 1.29.1 / cairo 1.18.0 / Python 3.11.

Setup

bash
pip install --break-system-packages pycairo numpy uharfbuzz fonttools skia-pathops
python3 /mnt/skills/user/drawing-with-pycairo/scripts/selftest.py /tmp/cairo-selftest

The self-test prints the cairo version, whether Pango is usable, per-panel timings, and the path of a 2×2 contact sheet. Read that sheet: panel A shows joined Arabic in green next to broken toy-API Arabic in red, B shows four boolean results and an outlined wave, C shows glow and a soft shadow, D shows a smooth-shaded torus. Then:

python
import sys; sys.path.insert(0, "/mnt/skills/user/drawing-with-pycairo/scripts")
from cairokit import *

In the environment where this was built, pycairo was not preinstalled. Pango was also absent: the system PyGObject was compiled for Python 3.12 while python3 was 3.11, and there were no Pango typelibs. pango() reports which case you are in.

Render, then look

Every render ends with a Read of the PNG before the next edit or before reporting. Exit codes and timings don't show visual bugs. In the session that produced this skill, looking caught five defects that ran without error:

  • a painter sort drawn near-to-far
  • inward normals combined with a light pointing away from the camera, which left a black knot
  • a scene scaled in absolute pixels, cropped once the frame size changed
  • glyphs crowding on a squashed spiral, because arc length was measured on the unsquashed curve
  • a stray hook where a polyline's first move_to wasn't its first sample

For several outputs, contact_sheet() tiles them so one Read covers all of them. For animation, extract two or three frames with ffmpeg -ss T -i out.mp4 -frames:v 1 f.png and read those.

What cairokit provides

needcall
surface + context with backgroundnew_image(w, h, bg)
ASCII caption on a boxlabel(c, text, x, y)
pixels as numpy (BGRA, premultiplied, live view)pixels(s), from_array(a), from_rgb_float(rgb)
blur, drop shadow, neon glowgauss_blur(a, sigma), blurred(s, sigma), glow(sharp)
shaped text for any script, as outlinesShaper(font_path).text_path(c, text, x, y, size)
text along a curveShaper.text_on_curve(c, text, polyline_walker(points), size)
union / intersection / difference / xorboolean(c, build_a, build_b, op)
outline of a strokestroke_to_path(c, width, cap, join)
perspective, depth sort, smooth shadingproject(P), painter_order(z), gouraud_mesh(quads, colors, order)
frames to MP4, many PNGs to one sheetframes_to_mp4(pattern, out), contact_sheet(files, out)
Pango availabilitypango() → (Pango, PangoCairo) or None

Find a font for a script with fc-match -f '%{file}' 'DejaVu Sans:lang=ar' (or fc-list :lang=hi family file). DejaVu Sans covers Arabic and Hebrew; FreeSans covers Devanagari.

Measured behaviour (800×600 unless noted)

thingresult
alpha circles, antialiased~58k/s (no-AA: ~139k/s)
one 200k-segment polyline stroke~1.0 s
ImageSurface max side32767; 32768 raises cairo.Error
glow(), two blur radii~240 ms
10k quads, flat fill_preserve+stroke~160 ms
10k quads, one gouraud_mesh()~125 ms (faster, and smooth)
animation frame, 10k-quad mesh at 640×480~130 ms
mesh gradient → PDFkept as vector (ShadingType 6/7)
mesh gradient → SVGrasterised to an embedded <image> (SVG has no mesh gradient)
10k flat quads → SVG vs PDF3.5 MB vs 0.36 MB

Cairo renders on one CPU core. For large batches or long animations, spread frames across processes with multiprocessing rather than threads.

Show full SKILL.md (430 more words)Show less

Behaviour that trips people

Text. show_text() / text_path() map codepoints to glyphs one by one, left to right, with no joining, reordering, ligatures or kerning. They are fine for ASCII labels. For anything else, use Pango if pango() returns modules, otherwise Shaper. Shaper does no line wrapping, no bidi across mixed-direction runs, and no font fallback: one font per call, and you split runs yourself.

Paths and the CTM. Path coordinates are transformed when they are appended, and the path is not part of the saved state. save(); scale(); <append>; restore(); fill() fills the transformed shape without distorting anything later. Line width, however, is transformed at stroke() time. Stroking inside a non-uniform scale() gives calligraphic, uneven lines, so restore first.

Pixels. ARGB32 memory is B,G,R,A per pixel, alpha-premultiplied, with rows get_stride() bytes apart. Call flush() before reading and mark_dirty() after writing. pixels() and from_array() handle this. Blurring premultiplied data is correct; un-premultiplying first gives dark fringes.

Seams. Two antialiased fills sharing an edge leave a faint line of background between them (conflation). Fixes: fill_preserve() plus a 0.5–0.7 px stroke in the same colour, or a single MeshPattern for the whole surface.

MeshPattern. Neighbouring Coons patches must use the identical curve for their shared edge. Generate each edge's control points in a canonical direction and reverse them for the other patch, or seams appear. Patches paint in insertion order, which is what makes gouraud_mesh() a painter's-algorithm renderer.

3D. There is no depth buffer. Sorting by mean depth fails when polygons interpenetrate or are long and thin across depth; subdividing helps. Use two-sided normals (flip toward the camera) unless the mesh orientation is known. Screen y points down, so a light "from the top left, toward the camera" is (-x, -y, -z) with camera-space +z pointing away.

skia-pathops. Round caps and joins produce conic segments, and simplify() rejects them; stroke_to_path() converts them to quadratics first. Any other pathops output passed to append_pathops() needs convertConicsToQuads() too.

Output. SVGSurface / PDFSurface must be finish()ed, or the file is truncated. RecordingSurface records once and replays at any scale or to any backend. Operators such as ADD, SCREEN, MULTIPLY and DIFFERENCE are on the context (set_operator). Float formats FORMAT_RGB96F / FORMAT_RGBA128F exist from cairo 1.18 for HDR-ish accumulation.

Route elsewhere

taskuse
data chartscharting (matplotlib/seaborn)
photo edits, resizing, format conversionprocessing-images
raster image to SVGimage-to-svg
illustrations or portraits from a promptinvoking-gemini
real 3D (occlusion, textures, >50k polygons)a rasteriser or ray tracer; cairo's painter approach stops being practical
polygon analysis (areas, buffers, spatial predicates)shapely; use skia-pathops when the result goes back into cairo as curves

© oaustegard, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts) in drawing-with-pycairo of oaustegard/claude-skills.

  • SKILL.md
  • CHANGELOG.md
  • README.md
  • scripts/cairokit.py
  • scripts/selftest.py

Open the folder on GitHubat commit 90b0f1b

Compare with similar skills

Drawing With Pycairo next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Drawing With Pycairo compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Drawing With Pycairo this skilloaustegard/claude-skills150—~1.9kAutomated safety check: PassMIT
PosterlyChenruishuo/posterly416—~4.6kAutomated safety check: NotesAGPL-3.0
Microsim Generatordmccreary/ibook-skills105—~11kAutomated safety check: PassNone
Visual Flow GifAI-Builder-Club/skills1.3k—~845Automated safety check: PassNone
Visual Designaws-samples/sample-strands-agent-with-agentcore195—~1.5kAutomated safety check: PassMIT
Poster Designeraipoch/medical-research-skills1.9k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Posterly

    Chenruishuo/posterly

    Create or revise academic conference posters in HTML/CSS and export print-ready PDFs.

    416 GitHub stars~4.6k tokensUpdated 4 days ago
    Media & CreativeAuto-check: notes
  • Microsim Generator

    dmccreary/ibook-skills

    Creates interactive educational MicroSims, routing to the best-matched generator - p5.js, Chart.js, Plotly, Mermaid, vis-network, timelines, maps, Venn, causal-loop/feedback-loop diagrams (CLD)…

    105 GitHub stars~11k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Visual Flow Gif

    AI-Builder-Club/skills

    Create animated flow diagrams from articles, workflow notes, architecture sketches, or process descriptions using a JSON specification and a local Python/Pillow renderer.

    1.3k GitHub stars~845 tokensUpdated 24 days ago
    Media & CreativeAuto-check passed
  • Visual Design

    aws-samples/sample-strands-agent-with-agentcore

    Official

    Use this skill any time the user needs a visual output as an image or PDF — charts, diagrams, posters, infographics, abstract artwork, or any visual design.

    195 GitHub stars~1.5k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Poster Designer

    aipoch/medical-research-skills

    Generate professional poster design concepts and optimized image-generation prompts, then automatically run a drawing script to produce the final poster image when a user needs a poster.

    1.9k GitHub stars~1.3k tokensUpdated 23 days ago
    Media & CreativeAuto-check passed
  • Day in My Life Agent Film

    heygen-com/hyperframes-community-skills

    Turns your local Claude Code session history into a 60 to 75 second hand-drawn ink film about a day with your agent, with a string score and your approval of every line.

    187 GitHub stars~1.7k tokensUpdated 11 days ago
    Media & CreativeAuto-check passed

More from oaustegard/claude-skills

All 67 skills in this repo
  • Vega-Lite Interactive Charts

    oaustegard/claude-skills

    Builds interactive Vega-Lite charts from uploaded data: analyzes the fields, picks five to ten fitting chart types, and produces a React artifact with the data embedded inline.

    150 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Single-File HTML Composer

    oaustegard/claude-skills

    Builds self-contained single-file HTML pages such as reports, decks, postmortems, flowcharts and prototypes from a small spec using a bundled Python composer and templates.

    150 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Deciding With Confidence

    oaustegard/claude-skills

    Routes, triages, flags and rates a piece of text with a probability for every option: which department or queue a ticket goes to, which intent a message expresses, whether a yes/no condition holds…

    150 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Declauding

    oaustegard/claude-skills

    Rewrites model-sounding prose into plain technical writing and checks that every claim survives, for PR text, docs, commit messages and similar drafts.

    150 GitHub stars~5.2k tokensUpdated today
    Auto-check passed
  • Preact Developer

    oaustegard/claude-skills

    Guides building standards-based Preact apps with native-first choices, HTM syntax, import maps and vendored ESM, from single-file demos to larger builds.

    150 GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Bluesky Zeitgeist Sampler

    oaustegard/claude-skills

    Deprecated sampler that captures short windows of the Bluesky firehose, clusters trending terms and builds an HTML report; replaced by the browsing-bluesky skill.

    150 GitHub stars~1.4k tokensUpdated today
    Auto-check passed

Works with

Questions about Drawing With Pycairo

What does Drawing With Pycairo do?

Draws images, PDF/SVG vector files and animation frames with pycairo, and supplies what cairo lacks: shaped text for Arabic, Indic and other scripts, text along curves, blur/glow/drop shadows, path…. Drawing With Pycairo is an agent skill from oaustegard/claude-skills. Draws images, PDF/SVG vector files and animation frames with pycairo, and supplies what cairo lacks: shaped text for Arabic, Indic and other scripts, text along curves, blur/glow/drop shadows, path booleans, stroke-to-outline, and Gouraud-shaded 3D.

When should I use Drawing With Pycairo?

Drawing With Pycairo fits situations like: writing pycairo; cairo drawing code; custom diagrams; posters rendered in Python.

How do I install Drawing With Pycairo in Claude Code?

Run `npx skills add oaustegard/claude-skills --skill drawing-with-pycairo -a claude-code`. Or copy the skill folder (drawing-with-pycairo in oaustegard/claude-skills) into .claude/skills/drawing-with-pycairo in your project. Claude Code loads it when a task matches its description.

How do I install Drawing With Pycairo in Codex?

Run `npx skills add oaustegard/claude-skills --skill drawing-with-pycairo -a codex`. Or copy the skill folder (drawing-with-pycairo in oaustegard/claude-skills) into .agents/skills/drawing-with-pycairo in your project. Codex loads it when a task matches its description.

Can I use Drawing With Pycairo in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oaustegard/claude-skills --skill drawing-with-pycairo -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/drawing-with-pycairo, .gemini/skills/drawing-with-pycairo, .github/skills/drawing-with-pycairo and .opencode/skills/drawing-with-pycairo in your project.

What does Drawing With Pycairo need to run?

Going by SKILL.md and its folder, Drawing With Pycairo needs Python for the scripts in its folder and the command-line tools its instructions call (pip, python3 and ffmpeg). Our summary lists: Python 3.

Does Drawing With Pycairo access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Drawing With Pycairo safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Drawing With Pycairo use?

Drawing With Pycairo is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Drawing With Pycairo use?

About 1.9k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Drawing With Pycairo?

Skills that share tags, products or a category with Drawing With Pycairo: Posterly (Chenruishuo/posterly, 416 stars), Microsim Generator (dmccreary/ibook-skills, 105 stars), Visual Flow Gif (AI-Builder-Club/skills, 1.3k stars) and Visual Design (aws-samples/sample-strands-agent-with-agentcore, 195 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Drawing With Pycairo?

oaustegard (a GitHub user) maintains it in oaustegard/claude-skills, which has 150 GitHub stars. The repository holds 67 skills in this directory. The repository was last updated on October 9, 2026.

Source: oaustegard/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.