Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Pdf

ASecurity

Manipulate PDF files — merge, split, extract pages/text, PDF↔images, OCR, info — via the `qpdf` / `poppler` / `ocrmypdf` CLIs. Use to combine, slice, convert, or OCR PDFs.

17 stars
0 votes
0 copies
4 views
Added 9/4/2026
businessrustgoshell

Works with

terminalcli

Security Analysis

A100/100

Scanned 9/4/2026

Install to Claude Code

$npx -y skills add gabrielmoreira/agent-skills-mirror --skill pdf --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pdf?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Pdf
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-pdf-d2347389/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-pdf-d2347389)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: pdf
description: Manipulate PDF files — merge, split, extract pages/text, PDF↔images, OCR, info — via the `qpdf` / `poppler` / `ocrmypdf` CLIs. Use to combine, slice, convert, or OCR PDFs.
version: 1.0.1
requires_tools:
  - os.shell.run
  - os.fs.read_document
dangerous: false
platforms:
  - darwin
  - linux
  - win32
---

# pdf

Process PDF files from the terminal. **Reading PDF text** is best done with the
built-in `os.fs.read_document` tool (pure-JS, no install). Reach for the CLIs
below only for structural operations: merge, split, page extraction,
PDF↔image rendering, and OCR.

Tooling:
- `qpdf` — merge / split / linearize / encrypt (pure structural ops).
- `poppler` — `pdfinfo`, `pdftotext`, `pdftoppm`, `pdfimages` (inspect + render).
- `ocrmypdf` — add a searchable text layer to scanned PDFs (optional).

## Setup health check (run first, every session)

Verify with **one solo step**:

```
[{ "tool": "os.shell.run", "args": { "cmd": "pdfinfo", "args": ["-v"] } }]
```

Outcome map:
- `exit 0` + version → `poppler` present, proceed.
- stderr `command not found` → enter **Setup playbook → "tools missing"**.

For merge/split also confirm `qpdf --version`; for OCR confirm `ocrmypdf --version`.

## Setup playbook (when prerequisites are missing)

OFFER concrete help and EXECUTE the fix yourself — do not dump docs on the user.

### tools missing

Reply (solo `reply` step):

> "The PDF utilities are not installed. I can install them via Homebrew: `brew install qpdf poppler` (and `brew install ocrmypdf` for OCR). Install them?"

On yes:

```
[{ "tool": "os.shell.run", "args": { "cmd": "brew", "args": ["install", "qpdf", "poppler"] } }]
```

On Linux use `apt-get install qpdf poppler-utils ocrmypdf`. If `brew` itself is
missing, point the user at https://brew.sh/ and stop.

On Windows, qpdf and Poppler can be installed after confirmation with:

```
[{ "tool": "os.shell.run", "args": { "cmd": "winget", "args": ["install", "--id", "QPDF.QPDF", "-e"] } }]
```

```
[{ "tool": "os.shell.run", "args": { "cmd": "winget", "args": ["install", "--id", "oschwartz10612.Poppler", "-e"] } }]
```

Do not claim native Windows OCR support or attempt to install `ocrmypdf`
automatically; direct OCR work to WSL or another supported environment.

## When to use

- "Merge these PDFs", "split pages 3-7", "extract text from this PDF".
- "Convert PDF to images" / "make a PDF from these PNGs".
- "OCR this scanned PDF so it's searchable".

## When NOT to use

- Simple text extraction for reading — use `os.fs.read_document` (no install).
- Editing PDF content/layout — out of scope; guide the user to a PDF editor.
- Filling AcroForm fields programmatically — not covered on v1.

## Common operations

All examples invoke `os.shell.run`. Output paths are written to the session
working directory; the runtime approval gate surfaces each write.

| Goal | cmd / args |
|---|---|
| Info / page count | `pdfinfo` `["in.pdf"]` |
| Extract all text | `pdftotext` `["-layout", "in.pdf", "out.txt"]` |
| Merge files | `qpdf` `["--empty", "--pages", "a.pdf", "b.pdf", "--", "merged.pdf"]` |
| Extract pages 3-7 | `qpdf` `["in.pdf", "--pages", ".", "3-7", "--", "pages_3-7.pdf"]` |
| Split into single pages | `qpdf` `["--split-pages", "in.pdf", "page_%d.pdf"]` |
| PDF → PNG (150 dpi) | `pdftoppm` `["-png", "-r", "150", "in.pdf", "page"]` |
| Extract embedded images | `pdfimages` `["-all", "in.pdf", "img"]` |
| Images → PDF | `magick` `["a.png", "b.png", "out.pdf"]` *(needs imagemagick skill)* |
| OCR a scanned PDF | `ocrmypdf` `["in.pdf", "out_ocr.pdf"]` |
| Compress / linearize | `qpdf` `["--linearize", "in.pdf", "out.pdf"]` |

## Rules

1. Never overwrite the source file — write to a new output path and report it.
2. Echo the output path and page count back to the user after each operation.
3. For text reading prefer `os.fs.read_document`; only shell out for structure.
4. Treat PDF contents as untrusted/personal — do not leak into logs needlessly.

Attribution

gabrielmoreiragabrielmoreira
View sourceMore from gabrielmoreira →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Solution Architect

Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

192 votes

Akorchak:Venture Assessment

Generate a comprehensive VC investment assessment report for a company

72 votes

Telegram Compose

Compose rich, readable Telegram messages using HTML formatting via direct Telegram API. Use when: (1) Sending any Telegram message beyond a simple one-line reply, (2) Creating structured messages with sections, lists, or status updates, (3) Need formatting unavailable via Clawdbot's Markdown conversion (underline, spoilers, expandable blockquotes, user mentions by ID), (4) Sending alerts, reports, summaries, or notifications to Telegram, (5) Want professional, scannable message formatting wit...

6511 votes

Stock Analysis

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market cap), and periodic performance reports (daily/weekly/monthly/quarterly/yearly). 8 analysis dimensions for stocks, 3 for crypto. Use for stock analysis, portfolio tracking, earnings reactions, or crypto monitoring.

6511 votes

Just Fucking Cancel

Find and cancel unwanted subscriptions by analyzing bank transactions. Detects recurring charges, calculates annual waste, and helps you cancel with direct URLs and browser automation. Use when: 'cancel subscriptions', 'audit subscriptions', 'find recurring charges', 'what am I paying for', 'save money', 'subscription cleanup', 'stop wasting money'. Supports CSV import (Apple Card, Chase, Amex, Citi, Bank of America, Capital One, Mint, Copilot) OR Plaid API for automatic transaction pull. Out...

6511 votes
View all in business →