Initial commit for helios-qr-bank-transfer

This commit is contained in:
Helios Agent 2026-02-23 01:25:46 +01:00
commit 30e9407f91
No known key found for this signature in database
GPG key ID: C8259547CD8309B5
3 changed files with 101 additions and 0 deletions

23
README.md Normal file
View file

@ -0,0 +1,23 @@
# Helios QR Bank Transfer (EPC/GiroCode)
Generates SEPA QR codes (EPC069-12) for mobile banking apps.
## Usage
```bash
python3 generate_epc_qr.py \
--name "Max Mustermann" \
--iban "DE89370400440532013000" \
--amount 25.00 \
--reason "Abendessen" \
--output /tmp/qr.png
```
## Requirements
- `segno` (Python library for QR codes)
- `Pillow` (optional, for image handling)
## Security
Generated QR codes contain sensitive payment data. Delete them immediately after use.

37
SKILL.md Normal file
View file

@ -0,0 +1,37 @@
---
name: epc-qr
description: Generate EPC/GiroCode QR codes for SEPA bank transfers. Use when Moritz wants to send money, make a payment, or transfer to someone. Creates a scannable QR code for banking apps. Known IBANs are stored in memory/contacts.md. IMPORTANT - always delete the QR image after sending it.
---
# EPC QR Code Generator
Generate EPC/GiroCode QR codes that can be scanned with banking apps to initiate SEPA transfers.
## Workflow
1. Determine recipient name, IBAN, amount, and Verwendungszweck
2. Look up IBAN from `memory/contacts.md` if recipient is a known contact
3. Generate QR code via script
4. Send QR image to Moritz via message tool (use `filePath` for the image)
5. **Delete the QR image file immediately after sending** (security - contains payment data)
## Script Usage
```bash
python3 skills/helios-qr-bank-transfer/generate_epc_qr.py \
--name "Max Mustermann" \
--iban "DE89370400440532013000" \
--amount 25.00 \
--reason "Abendessen" \
--output /tmp/epc_qr.png
```
Script prints the output path on success.
## Important
- Always confirm amount and recipient with Moritz before generating if ambiguous
- IBAN spaces are stripped automatically
- Amount must be in EUR, between 0.01 and 999999999.99
- After sending the QR code image, **always delete it** with `rm`
- Never store QR codes permanently - they contain sensitive payment information

41
generate_epc_qr.py Executable file
View file

@ -0,0 +1,41 @@
#!/usr/bin/env python3
"""Generate an EPC/GiroCode QR code for SEPA transfers."""
import argparse
import sys
from segno import helpers
def main():
parser = argparse.ArgumentParser(description="Generate EPC QR code (GiroCode)")
parser.add_argument("--name", required=True, help="Recipient name")
parser.add_argument("--iban", required=True, help="Recipient IBAN")
parser.add_argument("--amount", required=True, type=float, help="Amount in EUR")
parser.add_argument("--reason", default="", help="Verwendungszweck / remittance text")
parser.add_argument("--output", default="/tmp/epc_qr.png", help="Output file path")
parser.add_argument("--scale", type=int, default=10, help="QR code scale factor")
args = parser.parse_args()
# Validate amount
if args.amount <= 0 or args.amount > 999999999.99:
print("Error: Amount must be between 0.01 and 999999999.99 EUR", file=sys.stderr)
sys.exit(1)
# Clean IBAN (remove spaces)
iban = args.iban.replace(" ", "")
qr = helpers.make_epc_qr(
name=args.name,
iban=iban,
amount=args.amount,
text=args.reason,
encoding='UTF-8'
)
qr.save(args.output, scale=args.scale)
print(args.output)
if __name__ == "__main__":
main()