# Pdf

> Create, inspect, extract, merge, split, rotate, and render PDF files with local open-source tools. Use whenever Codex or Hermes must read, produce, modify, or visually verify a PDF.

- **Type:** Skill
- **Install:** `agentstack add skill-rylaispirit-rylai-codex-hermes-skills-pdf`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Rylaispirit](https://agentstack.voostack.com/s/rylaispirit)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Rylaispirit](https://github.com/Rylaispirit)
- **Source:** https://github.com/Rylaispirit/rylai-codex-hermes-skills/tree/main/skills/pdf

## Install

```sh
agentstack add skill-rylaispirit-rylai-codex-hermes-skills-pdf
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Rylai PDF

Original Codex-Hermes skill by Rylai.

Use local files and deterministic tools. Preserve the source document unless the user explicitly
requests an in-place replacement. Never invent passwords, embed credentials, or upload documents
to an external service without direct approval.

## Runtime

Use Python 3 with:

- `pypdf` for page-level inspection and editing.
- `pdfplumber` when higher-quality text extraction is useful.
- `pypdfium2` or Poppler `pdftoppm` for optional page rendering.
- LibreOffice only when converting an Office source into PDF.

Probe before installing:

```bash
python -c "import pypdf; print(pypdf.__version__)"
python -c "import pdfplumber; print(pdfplumber.__version__)"

Install only missing Python packages:

```bash
python -m pip install pypdf pdfplumber pypdfium2

Resolve `scripts/rylai_pdf.py` relative to this skill directory.

## Workflow

1. Confirm the input path, requested operation, output path, and page range.
2. Run `info` before editing an unfamiliar or encrypted PDF.
3. Write to a new output path. Use `--force` only when replacement is intended.
4. Re-open the result and check page count, metadata, and extracted text where applicable.
5. For layout-sensitive work, render representative pages and inspect the PNG output.
6. Report skipped checks when Poppler, LibreOffice, OCR, or another optional dependency is absent.

For scanned pages with no useful text layer, use an available local OCR engine. Keep the original
PDF and state which OCR tool and language model were used.

## Bundled CLI

Inspect:

```bash
python scripts/rylai_pdf.py info input.pdf

Extract selected pages:

```bash
python scripts/rylai_pdf.py extract input.pdf output.txt --pages 1-3,7

Merge:

```bash
python scripts/rylai_pdf.py merge output.pdf first.pdf second.pdf

Split selected pages into individual files:

```bash
python scripts/rylai_pdf.py split input.pdf output-pages --pages 2-5

Rotate selected pages clockwise:

```bash
python scripts/rylai_pdf.py rotate input.pdf rotated.pdf 90 --pages 1,3

Render with local PDFium or Poppler:

```bash
python scripts/rylai_pdf.py render input.pdf rendered-pages --dpi 144

Add `--password` only when the user supplied the password for that document.

## Quality Bar

- The output opens without repair warnings.
- Page order, count, rotation, and selected ranges match the request.
- Extracted text is not silently empty; scanned pages are identified.
- Rendered pages have no unexpected clipping or blank output.
- No source file, temporary file, password, or user path is bundled with the skill.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Rylaispirit](https://github.com/Rylaispirit)
- **Source:** [Rylaispirit/rylai-codex-hermes-skills](https://github.com/Rylaispirit/rylai-codex-hermes-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-rylaispirit-rylai-codex-hermes-skills-pdf
- Seller: https://agentstack.voostack.com/s/rylaispirit
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
