← 返回 Skills 市场
quantx-heiko

ZUGFeRD Invoice Merger

作者 quantx-heiko · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
317
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install zugferd-invoice
功能描述
Merge ZUGFeRD 2.1 compliant invoice PDF and time report into a single visible multi-page PDF/A-3b file with embedded XML for German B2B/Gov use.
使用说明 (SKILL.md)

zugferd-invoice

Create ZUGFeRD 2.1 / Factur-X compliant e-invoices with visible merged pages. German B2B / Gov-ready.

🇩🇪 Germany/EU only - This skill implements the German ZUGFeRD standard for electronic invoicing.

Features

  • Visible pages: Merge invoice + time report into a single multi-page PDF
  • ZUGFeRD 2.1 compliant: PDF/A-3b with embedded XML
  • EN16931 valid: Ready for B2B portals and government submission
  • No paid APIs: Uses MustangProject (open source) + GhostScript
  • Two workflows: Visible pages (recommended) or attachment-only fallback

Requirements

Dependency Install Notes
Java 11+ brew install openjdk@21 Required by MustangProject
GhostScript brew install ghostscript PDF/A-3 conversion
mustang.jar Manual download ZUGFeRD processor

Install mustang.jar

mkdir -p ~/.openclaw/tools/mustang
curl -L https://github.com/ZUGFeRD/mustangproject/releases/download/core-2.22.0/mustang.jar \
     -o ~/.openclaw/tools/mustang/mustang.jar

Usage

Recommended: GhostScript Workflow (Visible Pages)

export PATH="/opt/homebrew/opt/openjdk@21/bin:$PATH"
cd ~/.openclaw/workspace/skills/zugferd-invoice

python3 scripts/zugferd_pages_workflow.py \
  --invoice Rechnung.pdf \
  --attachment Zeitnachweis.pdf \
  --output Rechnung_komplett.pdf

Output:

  • Multi-page PDF (both documents visible)
  • PDF/A-3b compliant
  • ZUGFeRD 2.1 XML embedded
  • Valid for B2B/Gov portals

Fallback: Attachment-Only Workflow

python3 scripts/zugferd_workflow.py \
  --invoice Rechnung.pdf \
  --attachment Zeitnachweis.pdf \
  --output Rechnung_komplett.pdf

Output:

  • Invoice visible, time report as file attachment
  • Use when GhostScript is unavailable

Arguments

Flag Description Required
--invoice Original ZUGFeRD e-invoice PDF ✅ Yes
--attachment Time report / additional document ✅ Yes
--output Output path for merged PDF ✅ Yes
--keep-temp Keep temporary files (debug) ❌ No

Workflows Compared

Feature GhostScript (Recommended) Attachment-Only (Fallback)
Visible pages ✅ Both documents ⚠️ Only invoice
Time report visibility ✅ Page 2+ ❌ File attachment only
PDF/A-3 compliance ✅ Full ✅ Full
Requires GhostScript ✅ Yes ❌ No
Complexity Medium Low

Technical Details

GhostScript Workflow Steps

  1. Extract XML from original e-invoice
  2. Merge PDFs with GhostScript (visible pages)
  3. Convert to PDF/A-3 with GhostScript
  4. Embed XML with MustangProject combine
  5. Validate final PDF

Why This Works

Standard PDF merging breaks PDF/A-3 compliance. The trick:

  1. Merge first (any PDFs allowed)
  2. Then convert the merged result to PDF/A-3
  3. Finally embed the ZUGFeRD XML

This preserves visible pages while achieving full compliance.

Why Attachment-Only?

If your time report cannot be converted to PDF/A (e.g., Lexware exports with broken ICC profiles), use --attachments flag which embeds files without visible merging.

Troubleshooting

"gs not found"

brew install ghostscript

"java not found"

brew install openjdk@21
export PATH="/opt/homebrew/opt/openjdk@21/bin:$PATH"

"mustang.jar not found"

Download from MustangProject releases

Validation fails

  • Ensure input invoice is valid ZUGFeRD PDF/A-3
  • Check GhostScript version: gs --version (should be 10+)

Output Verification

# Check PDF/A compliance
java -jar ~/.openclaw/tools/mustang/mustang.jar --action validate \
  --source Rechnung_komplett.pdf

# Should output: \x3Csummary status="valid"/>

Notes

  • ZUGFeRD = Germany only: Electronic invoicing standard for German B2B
  • Factur-X: French equivalent (also supported)
  • EN16931: European standard for e-invoices
  • Source PDFs: Invoice must be ZUGFeRD PDF/A-3; attachment can be any PDF

