agentleFS
xcrrrxcrrr/claude-skills/skills/files/pdf/SKILL.md

pdf

Skill6 starsChanged 9 months agoMITView on GitHub

Use this skill when describing, summarizing, extracting structured data from, or answering questions about PDF documents, or when planning PDF layout and structure for reports, contracts, and publications. Not for editing binary PDF files directly. Not for converting PDFs to other formats programmatically.

197 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use context7-efficient, file-reading and 9 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.
  • hfzarslanSkill

    context7-efficient

    Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.

    Also in 5 projects that use this

  • SeifBenayedSkill

    file-reading

    Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.

    Also in 6 projects that use this

  • SeifBenayedSkill

    pdf-reading

    Use this skill when you need to read, inspect, or extract content from PDF files — especially when file content is NOT in your context and you need to read it from disk. Covers content inventory, text extraction, page rasterization for visual inspection, embedded image/attachment/table/form-field extraction, and choosing the right reading strategy for different document types (text-heavy, scanned, slide-decks, forms, data-heavy). Do NOT use this skill for PDF creation, form filling, merging, splitting, watermarking, or encryption — use the pdf skill instead.

    Also in 6 projects that use this

  • yf8578Skill

    market-research-reports

    Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for data gathering, and multi-framework strategic analysis including Porter Five Forces, PESTLE, SWOT, TAM/SAM/SOM, and BCG Matrix.

    Also in 7 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 4 projects that use this

  • jjyaoaoSkill

    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 4 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 186 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No data processing addendum (DPA) referenced — required for GDPR compliance

    line 175
  2. Distinctive:

    No escrow provision for source code — risk if Vendor goes out of business

    line 176
  3. Distinctive:

    No audit rights clause — Customer cannot verify Vendor's security or compliance claims

    line 177
  4. Distinctive:

    Always cite page numbers or section numbers when extracting or quoting from a PDF

    line 180
  5. Distinctive:

    When planning PDF layout, use a grid system — it creates visual consistency without repeated manual specification

    line 183
  6. Distinctive:

    Look for a "Key Metrics" or "Highlights" box near the front of reports — it's often the most dense summary

    line 198
  7. Very specific:

    Use pdfplumber (Python) for accurate table extraction from PDFs with complex layouts

    line 200

“Common” is measured: kept by at least 6 in 10 of the 186 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

Overview

This skill covers working with PDF documents in two primary modes: (1) comprehension and extraction — reading, summarizing, and pulling structured data from PDF content; and (2) layout planning — designing the structure, sections, and visual hierarchy of a new PDF document for reports, contracts, research papers, or publications. For comprehension tasks, it applies structured extraction, hierarchical summarization, and question-answering techniques. For layout tasks, it describes the page structure, section organization, typography, and visual design that tools like LaTeX, ReportLab, WeasyPrint, or Adobe InDesign should implement.

When to Use

  • Summarizing a long PDF report into a structured briefing or executive summary
  • Extracting tables, financial figures, dates, names, or clauses from a PDF document
  • Answering specific questions about the contents of a PDF
  • Planning the section layout and page design for a new PDF report or publication
  • Describing PDF structure for programmatic generation using ReportLab or WeasyPrint
  • Reviewing PDF contracts to identify key clauses, obligations, and risk terms
  • Converting PDF content into structured JSON, Markdown, or CSV

When NOT to Use

  • Editing the binary content of an existing PDF (use Adobe Acrobat or pdf manipulation tools)
  • Converting PDF files to DOCX or other formats (use conversion tools like pdf2docx, LibreOffice)
  • Creating presentation slides (use pptx skill)
  • Generating DOCX reports (use docx skill)
  • OCR of scanned image-only PDFs without text layer (requires specialized OCR tools like Tesseract)

Quick Reference

TaskApproach
Summarize a PDFHierarchical summary: document summary → section summaries → key findings
Extract a tableIdentify column headers, data types per column, output as Markdown or JSON
Find specific dataQuote the exact text with page reference; flag if not found explicitly
Identify key clausesScan for section headings; extract clause text, obligation, and party responsible
Plan PDF layoutDefine: page size, margins, header/footer, section hierarchy, font stack, color palette
Generate PDF programmaticallyUse ReportLab (Python) for data-driven PDFs; WeasyPrint for HTML-to-PDF
Compare two PDFsIdentify additions, deletions, and changed clauses between versions

