跳到正文
DEV Community· 管理员·· 3 小時前AI 評分59

eu-einvoice 提供 Python 歐盟電子發票建立與驗證工具

eu-einvoice: create and validate EU e-invoices (XRechnung, Peppol, ZUGFeRD) in Python, no Java

AI 導讀

eu-einvoice 是一款以 Python 運行的 Claude Skill,可建立及驗證 XRechnung、Peppol、ZUGFeRD 等歐盟電子發票,也可讀取和轉換收到的發票。

正文

管理员

Germany (B2B from 2027), France (from Sept 2026) and Belgium (Peppol since Jan 2026) now require machine-readable e-invoices. Asking Claude to "write an XRechnung XML" usually gives you something that looks right but gets rejected: the VAT breakdown is off by a cent, the Leitweg-ID is missing, or an identifier uses the wrong scheme.

So I packaged the tooling as a skill:

  • Claude fills a JSON model from your description; the script computes line totals, the VAT breakdown and the document totals.
  • It generates UBL or CII (or a Factur-X / ZUGFeRD PDF/A-3), then validates the output against the official CEN EN 16931, KoSIT XRechnung and OpenPeppol Schematron rules. They run in Python via Saxon-HE, so no Java is needed.
  • Rejections come back with the rule ID and a fix. It also checks check digits the official rules miss (Leitweg-ID, SIREN, Belgian enterprise numbers).
  • It reads and converts received invoices too ("what do I owe in this xrechnung.xml?").

I benchmarked it skill-creator style: the same tasks run by Claude with and without the skill. Both usually get there, but with the skill it's about 2× faster. In one case the user's Leitweg-ID was mistyped: the skill caught it, the baseline didn't. Details and all eval cases are in the repo.

Repo (MIT): https://github.com/uulucky/claude-skill-eu-einvoice

Claude Code: /plugin marketplace add uulucky/claude-skill-eu-einvoice then /plugin install eu-einvoice@uulucky-skills

Python only: pip install eu-einvoice

Built with Claude Code. Feedback from anyone who actually deals with XRechnung or Peppol is very welcome.

來源:DEV Community · dev.to