- Home
- Skills
- Finance & Accounting
- The French FEC, Validated Before the Audit
The French FEC, Validated Before the Audit
Check a fichier des ecritures comptables the way a tax administration will: eighteen columns, AAAAMMJJ dates, entries that balance.
$39
Works with the AI Agents you already use
The French FEC, Validated Before the Audit
Example session with this skill installed
Here is the FEC my accounting software exported for 2026, before I send it to my accountant. Check it the way the administration would and tell me exactly what to fix, and where - in the file or in the export settings.
- Read your context and instructions
- Compiled the the french fec
Summary
The export is
not ready to hand over. Four findings, two of them blocking. Three belong in your export settings rather than in the file, which matters: editing the file would hide a defect that comes back next quarter.
Validator output
$ python scripts/valider_fec.py FEC_2026.txt --exercice 2026-01-01:2026-12-31
encoding iso-8859-15, separator tabulation
412 line(s), 137 entry/entries, debit 128430,55 / credit 128380,55
[bloquant ] ligne 87: EcritureDate = '04/03/2026': the format is AAAAMMJJ, with no separator
[bloquant ] ecriture AC00412: does not balance: debit 1150.00 against credit 1200.00 (lines 203, 204, 205)
[bloquant ] fichier: the file as a whole does not balance: 128430.55 / 128380.55
[majeur ] lettrage A12: lettered group does not clear: 1200.00 / 1150.00
[mineur ] ValidDate: 6 line(s) with no ValidDate: entries are expected to be validated and dated
Read the header line first: the encoding and the entry count are a check in themselves. If 137 entries or 128 430,55 does not match your trial balance for the same period, the export is not what you think it is - before any finding is read.
What to do with each
| Finding | Level | Where the fix belongs |
|---|---|---|
04/03/2026 on line 87 | blocking | Export settings. One journal is normalising dates and another is not. Fix the template, not the file. |
Entry AC00412 off by 50,00 | blocking | Your ledger. A line was edited after posting. Post a correcting entry - do not alter the validated one. |
| File out of balance by 50,00 | blocking | Same 50,00. It resolves with the entry above; if it does not, a row was dropped during export. |
Lettering A12 does not clear | major | Your ledger. The reconciliation is wrong, and a wrong lettering distorts everything built on it. Unletter, reletter on date and reference, not amount alone. |
6 lines with no ValidDate | minor | Validate and date those entries before handover. An unvalidated entry invites a question you gain nothing by answering. |
Note the two 50,00 figures are the same defect counted twice, per entry and over the file. That is deliberate: the two checks catch different faults, and seeing both tells you the imbalance is local rather than a dropped row.
Next steps
- Correct the export template, re-export, and re-run - do not hand-edit
FEC_2026.txt. - Post the correcting entry for
AC00412, then redo the lettering ofA12. - Before handover, confirm every
PieceRefresolves to a document you can produce now, and that suspense accounts are empty or explainable. - Archive the file you hand over together with its fingerprint and this report. What you hand over must be what you checked, and you must be able to show it was.
- Keep the validator in your closing routine. A rule that breaks in March is cheap in March.
Indicative check on the points listed. Not legal or accounting advice - confirm the current requirements with your accountant.
Connects securely to your tools. The creator never sees your data.
About this skill
A FEC is checked by a program, not read by a person.
The fichier des ecritures comptables has a legally fixed shape: eighteen named columns, in order, dates as AAAAMMJJ, one tab or pipe as separator. A file that opens perfectly in a spreadsheet is still refused when a column was renamed by an export, a date carries slashes, or one entry does not balance.
That refusal arrives during an audit, with a deadline already running. The point of this skill is that it arrives from your own terminal instead, a month earlier.
What the validator checks
valider_fec.py detects the encoding and the separator, then checks:
- the eighteen columns, by exact name and in order - the commonest rejection is an export that renames one, and the tool names which;
- every date, as
AAAAMMJJand as a real calendar date (20260230passes a regex and fails a calendar); - every amount, and whether comma and dot are mixed in one file - a sign two exports were concatenated;
- the three indivisible field pairs (
CompAuxNum/CompAuxLib,EcritureLet/DateLet,Montantdevise/Idevise), where one filled and one empty is an export defect rather than a bookkeeping one; - balance three times - per entry, per lettered group, and over the whole file, because a file can pass one and fail another;
- a document reference on every line, because an entry whose document cannot be produced will be challenged whatever the balance says.
Findings are graded bloquant / majeur / mineur, because an audit grades too, and the exit code is non-zero on any of them so a closing script gets the whole list instead of a judgement made by a program.
Verified, not asserted
Seventeen files. Five accepted: a conformant export in ISO-8859-15, the same in UTF-8 with a BOM, the same pipe-separated, one carrying accents, and one with a properly paired subsidiary account. Twelve refused: dates as 04/03/2026, an entry out of balance by 50, a column renamed by the export, comma and dot mixed in one file, a tab inside a label shifting every following field, an entry dated outside the period, an empty PieceRef, each of the three pairs half-filled, an empty file, and a path that does not exist.
What is in EXPERT.md
The eighteen fields with their content rules and which nine are mandatory; a rejection table matching each symptom to its cause and its fix; which findings are blocking and which are not; the audit-day checklist (the two points that actually cost money are producing the documents behind PieceRef, and explaining any remaining suspense balance); period naming and handover; and a table for diagnosing an export that keeps breaking the same check.
Where this sits
An invoice becomes an entry, entries become a ledger, the ledger becomes a FEC. This skill covers the last step. The entries themselves - validation, lettering, trial balance, indicative statements - are the companion skill double-entry-accounting-engine; the invoice format upstream is factur-x-einvoicing-fr.
Limits
It validates the Debit/Credit column shape, which is what nearly every accounting package emits; the format also admits a single Montant + Sens pair, which this validator does not check. It reads the file and writes nothing: it does not repair an export, because the fix belongs in the export, not in the file you hand over.
Not legal or accounting advice. The format and the obligations rest on texts that are amended; confirm the current requirements with your accountant and have the export reviewed before it is handed over.
Requires Python 3. Does not provide legal or tax advice. Focused only on the technical file format and internal arithmetic balance of the FEC export.
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 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
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 27 days ago
Requires