Agent skill

PDF Generator

by jwynia in jwynia/agent-skills

Create and manipulate PDF files programmatically. An agent skill from jwynia/agent-skills.

MITAuto-check passedDocuments & Office

Install PDF Generator

skills CLI
$ npx skills add jwynia/agent-skills --skill pdf-generator -a claude-code

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

GitHub CLI
$ gh skill install jwynia/agent-skills pdf-generator --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/jwynia/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/general/document-processing/pdf/pdf-generator .claude/skills/pdf-generator && 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
pdf-generator
GitHub stars
170
Token cost
~2.4k tokens
SKILL.md length
594 words
Files
4 (incl. scripts)
Skills in repo
111
Repo updated
First seen
Licence
MIT

At a glance

Create and manipulate PDF files programmatically. An agent skill from jwynia/agent-skills.

  • Works in 2 steps: Template Mode: Modify existing PDF… → Scratch Mode: Create PDFs from nothing…
  • The user needs to generate PDFs
  • SKILL.md covers When to Use This Skill, Prerequisites, Quick Start and Instructions, plus 8 more sections
  • Runs TypeScript scripts from its folder; calls deno

What it does

PDF Generator is an agent skill from jwynia/agent-skills. Create and manipulate PDF files programmatically. Use when the user needs to generate PDFs, fill PDF forms, extract PDF content, add watermarks/overlays, or merge documents. Supports both template-based generation (form filling, overlays) and from-scratch creation. Keywords: PDF, document, form, fillable, merge, watermark, extract, text, report.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `scripts/analyze-template.ts`, `scripts/generate-from-template.ts` and `scripts/generate-scratch.ts`). Compatibility notes: Requires Deno with --allow-read, --allow-write permissions

It sits in Documents & Office, covering PDF and Forms and invoices. The licence is MIT.

When your agent uses it

  • The user needs to generate PDFs
  • Extract PDF content
  • Add watermarks/overlays
  • Merge documents

Example prompts

  • “/pdf-generator”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Requires Deno with --allow-read, --allow-write permissions

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Template Mode: Modify existing PDF templates
  2. Scratch Mode: Create PDFs from nothing using JSON specifications

What it can do on your machine

