pdf-parsing

Disponibiliza um utilitário 100% local e offline de extração em lote de PDFs (extract_to_markdown.py) que isola faturas em invoices/ e traduz PDFs em markdown limpo…

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)

Mais skills de google-gemini

greeter
google-gemini
Uma habilidade de saudação amigável
official
code-reviewer
google-gemini
Revisão automatizada de código para alterações locais e pull requests remotos, com análise estruturada em correção, manutenibilidade e segurança. Suporta alterações no sistema de arquivos local (staged e unstaged) e PRs remotos (por número ou URL) com checkout automático via GitHub CLI. Analisa o código em sete dimensões: correção, manutenibilidade, legibilidade, eficiência, segurança, tratamento de casos extremos e cobertura de testes. Executa suítes opcionais de verificação preflight (ex.: npm run preflight) para detectar...
official
review-duplication
google-gemini
Use esta habilidade durante revisões de código para investigar proativamente a base de código em busca de funcionalidades duplicadas, reinvenção da roda ou falha em reutilizar recursos existentes…
official
reconciliation
google-gemini
Conciliar despesas carregadas com o banco de dados de faturas pré-analisadas, sinalizando discrepâncias como divergências de valores, faturas ausentes e incompatibilidades de comerciante…
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
Acione esta habilidade quando o usuário quiser iniciar uma revisão de PR assíncrona, executar verificações em segundo plano em um PR ou verificar o status de uma revisão de PR assíncrona iniciada anteriormente…
official
ci
google-gemini
Uma habilidade especializada para o Gemini CLI que fornece alta performance e falha rápida.
official
critique
google-gemini
Expertise em auditar e corrigir scripts de repositório e workflows do GitHub Actions para garantir robustez técnica e segurança.
official