agentleFS
PaulRBergPaulRBerg/dot-agents/skills/pdf/SKILL.md

pdf

Skill6 starsChanged 6 days agoMITView on GitHub

Process PDFs locally on macOS with exact extraction, source preservation, deliberate tool routing, and structural plus semantic validation. 1. Run extraction and transformations locally. Task-relevant document evidence in tool output and internal agent reports may be processed by the configured model provider. Require explicit user authorization and an external-disclosure review before uploading or sending document contents outside that agent workflow. Package and language-data downloads do not authorize document disclosure. 2. Preserve every original PDF byte-for-byte. Unless the user authorizes destructive…

194 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use gift-evaluator, Podcast Generate and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dav-niu474Skill

    gift-evaluator

    The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.

    Also in 5 projects that use this

  • dav-niu474Skill

    Podcast Generate

    Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).

    Also in 5 projects that use this

  • huang-x-hSkill

    Video Generation

    Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.

    Also in 6 projects that use this

  • huang-x-hSkill

    VLM

    Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.

    Also in 6 projects that use this

  • Liang-MHSkill

    stock_analysis

    获取 A 股、基金和港股的实时行情和技术分析数据

    Also in 5 projects that use this

  • OpenAISkill

    migrate-to-codex

    Migrate supported instruction files, skills, agents, and MCP config into Codex project and global files.

    Also in 5 projects that use this

  • +1 more from huang-x-h
  • +3 more from dav-niu474

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 179 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run extraction and transformations locally.

    line 18
  2. Distinctive:

    Keep reports concise for private financial, tax, legal, and health documents.

    line 30
  3. Distinctive:

    When layout, cropping, OCR quality, signatures, or form placement matters, render the first and last page, every structural boundary, and …

    line 44
  4. Distinctive:

    Only when exact commands for the selected extraction, transformation, OCR, image, comparison, or compression branch are needed, read …

    line 61

“Common” is measured: kept by at least 6 in 10 of the 179 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PDF

Process PDFs locally on macOS with exact extraction, source preservation, deliberate tool routing, and structural plus semantic validation.

Invariants

  1. Run extraction and transformations locally. Task-relevant document evidence in tool output and internal agent reports may be processed by the configured model provider. Require explicit user authorization and an external-disclosure review before uploading or sending document contents outside that agent workflow. Package and language-data downloads do not authorize document disclosure.
  2. Preserve every original PDF byte-for-byte. Unless the user authorizes destructive replacement, write a sibling output, copy, or explicitly named destination.
  3. Preserve monetary values, identifiers, dates, signs, and displayed precision as strings. Use decimal.Decimal for arithmetic. Never infer missing rows or silently discard headers, footnotes, continuation lines, or boundary pages.
  4. Inspect structure and representative renders before choosing a transformation. Use the smallest tool that preserves the required layout, forms, annotations, and image quality.
  5. Validate every written PDF structurally and against task semantics. A command exiting successfully is not evidence that extracted rows, totals, page boundaries, form appearances, or visual layout are correct.
  6. Keep reports concise for private financial, tax, legal, and health documents. Prefer counts, reconciliations, and file references over raw sensitive rows unless the rows materially support the task or the user asks for them.

Profile First

Resolve the skill directory from this SKILL.md, then profile every unknown input:

uv run "<skill-dir>/scripts/profile.py" "<input.pdf>"

The helper emits schema-versioned JSON with integrity, encryption, page geometry/rotation, image counts, and per-page text coverage without document text. Stop on password_required. Password handling is outside this skill.

When layout, cropping, OCR quality, signatures, or form placement matters, render the first and last page, every structural boundary, and any page behind a discrepancy. For dense charts, tables, or technical drawings, render at higher resolution and crop or zoom the relevant region before reading values.

Route by Evidence

NeedPreferred route
Quick reading or page-aware extractionHost PDF reader when available, then pdftotext -layout
Coordinates, columns, or difficult tablesPoppler bounding boxes, then pdfplumber through uv run
Image-only or materially incomplete textOCRmyPDF with Tesseract. Default languages: eng+ron
Merge, split, rotate, or integrity checksqpdf
Render pages or extract embedded imagespdftocairo or pdfimages
Convert ordered images into a PDFimg2pdf
Reduce sizeqpdf lossless rewrite first. Ghostscript only for an accepted lossy pass
Inspect, fill, flatten, or overlay formsRead references/forms.md first

Only when exact commands for the selected extraction, transformation, OCR, image, comparison, or compression branch are needed, read references/recipes.md.

Execute and Reconcile

  1. Profile inputs and identify whether each page is digital, scanned, mixed, rotated, or image-heavy.
  2. Extract or transform into a new path. For tabular documents, retain page provenance and parse continuations across page breaks before assigning rows.
  3. Reconcile financial and evidentiary output with every available invariant: page and row counts, opening/closing balances, inflows/outflows, subtotals, displayed totals, date coverage, and source hashes when provenance matters.
  4. For comparisons, extract both sources independently, enumerate overlapping and unique facts, and render the pages behind every material disagreement. Distinguish a real discrepancy from an extraction failure.
  5. For split or rename work, establish an old-to-new map from stable content identifiers. Copy by default, preserve contextual boundary pages when needed, and verify the first and last page of every result.
  6. Validate outputs with qpdf, expected page count/dimensions, text coverage, representative renders, and the task's semantic invariants. Retain OCR sidecars or extraction intermediates only when they are requested or useful evidence.

Completion requires preserved originals, intentional outputs, successful structural checks, semantic reconciliation, and a concise report of paths and evidence. Lead read-only reports with ### 📄 PDF — 🔎 inspected, no files written. Only after all required validation passes, use ### 📄 PDF — ✅ updated. When a required check fails, use ### 📄 PDF — ⛔ not deliverable.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.