Dependencies

  • Python 3.8+
  • Java 11+ (MustangProject)
  • GhostScript 10+
  • MustangProject CLI 2.22.0+

See Also

安全使用建议
This skill appears coherent with its stated purpose, but take these precautions before installing/using it: 1) Download mustang.jar only from the official MustangProject GitHub releases page and verify the checksum/signature if available — running an untrusted JAR can execute arbitrary code. 2) Ensure Java and GhostScript are installed from trusted package sources (homebrew or distro packages). 3) Be aware the SKILL.md uses macOS/homebrew paths; if you run on Linux/Windows you may need to adjust PATH and install commands. 4) The included sample XML files contain real‑looking contact/IBAN data — treat them as sample data; don't accidentally publish them. 5) Run the skill on test files first and validate outputs before submitting to B2B/Gov portals. 6) If you need higher assurance, review the mustang.jar release's checksum or build MustangProject from source.
功能分析
Type: OpenClaw Skill Name: zugferd-invoice Version: 1.0.0 The OpenClaw AgentSkills bundle for 'zugferd-invoice' is benign. It implements a workflow to create ZUGFeRD-compliant e-invoices using standard open-source tools like MustangProject (Java) and GhostScript. The `SKILL.md` and `README.md` files instruct the agent to download `mustang.jar` from its official GitHub repository via `curl`, which is a legitimate dependency installation. Python scripts (`zugferd_pages_workflow.py`, `zugferd_workflow.py`) execute `java` and `gs` using `subprocess.run` with arguments passed as lists, preventing shell injection. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts to subvert the agent's intended purpose.
能力评估
Purpose & Capability
The name/description (ZUGFeRD invoice merger) match the code and required tools: Java (mustang.jar) and GhostScript are legitimately needed for extracting/re‑embedding ZUGFeRD XML and producing PDF/A‑3. No unrelated environment variables or credentials are requested. Minor note: the SKILL.md and scripts assume a macOS/homebrew layout (/opt/homebrew/opt/openjdk@21) and recommend brew; the skill has no OS restriction declared, so platform assumptions should be documented or adjusted.
Instruction Scope
SKILL.md and the two Python scripts only operate on user-supplied PDFs and local temporary/output paths. The runtime steps are explicit (extract XML, merge with gs, convert to PDF/A‑3, re‑embed XML with mustang). There are no instructions to read unrelated system files or to transmit data to remote endpoints. The scripts call external binaries (java, gs) with arguments; subprocess calls use argument lists (no shell interpolation).
Install Mechanism
No automated install spec is provided (instruction-only). The SKILL.md recommends manually downloading mustang.jar via curl from the official GitHub releases URL — a reasonable approach. Recommendation: verify the downloaded JAR (checksum/signature) because running arbitrary JARs carries risk. The manual curl direction writes into ~/.openclaw/tools/mustang which is a clear, confined location.
Credentials
The skill requests no credentials or secret environment variables. It does modify PATH locally for the subprocess environment to include the openjdk@21 bin path (expected for invoking java). No extraneous access to other configs or sensitive data is requested.
Persistence & Privilege
The skill is not force-included (always: false) and is user-invocable. It does create a workspace under the skill directory (temp and expected ~/.openclaw/tools paths) but does not modify other skills or system-wide agent settings. Autonomous invocation is enabled by default on the platform but is not combined with other concerning flags.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install zugferd-invoice
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /zugferd-invoice 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: GhostScript workflow for visible pages + ZUGFeRD 2.1 compliance
元数据
Slug zugferd-invoice
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

ZUGFeRD Invoice Merger 是什么?

Merge ZUGFeRD 2.1 compliant invoice PDF and time report into a single visible multi-page PDF/A-3b file with embedded XML for German B2B/Gov use. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 317 次。

如何安装 ZUGFeRD Invoice Merger?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install zugferd-invoice」即可一键安装,无需额外配置。

ZUGFeRD Invoice Merger 是免费的吗?

是的,ZUGFeRD Invoice Merger 完全免费(开源免费),可自由下载、安装和使用。

ZUGFeRD Invoice Merger 支持哪些平台?

ZUGFeRD Invoice Merger 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ZUGFeRD Invoice Merger?

由 quantx-heiko(@quantx-heiko)开发并维护,当前版本 v1.0.0。

💬 留言讨论