116
GitHub Stars
4
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill einverne/dotfiles --skill gemini-document-processing- .env.example119 B
- CREATION_SUMMARY.md5.9 KB
- README.md4.4 KB
- SKILL.md6.4 KB
Overview
This skill guides implementing Google Gemini API document processing to analyze PDFs with native vision and extract text, images, diagrams, charts, and tables. It provides pragmatic setup, usage patterns, and scripts for extracting structured data, summarizing documents, answering questions, and converting PDFs to JSON or HTML. The goal is to help you build reliable document pipelines that scale from single files to batch processing.
How this skill works
The skill uses Gemini's multimodal model to process PDF files (vision-enabled) and returns text, structured JSON, or HTML output. For small files (<20MB) it uses inline base64 encoding; for larger or repeat queries it uses the File API with 48-hour storage and context caching. You can request response_schema to validate JSON with Pydantic or ask free-text questions and summaries.
When to use it
- Extract structured data from invoices, forms, resumes, or reports
- Summarize long PDFs or generate executive summaries
- Answer targeted questions about contract terms, specs, or research papers
- Convert PDFs with complex layouts (charts, diagrams, tables) to JSON or HTML
- Process many documents in parallel or build a document ingestion pipeline
Best practices
- Store GEMINI_API_KEY in environment or project .env; prefer environment variables for CI
- Use inline encoding for PDFs under 20MB and File API for larger files or repeated queries
- Place PDF content before the prompt for single-page inline requests when using context
- Define a Pydantic response_schema for predictable JSON outputs and schema validation
- Batch independent documents and parallelize processing to improve throughput
Example use cases
- Extract invoice_number, date, vendor, and total into validated JSON for accounting imports
- Generate a concise executive summary of a 100+ page report for stakeholders
- Run Q&A on a contract PDF to surface key obligations and termination clauses
- Convert a scientific paper with figures and tables into HTML while preserving layout
- Process a folder of resumes to extract candidate contact info and skills into CSV
FAQ
Only PDF files support Gemini's native vision processing; TXT, HTML, and Markdown are treated as text-only.
When should I use the File API?
Use the File API for files larger than 20MB, for repeated queries on the same document, or when you want Gemini to cache context across requests.
How do I get structured JSON output?
Define a response_schema (Pydantic model) and set response_mime_type to application/json in the generate_content config.