Instructions

  1. Understand the document type — Identify what kind of PDF you are working with: research paper, financial report, legal contract, government form, technical manual, or marketing brochure. Each type has different structural conventions and extraction priorities.
  2. Navigate the document structure — Review the table of contents or section headings to build a mental map of the document. For extraction tasks, identify which sections contain the target data before diving in. For long documents (100+ pages), focus on the executive summary, section introductions, and conclusion.
  3. For summarization — apply hierarchical structure — Create a three-level summary:
    • Document-level: 1–3 sentences capturing the core purpose and key conclusions
    • Section-level: 2–4 sentences per major section
    • Key findings: Bullet list of the most actionable or important points
  4. For data extraction — identify target entities — Define what you are looking for before reading: specific data types (dates, monetary amounts, percentages, names), specific tables (revenue by quarter, list of parties, schedule of deliverables), or specific clauses (termination, liability, payment terms). Then systematically search and extract.
  5. Present extracted data in structured format — Always convert extracted data to a clean format:
    • Tables → Markdown table or JSON array
    • Key-value pairs → YAML or JSON object
    • Contract clauses → Section title + quote + interpretation + risk flag
    • Financial figures → Consistent unit format (all in millions, or all in thousands)
  6. Flag ambiguities and gaps — When data is implied but not explicitly stated, flag it. When a section is unclear or contradictory, note it. When the document appears to be missing pages or the extraction may be incomplete, say so explicitly.
  7. For PDF layout planning — define the grid — Specify: page size (A4 or Letter), margins (top/bottom/left/right), number of columns (single, two-column academic style, etc.), gutter width between columns, and baseline grid for text alignment.
  8. Define the typography system — Specify: primary font (serif for formal, sans-serif for modern), heading hierarchy sizes, body text size and line height, caption style, and code/monospace font if needed. Define a limited color palette (typically 2–3 colors: primary, secondary, accent).
  9. Plan the page components — Describe: running headers (chapter title, document title), page numbers (position and format), footer content (confidentiality, date), and any watermarks or security markings.
  10. For programmatic generation — provide the data schema — If the PDF is data-driven (a report generated from a database), define the data schema that feeds the template: field names, types, formatting rules, and conditional logic (e.g., show a warning box if value exceeds threshold).

Examples

Example 1: Extracting Key Data from a PDF Annual Report

Input: A 120-page annual report PDF for a publicly traded company. Extract: revenue, net income, EPS, segment breakdown, and key risk factors.

Output:

Document summary:

Acme Corp 2024 Annual Report (120 pages) covers fiscal year ended December 31, 2024.
The company reported record revenue driven by North America growth, offset by EMEA softness.
Key risks include regulatory changes in the EU and supply chain concentration in Southeast Asia.

Financial highlights (extracted from pages 8–12, Consolidated Statements of Operations):

{
  "fiscal_year": 2024,
  "currency": "USD millions",
  "revenue": {
    "total": 4823,
    "yoy_change_pct": 12.4
  },
  "gross_profit": {
    "amount": 2156,
    "margin_pct": 44.7
  },
  "operating_income": {
    "amount": 891,
    "margin_pct": 18.5
  },
  "net_income": {
    "amount": 672,
    "margin_pct": 13.9
  },
  "earnings_per_share": {
    "basic": 4.21,
    "diluted": 4.18
  }
}

Segment breakdown (from page 15, Segment Revenue table):

SegmentRevenue ($M)YoY Growth% of Total
North America2,841+18.2%58.9%
EMEA1,124-2.1%23.3%
Asia Pacific858+14.7%17.8%

Key risk factors (from pages 34–41, Risk Factors section):

1. Regulatory Risk (EU AI Act) — New regulations may require product modifications
   by Q3 2025, estimated compliance cost of $40–60M (page 35)
2. Supply Chain Concentration — 73% of component sourcing from two suppliers in
   Vietnam and Thailand; single supplier disruption could reduce production by 30% (page 37)