Read from SKILL.md and the folder at commit e02ec7e. 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 3 files in scripts/ (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • deno

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

  • Network

    Links to these hosts (documentation or services it may open):

    • deno.land

    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.

  • Compatibility

    Requires Deno with --allow-read, --allow-write permissions

    From compatibility in the SKILL.md frontmatter.

Context cost

PDF Generator loads about 2.4k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 594 words of instructions outside code blocks.

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

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 jwynia/agent-skills at commit e02ec7e, republished under its MIT licence (© jwynia). 594 words, ~2,429 tokens.

Download SKILL.mdSave it as .claude/skills/pdf-generator/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
pdf-generator
description
Create and manipulate PDF files programmatically. Use when the user needs to generate PDFs, fill PDF forms, extract PDF content, add watermarks/overlays, or merge documents. Supports both template-based generation (form filling, overlays) and from-scratch creation. Keywords: PDF, document, form, fillable, merge, watermark, extract, text, report.
compatibility
Requires Deno with --allow-read, --allow-write permissions
license
MIT
metadata.author
agent-skills
metadata.version
1.0
metadata.type
generator
metadata.mode
generative
metadata.domain
documents

PDF Generator

When to Use This Skill

Use this skill when:

  • Creating PDF documents programmatically from data or specifications
  • Filling PDF forms with dynamic data
  • Adding watermarks, stamps, or overlays to existing PDFs
  • Extracting text and metadata from PDF files
  • Merging multiple PDFs into one document
  • Analyzing PDF structure and form fields

Do NOT use this skill when:

  • User wants to open/view PDFs (use native PDF viewer)
  • Complex page layout with flowing text is needed (consider HTML-to-PDF tools)
  • Working with password-protected PDFs (limited support)
  • OCR is needed for scanned documents

Prerequisites

  • Deno installed (https://deno.land/)
  • Input PDF files for template-based operations
  • JSON specification for scratch generation

Quick Start

Two Modes of Operation
  1. Template Mode: Modify existing PDF templates

    • Fill form fields (text, checkbox, dropdown)
    • Add overlays (text, images, shapes)
    • Merge and combine PDFs
  2. Scratch Mode: Create PDFs from nothing using JSON specifications

Instructions

Mode 1: Template-Based Generation
Step 1a: Analyze the Template

Extract form fields and structure from an existing PDF:

bash
deno run --allow-read scripts/analyze-template.ts form-template.pdf > inventory.json

Output (inventory.json):

json
{
  "filename": "form-template.pdf",
  "pageCount": 2,
  "title": "Application Form",
  "author": "Company Inc",
  "pages": [
    { "pageNumber": 1, "width": 612, "height": 792, "text": "..." }
  ],
  "formFields": [
    { "name": "FullName", "type": "text", "value": "" },
    { "name": "Email", "type": "text", "value": "" },
    { "name": "AgreeToTerms", "type": "checkbox", "value": false }
  ],
  "placeholders": [
    { "tag": "{{DATE}}", "location": "page 1", "pageNumber": 1 }
  ],
  "hasFormFields": true
}
Step 1b: Create Fill Specification

Create form-data.json:

json
{
  "formFields": [
    { "name": "FullName", "value": "John Smith" },
    { "name": "Email", "value": "john@example.com" },
    { "name": "AgreeToTerms", "value": true }
  ],
  "flattenForm": true
}
Step 1c: Generate Filled PDF
bash
deno run --allow-read --allow-write scripts/generate-from-template.ts \
  form-template.pdf form-data.json filled-form.pdf
Adding Overlays (Watermarks, Stamps)

Create watermark-spec.json:

json
{
  "overlays": [
    {
      "type": "text",
      "page": 1,
      "x": 200,
      "y": 400,
      "text": "CONFIDENTIAL",
      "fontSize": 48,
      "color": { "r": 1, "g": 0, "b": 0 },
      "rotate": 45
    },
    {
      "type": "image",
      "page": 1,
      "x": 450,
      "y": 700,
      "path": "logo.png",
      "width": 100,
      "height": 50
    }
  ]
}
Merging PDFs

Create merge-spec.json:

json
{
  "prependPdfs": [
    { "path": "cover-page.pdf" }
  ],
  "appendPdfs": [
    { "path": "appendix-a.pdf", "pages": [1, 2, 3] },
    { "path": "appendix-b.pdf" }
  ],
  "excludePages": [5, 6]
}
Mode 2: From-Scratch Generation
Step 2a: Create Specification

Create spec.json:

json
{
  "title": "Quarterly Report",
  "author": "Finance Team",
  "pages": [
    {
      "size": "A4",
      "elements": [
        {
          "type": "text",
          "x": 50,
          "y": 750,
          "text": "Q4 2024 Financial Report",
          "fontSize": 28,
          "font": "HelveticaBold",
          "color": { "r": 0, "g": 0, "b": 0.5 }
        },
        {
          "type": "line",
          "startX": 50,
          "startY": 740,
          "endX": 550,
          "endY": 740,
          "thickness": 2
        },
        {
          "type": "text",
          "x": 50,
          "y": 700,
          "text": "Executive Summary",
          "fontSize": 18,
          "font": "HelveticaBold"
        },
        {
          "type": "text",
          "x": 50,
          "y": 670,
          "text": "This quarter showed strong growth across all divisions...",
          "fontSize": 12,
          "maxWidth": 500,
          "lineHeight": 16
        }
      ]
    }
  ]
}
Step 2b: Generate PDF
bash
deno run --allow-read --allow-write scripts/generate-scratch.ts spec.json output.pdf

Examples

Example 1: Fill Application Form

Scenario: Automatically fill a job application form.

bash
# 1. Analyze form to find field names
deno run --allow-read scripts/analyze-template.ts application.pdf --pretty

# 2. Create form-data.json with applicant info
# 3. Generate filled form
deno run --allow-read --allow-write scripts/generate-from-template.ts \
  application.pdf form-data.json john-smith-application.pdf
Example 2: Add Approval Stamp

Scenario: Add an "APPROVED" stamp to a document.

stamp-spec.json:

json
{
  "overlays": [
    {
      "type": "rectangle",
      "page": 1,
      "x": 400,
      "y": 700,
      "width": 150,
      "height": 50,
      "color": { "r": 0.9, "g": 1, "b": 0.9 }
    },
    {
      "type": "text",
      "page": 1,
      "x": 410,
      "y": 720,
      "text": "APPROVED",
      "fontSize": 20,
      "font": "HelveticaBold",
      "color": { "r": 0, "g": 0.5, "b": 0 }
    },
    {
      "type": "text",
      "page": 1,
      "x": 410,
      "y": 705,
      "text": "2024-12-15",
      "fontSize": 10
    }
  ]
}
Example 3: Create Report with Table

Scenario: Generate a simple report with a data table.

report-spec.json:

json
{
  "title": "Sales Report",
  "pages": [{
    "size": "Letter",
    "elements": [
      {
        "type": "text",
        "x": 72,
        "y": 720,
        "text": "Monthly Sales Report",
        "fontSize": 24,
        "font": "HelveticaBold"
      },
      {
        "type": "table",
        "x": 72,
        "y": 680,
        "rows": [
          ["Product", "Units", "Revenue"],
          ["Widget A", "150", "$15,000"],
          ["Widget B", "75", "$11,250"],
          ["Widget C", "200", "$8,000"]
        ],
        "columnWidths": [150, 80, 100],
        "rowHeight": 25,
        "headerBackground": { "r": 0.9, "g": 0.9, "b": 0.9 }
      }
    ]
  }]
}

Script Reference

ScriptPurposePermissions
analyze-template.tsExtract text, metadata, form fields from PDF--allow-read
generate-from-template.tsFill forms, add overlays, merge PDFs--allow-read --allow-write
generate-scratch.tsCreate PDF from JSON specification--allow-read --allow-write

Element Types (Scratch Mode)

TypeDescriptionKey Options
textText contentx, y, text, fontSize, font, color, rotate
imagePNG/JPEG imagesx, y, path, width, height, opacity
rectangleFilled/outlined rectanglesx, y, width, height, color, borderColor
lineStraight linesstartX, startY, endX, endY, thickness
circleFilled/outlined circlesx, y, radius, color, borderColor
tableBasic table layoutx, y, rows, columnWidths, rowHeight

Available Fonts

  • Helvetica (default)
  • HelveticaBold
  • HelveticaOblique
  • TimesRoman
  • TimesBold
  • Courier
  • CourierBold

Page Sizes

  • A4 (595.28 x 841.89 points)
  • Letter (612 x 792 points)
  • Legal (612 x 1008 points)
  • Custom: [width, height] in points
Show full SKILL.md (227 more words)Show less

Common Issues and Solutions

Issue: Form fields not found

Symptoms: Error saying field name doesn't exist.

Solution:

  1. Run analyze-template.ts to get exact field names
  2. Field names are case-sensitive
  3. Some PDFs have non-fillable text that looks like form fields
Issue: Text positioning is off

Symptoms: Text appears in wrong location.

Solution:

  • PDF coordinates start from bottom-left (0,0)
  • Y increases upward, X increases rightward
  • Use analyze-template.ts to see page dimensions
Issue: Images not appearing

Symptoms: Image overlay not visible.

Solution:

  1. Check file path is relative to spec.json location
  2. Verify image is PNG or JPEG format
  3. Ensure coordinates are within page bounds
Issue: Merged PDF has wrong page order

Symptoms: Pages appear in unexpected order.

Solution:

  • prependPdfs add pages before template
  • appendPdfs add pages after template
  • Use pages array to select specific pages: [1, 3, 5]

Limitations

  • No built-in table layout: Tables require manual column width specification
  • Standard fonts only: Custom font embedding not supported in scratch mode
  • No flowing text: Text doesn't automatically wrap to next page
  • Limited form field creation: Can fill existing forms, not create new fields
  • No encryption: Cannot create password-protected PDFs
  • Basic graphics: No gradients, patterns, or complex paths
  • Text extraction: May not work perfectly on all PDFs (depends on PDF structure)
  • pptx-generator: For creating PowerPoint presentations
  • docx-generator: For creating Word documents
  • xlsx-generator: For creating Excel spreadsheets

© jwynia, 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 3 other files (scripts) in skills/general/document-processing/pdf/pdf-generator of jwynia/agent-skills.

  • SKILL.md
  • scripts/analyze-template.ts
  • scripts/generate-from-template.ts
  • scripts/generate-scratch.ts

Open the folder on GitHubat commit e02ec7e

Compare with similar skills

PDF Generator 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.

PDF Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PDF Generator this skilljwynia/agent-skills170—~2.4kAutomated safety check: PassMIT
Code2mediatsingliuwin/autoclaw283—~956Automated safety check: PassMIT
Reportlabjimmc414/Kosmos5951 repos~4.2kAutomated safety check: PassNone
PDF ReadingWide-Moat/open-computer-use1261 repos~2.7kAutomated safety check: PassProprietary
PDF Processing Toolkittelagod/code-abyss244—~532Automated safety check: NotesMIT
Document Converter Suitedkyazzentwatwa/chatgpt-skills116—~386Automated safety check: PassNone

Similar skills

  • Code2media

    tsingliuwin/autoclaw

    Universal media renderer with no fixed template — any custom layout, size or style becomes pixel-perfect images (PNG/JPEG/WebP), vector SVG, paged PDFs or animations (WebP/GIF).

    283 GitHub stars~956 tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Reportlab

    jimmc414/Kosmos

    PDF generation toolkit. An agent skill from jimmc414/Kosmos.

    595 GitHub starsUsed in 1 repo~4.2k tokens
    Documents & OfficeAuto-check passed
  • PDF Reading

    Wide-Moat/open-computer-use

    A skill your agent uses when you need to read, inspect, or extract content from PDF files — especially when file content is NOT in your context and you need to read it from disk.

    126 GitHub starsUsed in 1 repo~2.7k tokens
    Documents & OfficeAuto-check passed
  • PDF Processing Toolkit

    telagod/code-abyss

    Picks the right Python library or CLI tool for a PDF task, text and table extraction, merging, splitting, OCR, watermarking or form filling, and points to a matching recipe.

    244 GitHub stars~532 tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • Document Converter Suite

    dkyazzentwatwa/chatgpt-skills

    Convert PDFs, Office docs, markdown, HTML, and tables between editable formats.

    116 GitHub stars~386 tokensUpdated 6 mo ago
    Documents & OfficeAuto-check passed
  • Create PDF

    theexperiencecompany/gaia

    Generate a polished, printable PDF: reports, letters, invoices, resumes, one-pagers.

    308 GitHub stars~1.3k tokensUpdated today
    Documents & OfficeAuto-check passed

More from jwynia/agent-skills

All 111 skills in this repo
  • Devcontainer

    jwynia/agent-skills

    Diagnose devcontainer configuration problems and guide development environment setup.

    170 GitHub stars~1.2k tokensUpdated 7 mo ago
    Auto-check: notes
  • Frontend Design

    jwynia/agent-skills

    Create distinctive, production-grade frontend interfaces with high design quality.

    170 GitHub stars~3.2k tokensUpdated 7 mo ago
    Auto-check passed
  • Gitea Workflow

    jwynia/agent-skills

    Orchestrate agile development workflows for Gitea repositories using the tea CLI.

    170 GitHub stars~3.8k tokensUpdated 7 mo ago
    Auto-check passed
  • Godot Asset Generator

    jwynia/agent-skills

    Generate game assets using AI image generation APIs (DALL-E, Replicate, fal.ai) and prepare them for Godot.

    170 GitHub stars~3.8k tokensUpdated 7 mo ago
    Auto-check passed
  • Mastra Hono

    jwynia/agent-skills

    Develop AI agents, tools, and workflows with Mastra v1 Beta and Hono servers.

    170 GitHub stars~2.9k tokensUpdated 7 mo ago
    Auto-check passed
  • PPTX Generator

    jwynia/agent-skills

    Create and manipulate PowerPoint PPTX files programmatically.

    170 GitHub stars~3.1k tokensUpdated 7 mo ago
    Auto-check passed

Questions about PDF Generator

What does PDF Generator do?

Create and manipulate PDF files programmatically. An agent skill from jwynia/agent-skills. PDF Generator is an agent skill from jwynia/agent-skills. Create and manipulate PDF files programmatically.

When should I use PDF Generator?

PDF Generator fits situations like: the user needs to generate PDFs; extract PDF content; add watermarks/overlays; merge documents.

How do I install PDF Generator in Claude Code?

Run `npx skills add jwynia/agent-skills --skill pdf-generator -a claude-code`. Or copy the skill folder (skills/general/document-processing/pdf/pdf-generator in jwynia/agent-skills) into .claude/skills/pdf-generator in your project. Claude Code loads it when a task matches its description.

How do I install PDF Generator in Codex?

Run `npx skills add jwynia/agent-skills --skill pdf-generator -a codex`. Or copy the skill folder (skills/general/document-processing/pdf/pdf-generator in jwynia/agent-skills) into .agents/skills/pdf-generator in your project. Codex loads it when a task matches its description.

Can I use PDF Generator 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 jwynia/agent-skills --skill pdf-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pdf-generator, .gemini/skills/pdf-generator, .github/skills/pdf-generator and .opencode/skills/pdf-generator in your project.

What does PDF Generator need to run?

Going by SKILL.md and its folder, PDF Generator needs TypeScript for the scripts in its folder and the command-line tools its instructions call (deno). Our summary lists: Node.js. Compatibility (from SKILL.md): Requires Deno with --allow-read, --allow-write permissions.

Does PDF Generator access the network?

SKILL.md names 1 domain. As links in the text: deno.land. This is read from the text; nothing was executed.

Is PDF Generator 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 PDF Generator use?

PDF Generator is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PDF Generator use?

About 2.4k tokens (SKILL.md is roughly 9.7k 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 PDF Generator?

Skills that share tags, products or a category with PDF Generator: Code2media (tsingliuwin/autoclaw, 283 stars), Reportlab (jimmc414/Kosmos, 595 stars), PDF Reading (Wide-Moat/open-computer-use, 126 stars) and PDF Processing Toolkit (telagod/code-abyss, 244 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PDF Generator?

jwynia (a GitHub user) maintains it in jwynia/agent-skills, which has 170 GitHub stars. The repository holds 111 skills in this directory. The repository was last updated on February 24, 2026.

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