pdf-parsing

Exposes a 100% local, offline PDF batch extraction utility (extract_to_markdown.py) that isolates invoices under invoices/ and translates PDFs into clean…

npx skills add https://github.com/google-gemini/gemini-managed-agents-templates --skill pdf-parsing

PDF Invoice Local Extraction

This skill exposes a 100% offline, local PDF batch extraction utility (extract_to_markdown.py) that isolates all invoice documents inside the invoices/ directory and exports them into clean, readable Markdown files (.md).

This runs entirely offline without any external network, server, or API key dependencies. This decouples raw text extraction from structuring, allowing you (the LLM agent) to perform robust, flexible data extraction natively without relying on fragile regular expressions.

Batch Extraction Tool: extract_to_markdown.py

Processes a directory of PDF invoices sequentially, isolating all PDFs into a dedicated invoices/ subdirectory and converting each to a matching .md file.

python3 skills/pdf-parsing/scripts/extract_to_markdown.py --workspace .agents/workspace
  • Standard PDF Files: Uses pypdf locally to instantly extract text and save it as <filename>.md under .agents/workspace/invoices/.

Agent Orchestration Guidelines

As the LLM agent, you should coordinate the invoice structuring workflow as follows:

  1. Move and Batch Extract: Execute the batch extraction tool:

    python3 /.agents/skills/pdf-parsing/scripts/extract_to_markdown.py --workspace .agents/workspace
    

    This isolates all invoices inside .agents/workspace/invoices/ and populates the folder with matching <invoice_name>.md files.

  2. LLM-Native Structuring: Read the generated .md files under .agents/workspace/invoices/. Use your own agent reasoning (LLM context) to natively extract the structured fields from the markdown:

    • merchant_name
    • date (format: YYYY-MM-DD)
    • amount (float)
    • invoice_number
    • source_file
  3. Compile Structured Database: Combine all structured invoice objects into a single JSON list and save it directly as .agents/workspace/parsed_invoices.json using your file creation tools, matching this schema:

    [
      {
        "date": "2026-05-15",
        "merchant_name": "Google",
        "amount": 150.00,
        "invoice_number": "INV-GCP-1029",
        "source_file": "google_invoice.png"
      }
    ]
    

Dependencies

  • pypdf (>= 4.0.0)

Thêm skills từ google-gemini

greeter
google-gemini
Một kỹ năng chào hỏi thân thiện
official
code-reviewer
google-gemini
Đánh giá mã tự động cho các thay đổi cục bộ và pull request từ xa với phân tích có cấu trúc về tính chính xác, khả năng bảo trì và bảo mật. Hỗ trợ cả thay đổi trên hệ thống tệp cục bộ (đã staged và chưa staged) và PR từ xa (theo số hoặc URL) với tính năng tự động checkout GitHub CLI. Phân tích mã trên bảy khía cạnh: tính chính xác, khả năng bảo trì, khả năng đọc, hiệu quả, bảo mật, xử lý trường hợp ngoại lệ và độ phủ kiểm thử. Chạy các bộ kiểm tra tiền xử lý tùy chọn (ví dụ: npm run preflight) để phát hiện...
official
review-duplication
google-gemini
Sử dụng kỹ năng này trong quá trình review mã để chủ động kiểm tra cơ sở mã về chức năng trùng lặp, bánh xe được phát minh lại, hoặc không tái sử dụng các thành phần hiện có…
official
reconciliation
google-gemini
Đối chiếu các khoản chi phí đã tải với cơ sở dữ liệu hóa đơn đã phân tích trước, đánh dấu các điểm bất thường như sai lệch số tiền, thiếu hóa đơn, và không khớp người bán…
official
agent-tui
google-gemini
Main Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications…
official
async-pr-review
google-gemini
Kích hoạt kỹ năng này khi người dùng muốn bắt đầu một đánh giá PR không đồng bộ, chạy kiểm tra nền trên một PR, hoặc kiểm tra trạng thái của một async PR đã được bắt đầu trước đó…
official
ci
google-gemini
Một kỹ năng chuyên biệt cho Gemini CLI cung cấp hiệu suất cao, fail-fast
official
critique
google-gemini
Chuyên môn trong việc kiểm tra và sửa chữa các tập lệnh kho lưu trữ và quy trình làm việc GitHub Actions để đảm bảo độ tin cậy kỹ thuật và bảo mật.
official