example-generator

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

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 agents/galkahana/pdf-writer/example-generator
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.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.svg" alt="Measured on agentmods" 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. 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 $0.00020 $0.02702
Opus 5 $0.00010 $0.01351
Sonnet 5 $0.00004 $0.00540
Haiku 4.5 $0.00002 $0.00270

Measured 4d ago against content hash 45c01a2326bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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,021 stars, last pushed 2mo 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. 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.