Permission Setup Review
python scripts/_tool_policy_note.py is an optional setup helper for the CA File Processor skill. It may apply broad filesystem permissions for compatibility. Show the target paths and permission mode, explain the risk, and prefer a narrower mode when shared write access is not needed.
CA File Processor
This skill processes the four most common file formats used by Indian CA firms and extracts structured information from them for analysis, summarisation, and answering queries.
Supported formats
- PDF — GST returns, ITR acknowledgements, audit reports, scanned invoices (text-layer and scanned via OCR)
- Excel (.xlsx / .xls) — Trial balance, P&L, balance sheets, payroll registers, GST workings
- CSV — Bank statement exports (HDFC, ICICI, SBI), GSTR-2B downloads, Tally exports
- Images (.jpg / .png) — WhatsApp invoice photos, scanned Form 16, cheque images
How to use
When a file is attached or uploaded, run the appropriate script:
python3 scripts/skill_router.py <file_path>
The router auto-detects the file type and calls the correct processor. It returns a structured JSON dict.
What to do with the output
Once the script returns output, use it to:
- Answer the user's question about the document
- Extract specific fields they asked for (GSTIN, totals, dates)
- Summarise the document in plain language
- Flag anomalies or missing information
- Compare figures across multiple documents
Field extraction — what gets detected automatically
For invoices and PDFs:
- GSTIN (supplier and recipient)
- Invoice number and date
- Total amount / grand total
- PAN number
- Email and phone
For bank statements (CSV):
- Total debits and credits
- Date range of transactions
- Detected bank format
For Excel files:
- Document type (trial balance / P&L / balance sheet / payroll / GST workings / ledger)
- Sheet names and row counts
- Preview of header rows
OCR notes
- Text-layer PDFs are read directly (fast, accurate)
- Scanned PDFs and images go through Tesseract OCR (English + Hindi)
- Confidence is rated high / medium / low in the output
- Always flag low-confidence results to the user and ask for confirmation on numeric fields
Trust statement
This skill runs entirely locally on your server. No data is sent to any external service. All processing happens via open-source Python libraries (PyMuPDF, pytesseract, openpyxl, pandas).
1---2name: ca-file-processor3description: Process financial documents for Indian CA firms. Use when any PDF, Excel (.xlsx/.xls), CSV, JPG, or PNG file is received or uploaded — including GST returns, ITR PDFs, scanned invoices, trial balance sheets, bank statements, Form 16, TDS certificates, and audit reports. Automatically detects file type and extracts text, tables, and key fields (GSTIN, invoice number, totals, dates). Triggers on: file upload, attachment, "process this file", "read this PDF", "extract from this invoice", "analyse this statement", "what does this document say".4---5
6
7
8
9### Permission Setup Review
10
11`python scripts/_tool_policy_note.py` is an optional setup helper for the `CA File Processor` skill. It may apply broad filesystem permissions for compatibility. Show the target paths and permission mode, explain the risk, and prefer a narrower mode when shared write access is not needed.
12
13# CA File Processor
14
15This skill processes the four most common file formats used by Indian CA firms and extracts structured information from them for analysis, summarisation, and answering queries.
16
17## Supported formats
18
19- **PDF** — GST returns, ITR acknowledgements, audit reports, scanned invoices (text-layer and scanned via OCR)
20- **Excel (.xlsx / .xls)** — Trial balance, P&L, balance sheets, payroll registers, GST workings
21- **CSV** — Bank statement exports (HDFC, ICICI, SBI), GSTR-2B downloads, Tally exports
22- **Images (.jpg / .png)** — WhatsApp invoice photos, scanned Form 16, cheque images
23
24## How to use
25
26When a file is attached or uploaded, run the appropriate script:
27
28```
29python3 scripts/skill_router.py <file_path>
30```
31
32The router auto-detects the file type and calls the correct processor. It returns a structured JSON dict.
33
34## What to do with the output
35
36Once the script returns output, use it to:
37
381. Answer the user's question about the document
392. Extract specific fields they asked for (GSTIN, totals, dates)
403. Summarise the document in plain language
414. Flag anomalies or missing information
425. Compare figures across multiple documents
43
44## Field extraction — what gets detected automatically
45
46For invoices and PDFs:
47- GSTIN (supplier and recipient)
48- Invoice number and date
49- Total amount / grand total
50- PAN number
51- Email and phone
52
53For bank statements (CSV):
54- Total debits and credits
55- Date range of transactions
56- Detected bank format
57
58For Excel files:
59- Document type (trial balance / P&L / balance sheet / payroll / GST workings / ledger)
60- Sheet names and row counts
61- Preview of header rows
62
63## OCR notes
64
65- Text-layer PDFs are read directly (fast, accurate)
66- Scanned PDFs and images go through Tesseract OCR (English + Hindi)
67- Confidence is rated high / medium / low in the output
68- Always flag low-confidence results to the user and ask for confirmation on numeric fields
69
70## Trust statement
71
72This skill runs entirely locally on your server. No data is sent to any external service. All processing happens via open-source Python libraries (PyMuPDF, pytesseract, openpyxl, pandas).