- Home
- Skills
- Finance & Accounting
- Brazil Invoice Reconciliation: NF-e/NFS-e XML vs ERP
Brazil Invoice Reconciliation: NF-e/NFS-e XML vs ERP
by Diego Godoi
This skill does it in one run and explains each divergence.
Free
Brazil Invoice Reconciliation: NF-e/NFS-e XML vs ERP
Example session with this skill installed
Here are the 412 purchase XMLs for November and the export of our ERP entries (lancamentos_nov.csv). Reconcile everything and tell me what I need to fix before closing the month.
- Read your context and instructions
- Compiled the brazil invoice reconciliation
- Generated the data export
Exemplo com dados fictícios.
Conciliação fiscal — novembro/2026
- XMLs lidos: 412 (+3 eventos de cancelamento, 2 arquivos ignorados)
- Lançamentos no ERP: 409
- Total dos XMLs válidos: R$ 1.284.937,40 · Total no ERP: R$ 1.279.512,15 · Diferença: R$ 5.425,25
| Divergência | Qtd. |
|---|---|
| SEM_LANCAMENTO | 4 |
| VALOR_DIVERGENTE | 3 |
| LANCADA_CANCELADA | 1 |
| SEM_XML | 2 |
| LANCAMENTO_DUPLICADO | 1 |
| FORA_DO_PERIODO | 5 |
O que corrigir antes de fechar
- Nota 18.442 (Fornecedor Alfa) cancelada e lançada — estornar R$ 2.310,00 e o crédito de ICMS.
- 4 notas sem lançamento (R$ 3.880,10): três de frete e uma de material de escritório.
- Valor divergente na nota 9.115: XML R$ 1.465,00 × ERP R$ 1.415,00 — o lançamento ignorou o IPI.
- Lançamento duplicado da chave ...0147 (linhas 88 e 203).
- 2 lançamentos sem XML: pedir os arquivos aos fornecedores (rascunho de e-mail abaixo).
Planilha completa: conciliacao_nov_divergencias.csv (abre direto no Excel).
conciliacao_nov_divergencias.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Close the month without fiscal surprises
Accountants and finance teams in Brazil spend hours matching invoice XMLs against what was booked in the ERP. This skill does it in one run and explains each divergence.
What it checks
| Divergence | Why it matters |
|---|---|
| XML not booked | missing expense or revenue, lost tax credit |
| Booked without XML | no fiscal support for the entry |
| Wrong amount | typing errors, discounts, freight left out |
| Cancelled invoice booked | improper credit, must be reversed |
| XML without SEFAZ authorization | not a valid invoice yet |
| Duplicated booking | double credit risk |
| Outside the period | wrong accrual month |
How it works
- Point the agent to a folder of XMLs and a CSV export of your ERP (key, or CNPJ + number, and amount).
- A tested Python script reads NF-e/NFC-e (models 55/65), NFS-e Padrão Nacional and NF-e cancellation events, matches by access key (or CNPJ + number) and applies a rounding tolerance.
- You get an Excel-ready divergence sheet (semicolon, decimal comma), a summary with totals XML × ERP, and the agent explains causes and fixes, drafts supplier requests and groups results as you need.
Runs locally with the Python standard library: your fiscal data never leaves your machine.
Reads NF-e/NFC-e (models 55/65), NFS-e Padrão Nacional and NF-e cancellation events; CT-e and municipal NFS-e layouts are not read. Does not query SEFAZ: include cancellation XMLs to detect cancelled invoices. The ERP export must be CSV.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
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 to use
No account required to browse
Trust & safety
Security scan
Security scan passed 9 days ago
- Free with an Agensi account
- Software
Python 3.8+
Permissions
What's inside
Frequently Asked Questions
New in Finance & Accounting
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Finance & Accounting.