financial statement extraction

    1

    Extracts and arithmetically validates financial statements from PDFs into a relational database using a staged pipeline.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    financial statement extraction

    Example session with this skill installed

    Triage the remaining failed reports for the 2023 annual cycle and generate batches for the vision subagents.

    • Read your context and instructions
    • Compiled the financial statement extraction

    I have analyzed the extraction results for the 2023 annual reports. Out of 45 reports, 38 were EXTRACTED, 4 are PARTIAL, and 3 FAILED due to complex multi-column layouts and arithmetic mismatches in the Cash Flow statements.

    Triage Summary

    Report IDCompanyStatusReasonPage Hints
    CSE_JKH_2023John KeellsPARTIALFAIL (Assets check)42, 44
    CSE_HAYL_2023Hayleys PLCFAILEDUNCHECKED (New layout)110-115
    CSE_SAMP_2023Sampath BankPARTIALno_months55

    Vision Transcription Batch: b05_2023_annuals.json

    {
      "batch_id": "b05_2023_annuals",
      "target_worker": "vision-subagent",
      "tasks": [
        {
          "document_id": "CSE_JKH_2023",
          "pages": [42, 43, 44, 45],
          "context": "Arithmetic failure in BS: Equity + Liabilities off by 9 units. Verify if rounding or print error.",
          "output_path": "reviewed/vision/jkh_2023.txt"
        },
        {
          "document_id": "CSE_HAYL_2023",
          "pages": [110, 112, 114],
          "context": "Custom grouping in P&L not recognized by current checks.py. Transcribe full table for layout analysis.",
          "output_path": "reviewed/vision/hayl_2023.txt"
        }
      ]
    }
    

    Next steps

    1. Trigger the vision subagents using scripts/make_batches.py with the generated JSON.
    2. Update checks.py if the Hayleys layout shows a recurring non-standard subtotal pattern.
    3. Run stage_publish.py --project . once transcriptions are marked as PASS.
    b05_2023_annuals.json

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Manual data entry for financial reports is slow and prone to error, while generic OCR fails on complex layouts and arithmetic inconsistencies. This skill implements a strict, check-driven pipeline to extract income statements, balance sheets, and cash flow data from company PDFs into a relational database.

    What it does

    • Multi-source extraction parses native PDF text layers and uses vision-capable subagents to transcribe scanned or complex statement pages.
    • Arithmetic validation enforces hard checks (Assets = Equity + Liabilities) to ensure only mathematically sound data enters the database.
    • Automated triage categorizes failures by reason (e.g., unit unproven, check failed, missing columns) to minimize manual review time.
    • Staged loading manages a rigorous audit process that prevents data regression, integrity errors, or scale outliers during publication.
    • Batch orchestration coordinates subagents to process high volumes of reports in parallel based on precise triage hints.

    How it works

    1. Scope and Parse: Define the period range and run extract_all.py to attempt automated parsing of all project PDFs.
    2. Triage: Run triage.py to identify which statements failed to load and why, generating batch files for manual or agent-led review.
    3. Transcribe: Use vision-capable agents to process failed pages, following worker_brief.md to produce checked transcriptions.
    4. Audit and Publish: Execute stage_publish.py to run final integrity checks and merge verified facts into the production database.

    Frameworks & tools

    Python-based pipeline using SQL for fact storage and schema management. Utilizes OCR engines for scans and vision LLMs for layout-sensitive transcription.

    Why this beats prompting it yourself

    Prompting an LLM to "extract data" often results in hallucinated figures or ignored rounding errors. This skill uses a code-first validation layer that rejects any data that doesn't sum up, ensuring your database contains verified facts rather than just "likely" numbers.

    Use cases

    • Building a historical financials database from years of exchange filings.
    • Auditing existing financial datasets for arithmetic errors or mislabelled items.
    • Automating the processing of quarterly interim reports at scale.
    • Recovering data from poor-quality scans that standard parsers ignore.

    Known limitations

    Requires a structured project directory and specific database schema. Arithmetic checks may reject reports with extreme printing errors unless manual overrides are recorded.

    Requires structured project directory. Arithmetic checks reject mathematically inconsistent reports. Standard line items depend on label_alias dictionary. Needs vision-capable models for scans.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 9 days ago

    • Free with an Agensi account

    Requires

    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Listed9 days ago

    What's inside

    Frequently Asked Questions

    This skill is designed to process both native PDF text layers and high-resolution scans of financial reports, using specialized vision-capable subagents to handle complex layouts that traditional OCR often misses.

    Unlike basic prompts, this skill uses a "code-first" validation layer that automatically rejects any statement where the balance sheet doesn't balance or totals don't match sub-items. This ensures your database contains mathematically verified facts rather than hallucinated or misread figures.

    You will receive the complete Python-based pipeline including the extraction, triage, and staging scripts, along with the SQL schema definitions and the 'worker_brief.md' configuration for your agents.

    The skill requires a Python environment and a SQL database for fact storage; it is designed to work with major LLM providers that support vision capabilities for the transcription stage.

    Yes, the triage and auditing scripts are designed to flag outliers and failures, allowing you to manually override specific entries or record exceptions for reports with known printing errors.

    New in APIs & Backend