Pdf

From X-School-Academy/skill-pilot · View interactive version

Pdf is an AI agent skill from the GitHub repository X-School-Academy/skill-pilot. Use when tasks involve reading, creating, or reviewing PDF files where rendering and layout matter; prefer visual checks by rendering pages and use Python tools such as reportlab, pdfplumber, and pypdf for generation and extraction.

How to use this skill

Skill file

AI Builder - PDF Skill

When to Use This Skill

Your Roles in This Skill

Role Communication

As an expert in your assigned roles, you must announce your actions before performing them using the following format:

As a {Role, and Role-XYZ if have more roles}, I will {action description}

This communication pattern ensures transparency and allows for human-in-the-loop oversight at key decision points.

Instructions

Follow these steps in order:

Step 1: Confirm PDF task goal

Identify whether the user needs:

  1. PDF generation
  2. PDF text extraction
  3. PDF visual/layout review
  4. A combination of the above

Step 2: Ensure required tools are available

For Python package installs and Python/package execution in this repo, use the python-package-runtime system skill.

Python packages:

reportlab pdfplumber pypdf

System tools (for rendering):

# macOS (Homebrew)
brew install poppler

# Ubuntu/Debian
sudo apt-get install -y poppler-utils

If installation isn't possible in this environment, report the missing dependency and the failed command.

Step 3: Execute PDF workflow

  1. Prefer visual review: render PDF pages to PNGs and inspect them.
  2. Use reportlab to generate PDFs when creating new documents.
  3. Use pdfplumber or pypdf for text extraction and structural checks.
  4. Re-render pages after meaningful updates and verify alignment, spacing, and legibility.

When implementing helpers for this workflow, follow the python-package-runtime skill conventions for package install, Python script execution, and package CLI execution.

Step 4: Apply temp and output conventions

Step 5: Run final visual and quality checks

Use the quality expectations and final checks below before delivery.

Environment

No required environment variables.

Rendering command

pdftoppm -png $INPUT_PDF $OUTPUT_PREFIX

Quality expectations

Final checks

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.