PDF-Writer: Agent for Claude Code

.claude/agents/example-generator.md

example-generator is an agent for Claude Code from galkahana/PDF-Writer. It costs 20 tokens per session (2,702 once invoked), scanned B, original, Apache-2.0.

An agent that turns PDF-Writer feature requests from GitHub issues or emails into example test files. PDF-Writer is a software library for creating PDF documents.

In plain words
What is it for?
Use it with a GitHub issue or email request to research the library, create a working example, handle optional dependencies, and prepare a branch or draft pull request.
Why use it?
It helps determine whether a request is practical and produces examples that follow the project's existing patterns and can be checked by its tests.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is galkahana/PDF-Writer's own configuration. It tells Claude Code how to work on PDF-Writer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything PDF-Writer configures →

About the project

PDF-Writer is a C++ library for creating, modifying, and parsing PDF documents. It is for developers who need to work with PDF files in C++.

galkahana/PDF-Writer · 1,027 stars · on GitHub · pdfhummus.com

Reuse

Borrowing it

Nothing to install: this file belongs to galkahana/PDF-Writer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/galkahana/PDF-Writer/main/.claude/agents/example-generator.md
Clone the repo
git clone --depth 1 https://github.com/galkahana/PDF-Writer

Made for: Claude Code.

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 example-generator

README.md
[![agentmods](https://agentmods.dev/badge/agents/galkahana/pdf-writer/example-generator/github.svg)](https://agentmods.dev/agents/galkahana/pdf-writer/example-generator)
Your own site
<a href="https://agentmods.dev/agents/galkahana/pdf-writer/example-generator"><img src="https://agentmods.dev/badge/agents/galkahana/pdf-writer/example-generator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for example-generator

Your own site · 80×15
<a href="https://agentmods.dev/agents/galkahana/pdf-writer/example-generator"><img src="https://agentmods.dev/badge/agents/galkahana/pdf-writer/example-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,702 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00020 $0.02702
Opus 5.5 $0.00008 $0.01081
Sonnet 5.5 $0.00004 $0.00540
Haiku 4.5 $0.00002 $0.00270

Measured 2mo ago against content hash 45c01a2326bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

example-generator scanned grade B with 1 finding 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 2mo 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

tools: "*"
.claude/agents/example-generator.md · 234 lines

How it starts

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

PDF-Writer Example Generator Agent

You are a specialized agent for creating PDF-Writer example code. Your role is to take GitHub issues or email requests, evaluate feasibility, and generate working examples as test files with corresponding branches/PRs.

Capabilities

  • Parse PDF functionality requests from GitHub issues or email text
  • Assess scope and complexity to determine if example creation is reasonable
  • Research existing PDF-Writer codebase patterns and APIs
  • Generate test files following project conventions
  • Build, test, and verify examples work correctly
  • Create branches and draft PRs with examples
  • Handle conditional compilation for optional dependencies

Usage

Launch this agent with either:

  1. GitHub Issue URL: example-generator https://github.com/galkahana/PDF-Writer/issues/XXX
  2. Email Text: Paste the email content describing the requested functionality

Agent Specifications

Input Processing

  • GitHub Issues: Fetch issue content, parse request details, analyze existing comments/solutions
  • Email Text: Extract key requirements, identify requested PDF functionality, assess clarity

Scope Assessment

The agent evaluates requests on:

  • Complexity: Can it be demonstrated in a single test file?
  • API Coverage: Does PDF-Writer have the necessary APIs?
  • Dependencies: Are required features available or conditionally compiled?
  • Educational Value: Would this example help other users?

Reasonable Scope Examples:

  • Creating outlines/bookmarks
  • Image embedding and manipulation
  • Basic form creation and manipulation
  • Form Operations: Form filling, form flattening, querying data from filled forms
  • Annotation examples
  • Password/encryption demos
  • Color space examples
  • PDF modification and content extraction
  • Text rendering and font handling

Out of Scope Examples:

  • Major new library features
  • Complex multi-file examples
  • Platform-specific implementations
  • Requests requiring external libraries not already supported

Read the full file on GitHub · 234 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. 2mo ago First seen · 234 lines · 20 tokens per session scan B 45c01a2326bb

Subscribe to this mod's changes

example-generator is an agent published in the GitHub repository galkahana/PDF-Writer (1,027 stars, last pushed 23d ago), licensed Apache-2.0. It adds 20 tokens to every session and 2,702 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

report-generator

Use this agent when building the intelligence report synthesis layer — fusing multi-source findings into structured analyst reports, implementing confidence scoring, generating PDF/JSON exports, and designing the report data models. Examples: Context: Building the final output layer of the OSINT pipeline. user: "Build…

daemon-blockint-tech/Grond · 195 tokens

literature-extractor

Extracts findings from papers into the argument graph for a survey. Reads PDFs and records each finding as a proposition with the paper attached, returns a structured report. Never judges credibility and never writes the survey's synthesis conclusions.

yqi96/warranted · 49 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens