create-2d-composition

create-2d-composition is a skill for Claude Code from pjt222/agent-almanac. It costs 77 tokens per session (2,954 once invoked), scanned A, original, MIT.

A toolkit for creating two-dimensional graphics with code, including SVG vector drawings, image compositing, diagrams, charts, and infographics.

In plain words
What is it for?
Use it to generate diagrams, scientific figures, badges, icons, charts, templates, or batches of visual variations.
Why use it?
It helps produce repeatable graphics and automate work that would otherwise require manual drawing and editing.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the agent-almanac plugin — 122 skills, 76 agents shipped together

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.

agentmods
npx agentmods add skills/pjt222/agent-almanac/create-2d-composition
Any agent
npx skills add pjt222/agent-almanac --skill create-2d-composition
Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 76 agents.

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 create-2d-composition

README.md
[![agentmods](https://agentmods.dev/badge/skills/pjt222/agent-almanac/create-2d-composition.svg)](https://agentmods.dev/skills/pjt222/agent-almanac/create-2d-composition)
Your own site
<a href="https://agentmods.dev/skills/pjt222/agent-almanac/create-2d-composition"><img src="https://agentmods.dev/badge/skills/pjt222/agent-almanac/create-2d-composition.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,954 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00077 $0.02954
Opus 5 $0.00039 $0.01477
Sonnet 5 $0.00015 $0.00591
Haiku 4.5 $0.00008 $0.00295

Measured 2d ago against content hash cd51dcf871cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

create-2d-composition 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 2d 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.

i18n/caveman-lite/skills/create-2d-composition/SKILL.md · 418 lines

How it starts

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

Create 2D Composition

Generate 2D graphics programmatically using SVG construction, diagram layout algorithms, image compositing, and batch processing workflows. Covers vector graphics generation, raster image manipulation, typography, and automated production of charts, diagrams, and infographics.

When to Use

  • Generating diagrams, flowcharts, or infographics programmatically
  • Creating reproducible scientific figures or publication graphics
  • Automating production of badges, icons, or visual assets
  • Compositing multiple images or data visualizations
  • Building custom chart types not available in standard libraries
  • Batch generating graphics with parameter variations
  • Creating SVG templates for web or print applications

Inputs

Input Type Description Example
Layout specification Configuration Dimensions, margins, grid layout Canvas 800x600px, 20px margins
Visual elements Data/Assets Shapes, text, images, data points Rectangle coordinates, labels, icons
Style parameters CSS/Attributes Colors, fonts, stroke widths, opacity fill="#3366cc", stroke-width="2"
Data sources Files/Arrays Values to visualize or annotate CSV data, JSON configuration
Output format String SVG, PNG, PDF, composite formats output.svg, 300 DPI PNG

Procedure

1. Set Up Python Environment

Install required libraries for 2D composition:

# Core libraries
pip install svgwrite pillow cairosvg

# Optional: advanced features
pip install drawsvg reportlab pycairo

# For data-driven graphics
pip install matplotlib numpy pandas

Got: Libraries installed successfully If fail: Check Python version (3.7+), use virtual environment to avoid conflicts

2. Create Basic SVG Graphics

Generate SVG using svgwrite:

import svgwrite
from svgwrite import cm, mm

def create_basic_svg(output_path):
    """Create a simple SVG graphic."""
    # Initialize drawing (use mm for precise dimensions)
    dwg = svgwrite.Drawing(output_path, size=('180mm', '120mm'), profile='full')

    # Add background rectangle
    dwg.add(dwg.rect(
        insert=(0, 0),
        size=('100%', '100%'),
        fill='white'
    ))

    # Add shapes
    dwg.add(dwg.circle(
        center=(90*mm, 60*mm),
        r=30*mm,
        fill='lightblue',
        stroke='navy',
        stroke_width=2
    ))

    dwg.add(dwg.rect(
        insert=(30*mm, 30*mm),
        size=(60*mm, 40*mm),
        fill='lightgreen',
        stroke='darkgreen',
        stroke_width=2,
        rx=5,  # Rounded corners
        ry=5
    ))

    # Add text
    dwg.add(dwg.text(
        'Example Graphic',
        insert=(90*mm, 20*mm),
        text_anchor='middle',
        font_size='18pt',
        font_family='Arial',
        fill='black'
    ))

    dwg.save()
    print(f"Saved: {output_path}")

Read the full file on GitHub · 418 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. 2d ago First seen · 418 lines · 77 tokens per session scan A cd51dcf871cc

Subscribe to this mod's changes

create-2d-composition is a skill published in the GitHub repository pjt222/agent-almanac (32 stars, last pushed yesterday), licensed MIT. It adds 77 tokens to every session and 2,954 once invoked, about $0.0004 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

design-feature

Turn a raw idea or existing feature into a designed product SPEC by completing entity, integration, role, and expectation closure. Upserts never destroy recorded decisions. Triggers: "design-feature", "design this feature", "define product scope".

gtrabanco/agentic-workflow · 51 tokens

audit-pr

Audit a whole PR against the delivery contract and return MERGE-READY or evidenced blockers with the full URL. Consumes the current review-change REVIEW-PASS receipt instead of re-running review axes; posts a SHA-bound ready comment; never edits or merges. Triggers: "audit-pr", "is this PR ready", "merge gate".

gtrabanco/agentic-workflow · 71 tokens

plan-feature

Route designed features or issues into engineering planning and roadmap registration; undesigned work stops at design-feature. Supports --next, --from-issue, and --scaffold. Triggers: "plan-feature", "plan a feature", "plan the next roadmap feature", "create SPEC and TASKS".

gtrabanco/agentic-workflow · 66 tokens

product-audit

Audit the whole product across code, quality, process, docs, roadmap, and tooling. Persist one severity-ranked, F-numbered report with proposals; never fix or file work. Triggers: "product-audit", "audit the product", "full health check", "are we product-ready", "CTO review".

gtrabanco/agentic-workflow · 69 tokens

audit-docs

Audit cross-document coherence: docs ↔ roadmap ↔ code ↔ fix index ↔ issues. Finds drift — features in docs/ not in the roadmap (or vice versa), fix-index entries already merged/closed, broken documentation-map links, dependency cycles, artifacts in the wrong language, naming-convention violations — and reports them…

gtrabanco/agentic-workflow · 188 tokens

init-workspace

Adapt the workflow scaffold to a new repository or add only missing substrate blocks to an existing install. Every install, hook, and overwrite needs explicit consent. Triggers: "init-workspace", "set up agentic workflow", "upgrade workflow scaffold".

gtrabanco/agentic-workflow · 54 tokens