# How to Create PDF Documents Using the PDF Skill in the Anthropics Repository

> Learn how to create PDF documents by implementing custom PDF generation with libraries like ReportLab or pdfkit within the anthropics skills repository.

- Repository: [Anthropic/skills](https://github.com/anthropics/skills)
- Tags: how-to-guide
- Published: 2026-02-16

---

**The anthropics/skills repository does not currently include a built-in PDF skill, so developers must implement custom PDF generation using libraries like ReportLab or pdfkit.**

The `anthropics/skills` GitHub repository serves as a collection of capabilities for AI-driven workflows, but it currently lacks native support to create PDF documents using a dedicated PDF skill. If your application requires PDF generation within this ecosystem, you will need to build a custom implementation using established PDF libraries appropriate for your runtime environment.

## Current State of the PDF Skill in anthropics/skills

A thorough examination of the repository reveals that the `anthropics/skills` codebase does not contain any source files implementing PDF generation functionality. The repository currently contains only internal metadata files:

- [`opencode.json`](https://github.com/anthropics/skills/blob/main/opencode.json) — Metadata used by the Opencode platform
- [`.cache_meta.json`](https://github.com/anthropics/skills/blob/main/.cache_meta.json) — Cache metadata for internal tooling

No Python modules, JavaScript files, or other language implementations exposing a PDF skill API are present in the file tree. Consequently, there are no built-in classes, functions, or commands available to invoke for producing PDF documents from this codebase.

## How to Create PDF Documents Using Custom Implementation

Since the repository lacks native PDF capabilities, you must add custom PDF generation to your skill workflow. The implementation approach depends on your runtime environment:

1. **Python environments** — Use the `ReportLab` library for robust PDF generation
2. **Node.js environments** — Use the `pdfkit` package for streaming PDF creation

Both approaches require installing the respective package and implementing a generation function that your skill can invoke.

### Python Implementation with ReportLab

For Python-based skills, `ReportLab` provides comprehensive tools to create PDF documents programmatically. Install the library using `pip install reportlab`, then implement a generation function:

```python
from reportlab.lib.pagesizes import LETTER
from reportlab.pdfgen import canvas

def generate_pdf(text: str, output_path: str) -> None:
    c = canvas.Canvas(output_path, pagesize=LETTER)
    width, height = LETTER
    c.drawString(72, height - 72, text)
    c.showPage()
    c.save()

```

This function creates a single-page PDF with the specified text positioned at the top margin. You can extend this implementation to add multiple pages, custom fonts, or complex layouts by utilizing `ReportLab`'s `Platypus` page layout engine.

### Node.js Implementation with pdfkit

For JavaScript or TypeScript skills running in Node.js environments, `pdfkit` offers a streaming approach to PDF generation. Install the package using `npm install pdfkit`, then create a generation function:

```javascript
const PDFDocument = require('pdfkit')
const fs = require('fs')

function generatePdf(text, outputPath) {
  const doc = new PDFDocument()
  const stream = fs.createWriteStream(outputPath)
  doc.pipe(stream)
  doc.text(text, {margin: 72})
  doc.end()
}

```

This implementation pipes the PDF output directly to the filesystem, minimizing memory overhead for large documents. The `margin` option ensures proper page margins, and you can chain additional method calls to add images, vector graphics, or multiple text blocks.

## Integrating Custom PDF Generation into Your Skill Workflow

After implementing your chosen PDF generation method, integrate it into your skill by:

1. **Adding the dependency** to your skill's [`requirements.txt`](https://github.com/anthropics/skills/blob/main/requirements.txt) (Python) or [`package.json`](https://github.com/anthropics/skills/blob/main/package.json) (Node.js)
2. **Importing the generation function** into your skill's main handler file
3. **Invoking the function** when your skill logic requires PDF output, passing the appropriate content and output path

Since the `anthropics/skills` repository does not provide a standardized PDF skill interface, you maintain full control over the PDF structure, styling, and output location through your custom implementation.

## Summary

- The `anthropics/skills` repository currently contains no built-in PDF skill or source files for PDF generation
- Only metadata files ([`opencode.json`](https://github.com/anthropics/skills/blob/main/opencode.json), [`.cache_meta.json`](https://github.com/anthropics/skills/blob/main/.cache_meta.json)) exist in the repository root
- To create PDF documents, you must implement custom solutions using `ReportLab` for Python or `pdfkit` for Node.js
- Both libraries provide programmatic APIs to generate single or multi-page PDFs with custom text and layouts

## Frequently Asked Questions

### Does the anthropics/skills repository include a built-in PDF skill?

No, the repository does not currently include any built-in PDF skill. The codebase only contains internal metadata files such as [`opencode.json`](https://github.com/anthropics/skills/blob/main/opencode.json) and [`.cache_meta.json`](https://github.com/anthropics/skills/blob/main/.cache_meta.json), with no Python, JavaScript, or other implementation files that provide PDF generation capabilities.

### What libraries should I use to create PDF documents for a skill in this repository?

For Python-based skills, use **ReportLab**, which provides comprehensive tools for creating complex PDF documents programmatically. For Node.js environments, use **pdfkit**, which offers a streaming-based approach to PDF generation with minimal memory overhead.

### How do I integrate PDF generation into my skill workflow?

First, install your chosen library (`pip install reportlab` for Python or `npm install pdfkit` for Node.js). Then implement a generation function that accepts your content and output path, and invoke this function from your skill's main logic when PDF output is required. Since no standardized PDF interface exists in the repository, you maintain full control over the implementation details.

### Can I contribute a PDF skill to the anthropics/skills repository?

While the current repository structure only contains metadata files, you could potentially contribute a custom PDF skill implementation following the repository's contribution guidelines. You would need to create the necessary source files implementing PDF generation using standard libraries like ReportLab or pdfkit, along with appropriate documentation and tests.