3. Currency Risk — 41% of revenue denominated in non-USD currencies; 10% USD
   strengthening would reduce reported revenue by ~$198M (page 39)

Extraction confidence notes:

  • Financial figures verified against both the income statement (p. 10) and the MD&A summary (p. 8)
  • Segment data extracted from Note 4 (p. 15); prior year comparisons from same note
  • Risk factor descriptions are paraphrased; exact quotes available on request

Example 2: Summarizing and Reviewing a PDF Contract

Input: A 45-page SaaS Master Service Agreement (MSA). Identify key obligations, risk clauses, and any non-standard terms.

Output:

Contract overview:

Document: Master Service Agreement
Parties: TechVendor Inc. (Vendor) and ClientCorp Ltd. (Customer)
Effective Date: January 1, 2025
Term: 3 years with automatic renewal
Governing Law: State of Delaware, USA

Key obligations by party:

ObligationPartySectionNotes
Maintain 99.9% uptime SLAVendor§5.2Credits apply for downtime > 0.1%
Pay invoices within 30 daysCustomer§8.11.5%/month late fee
Provide security incident notice within 48 hoursVendor§9.3Non-standard: industry norm is 72 hours
Maintain SOC 2 Type II certificationVendor§9.1Annual report required
Provide 6-month termination noticeCustomer§12.1⚠️ Non-standard: typical is 30–90 days

Risk flags — clauses requiring legal review:

⚠️  HIGH: §11.3 — Liability cap set at 3 months of fees. Standard is 12 months.
    Recommendation: Negotiate to minimum 6 months or last 12 months of fees paid.

⚠️  MEDIUM: §7.2 — Vendor retains right to use Customer data for "product improvement."
    Recommendation: Add exclusion for confidential or PII data; require opt-out option.

⚠️  MEDIUM: §12.4 — Auto-renewal with 6-month notice requirement (Customer).
    Standard notice period is 30–90 days. Risk of unintended renewal.

ℹ️  NOTE: §13.1 — Vendor can modify pricing with 60-day notice during term.
    Standard is fixed pricing for the term. Flag for pricing stability discussion.

Missing standard clauses:

  • No data processing addendum (DPA) referenced — required for GDPR compliance
  • No escrow provision for source code — risk if Vendor goes out of business
  • No audit rights clause — Customer cannot verify Vendor's security or compliance claims

Best Practices

  • Always cite page numbers or section numbers when extracting or quoting from a PDF
  • Distinguish between explicit statements and your interpretation — use "the document states..." vs "this implies..."
  • For financial extraction, cross-check figures across multiple sections (income statement vs MD&A)
  • When planning PDF layout, use a grid system — it creates visual consistency without repeated manual specification
  • For contracts, organize extraction by party obligation, not by document order — it's more useful to reviewers
  • Flag "non-standard" clauses by comparison to industry norms, not just your preference
  • For long documents, create a structured extract/summary before answering specific questions

Common Mistakes

  • Summarizing only the first and last sections — middle sections often contain critical technical or financial detail
  • Confusing tables in the PDF with appendices — confirm data provenance before quoting
  • Missing footnotes and endnotes — they often contain critical qualifications and exceptions
  • Treating scanned PDFs as text PDFs — if there is no text layer, extraction requires OCR first
  • Presenting extracted numbers without their units or time periods — creates ambiguity
  • Ignoring defined terms in contracts — "Customer" may have a specific definition different from the colloquial use

Tips & Tricks

  • For large PDFs, process section by section rather than the whole document at once
  • Look for a "Key Metrics" or "Highlights" box near the front of reports — it's often the most dense summary
  • In contracts, the Schedule and Exhibit sections often contain the binding commercial terms — don't skip them
  • Use pdfplumber (Python) for accurate table extraction from PDFs with complex layouts
  • For redline comparison of two contract versions, diff-pdf or Word's compare feature works well
  • PyMuPDF (fitz) is fastest for extracting raw text; pdfplumber is best for tables; camelot is best for financial tables

Related Skills

  • docx
  • pptx
  • xlsx

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.