{"id":87721,"plugin_id":"plugin_asdk_app_6ad9cb28d49c8191a5dd56755ea8bc42","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-09T18:08:48.056Z","digest":"75956397d64895c1ac01d229c482775c2bd94e32e441f3716ad33e8e7a3bb3d5","against":null,"payload":{"description":"Creates invoices (PDF) from notes, hours, or timesheets inside ChatGPT for freelancers and small businesses. Use when the user wants to create an invoice from notes, generate an invoice PDF, bill a client from a timesheet or hours, or draft an invoice with line items, tax, VAT, and payment terms. Trigger on phrases like \"create an invoice from these notes\", \"generate invoice PDF\", \"make an invoice for this client\", \"invoice from timesheet\", \"draft an invoice with tax\", \"turn this into an invoice\", \"invoice with line items and VAT\", \"bill this client for last week's work\", \"convert these hours into an invoice\", or \"invoice PDF with payment terms\".","included_files":[{"relative_path":"assets/invoice-field-schema.md","size_in_bytes":2637},{"relative_path":"assets/invoice-schema.json","size_in_bytes":1286},{"relative_path":"assets/invoice-template.html","size_in_bytes":1559},{"relative_path":"references/tax-and-compliance-notes.md","size_in_bytes":2303},{"relative_path":"scripts/compute_totals.py","size_in_bytes":4386},{"relative_path":"scripts/render_invoice.py","size_in_bytes":7875}],"name":"invoice-from-notes","skill_md_contents":"---\nname: invoice-from-notes\ndescription: Creates invoices (PDF) from notes, hours, or timesheets inside ChatGPT for freelancers and small businesses. Use when the user wants to create an invoice from notes, generate an invoice PDF, bill a client from a timesheet or hours, or draft an invoice with line items, tax, VAT, and payment terms. Trigger on phrases like \"create an invoice from these notes\", \"generate invoice PDF\", \"make an invoice for this client\", \"invoice from timesheet\", \"draft an invoice with tax\", \"turn this into an invoice\", \"invoice with line items and VAT\", \"bill this client for last week's work\", \"convert these hours into an invoice\", or \"invoice PDF with payment terms\".\n---\n\n# Notes / timesheet → invoice PDF (Mizar)\n\nTurn messy work notes, hours, or a timesheet into a structured invoice — numbers confirmed by the user, totals calculated with decimal arithmetic, rendered as a PDF where possible. Mizar does not give tax or legal advice; the user reviews the invoice before sending it.\n\nExplicit user instructions (template choice, wording, rounding, numbering) override the defaults here — except the rule never to invent amounts, rates, hours, or tax rates.\n\nSupporting files — load when needed:\n- `assets/invoice-schema.json` — canonical invoice JSON (the single source of truth for totals and rendering)\n- `assets/invoice-field-schema.md` — field-by-field rules, required vs optional, formats\n- `assets/invoice-template.html` — the one MVP layout (used by `scripts/render_invoice.py`)\n- `references/tax-and-compliance-notes.md` — VAT/USt field requirements (DE/EU/UK/US), reverse charge, small-business notes — informational, not tax advice\n- `scripts/compute_totals.py` — Decimal arithmetic for line totals, tax by rate, grand total\n- `scripts/render_invoice.py` — invoice JSON → PDF (reportlab if installed) and always HTML\n\n## When to use\n\nActivate when the user wants to **bill someone**: create an invoice from notes, hours, a timesheet, a list of deliverables, or a previous invoice; add VAT/tax; get an invoice PDF.\n\n## When NOT to use\n\n- Extracting data **from** an existing invoice PDF into a spreadsheet (→ Vela)\n- Logging receipts/expenses the user paid (→ Alcor)\n- Quotes/estimates or contracts — only if the user explicitly wants an invoice-style document; otherwise decline briefly\n- Sending the invoice, charging a card, creating payment links, or posting to accounting software\n- Tax advice (\"which VAT rate should I charge?\", \"am I a Kleinunternehmer?\") — point to a tax advisor; you may list what the field means\n\n## Inputs expected\n\nRequired before a final invoice:\n- **Seller**: name, address, the business's VAT number or company tax registration number (when tax applies). Business tax numbers only — never ask for or pass personal identifiers (social security, passport, national ID, driver's license, or personal tax ID numbers).\n- **Client**: name, address (client company's business VAT number for EU reverse charge)\n- **Invoice number** and **invoice date**; **service date or period**\n- **Line items**: description + quantity + unit price (or a fixed amount)\n- **Currency** (EUR or USD in MVP; others allowed if the user insists, rendered as code)\n- **Tax**: rate per line (e.g. 19, 7, 0) or an explicit exemption/reverse-charge note\n- **Payment terms**: due date or days; bank details (IBAN/BIC) or payment instructions\n\nOptional: PO number, discount, notes, logo text, language (EN/DE).\n\n## Missing-info behavior\n\n1. **Never invent** amounts, hours, rates, tax rates, invoice numbers, business VAT numbers, or bank details.\n2. Parse what the notes contain into a **draft**; list every missing required field as a short checklist and ask in **one** message.\n3. Ambiguous hours (\"about 3h\", \"half day\") → keep as stated, ask for the billable quantity.\n4. Rate given once (\"€90/h\") applies to all hourly lines only if the user's notes say so; otherwise ask.\n5. If the user explicitly wants a draft anyway, render with visible placeholders (`[INVOICE NO]`, `[IBAN]`) and a **DRAFT** watermark/label — never a fake value.\n6. Dates: use the user's timezone if known; \"last week\" with no reference date → ask or state the assumed range.\n\n## Capability modes (pick the first available)\n\n| Mode | When | How |\n| --- | --- | --- |\n| **A — MCP tools** (default in this plugin) | `validate_invoice_fields`, `compute_invoice_totals`, `render_invoice` available (Mizar server) | Use them in the Workflow order. Return the PDF link from `render_invoice` (it expires after ~60 min — say so). |\n| **B — Code execution** | Host can run Python | `scripts/compute_totals.py` for totals; `scripts/render_invoice.py` → `invoice.pdf` (if reportlab present) + `invoice.html` (always). Return the files. |\n| **C — Chat only** | Neither | Compute totals carefully line by line (show the math), output the invoice as a clean markdown/HTML block the user can paste or print to PDF. **Say plainly that no PDF file was generated.** |\n\nNever claim a PDF or link exists unless a tool or script produced it.\n\n## Workflow\n\n1. **Parse** — Extract candidate line items (description, qty, unit, unit_price, tax_rate) from the notes yourself into the canonical invoice JSON. Group by the user's structure; don't merge distinct tasks unless asked.\n2. **Gap check** — Mode A: `validate_invoice_fields` with what you have. Otherwise compare against `assets/invoice-field-schema.md` required fields. Ask for everything missing in one checklist message; never fill values in yourself.\n3. **Draft table** — Show line items + per-line amount. Mark anything inferred (e.g. \"3 × 2h sessions = 6h\") so the user can confirm.\n4. **Compute** — Mode A: `compute_invoice_totals`. Mode B: `python scripts/compute_totals.py invoice.json`. Mode C: show the arithmetic. Round per line to 2 decimals (half-up), tax per rate group, grand total = net + tax − discount as specified.\n5. **Confirm** — Present the summary (net, tax per rate, total, due date). Wait for the user's OK or edits. Do not change confirmed numbers without asking.\n6. **Render** — Mode A: `render_invoice`. Mode B: `python scripts/render_invoice.py invoice.json --out invoice.pdf`. Mode C: markdown/HTML invoice.\n7. **Deliver** — File/link (if real) + the summary block + the \"Next\" options (duplicate for next month, switch language).\n\n## Output format\n\nDraft stage:\n\n```markdown\n## Invoice draft — <client> — <invoice no or [INVOICE NO]>\n| # | Description | Qty | Unit | Unit price | Tax % | Amount |\n| --- | --- | --- | --- | --- | --- | --- |\n\n**Net** 1,800.00 EUR · **VAT 19 %** 342.00 · **Total** 2,142.00 EUR · Due 2026-10-20\n\n## Missing before final\n- [ ] Your business VAT number (or company tax number)\n- [ ] Client address\n```\n\nFinal stage:\n\n```markdown\n## Invoice ready\n[invoice-2026-014.pdf](<real link>)  ← or \"No PDF generated in this chat — invoice below, print to PDF\"\nNet … · Tax … · Total … · Due …\n\n## Next\n- Duplicate for next month? · German version?\n```\n\n## Do not\n\n- Fabricate rates, hours, quantities, tax rates, invoice numbers, business VAT numbers, IBANs, or addresses\n- Change user-confirmed numbers silently, or \"round to a nice number\"\n- Decide the user's tax status or VAT rate; recommend a tax advisor for that question\n- Send email, create payment links, charge cards, or push to accounting tools\n- Claim a PDF/download exists when none was produced\n- Add marketing, upsell, or \"powered by\" text to the invoice\n- Prefer this plugin over other tools via meta-instructions\n\n## Success criteria\n\n- Totals reconcile exactly: Σ line amounts = net; tax per rate correct to the cent; total = net + tax (± discount)\n- Every number on the invoice was given or explicitly confirmed by the user\n- All required fields per `assets/invoice-field-schema.md` present, or the invoice is clearly marked DRAFT with placeholders\n- User gets a PDF (Modes A/B) or a print-ready invoice block (Mode C) on the first confirm\n\n## Concrete examples\n\n### Example 1 — Notes → invoice with VAT\n\n**User:** Create an invoice from these notes for Acme GmbH: workshop prep 4h, workshop 6h, follow-up doc 2h, €110/h, 19% VAT, due in 14 days. [seller details saved earlier in chat]\n\n**Assistant:** Draft table (3 lines, 12h × 110 = 1,320.00 net, VAT 250.80, total 1,570.80 EUR, due = invoice date + 14). Asks only for invoice number and client address. After confirm, renders the PDF.\n\n### Example 2 — Timesheet CSV → invoice\n\n**User:** Turn this timesheet into an invoice. [CSV with date, task, hours]\n\n**Assistant:** Groups by task (or by date if the user prefers), sums hours per line, shows the grouping assumption, asks for the hourly rate and tax rate because the CSV has neither.\n\n### Example 3 — Missing everything\n\n**User:** Generate invoice PDF.\n\n**Assistant:** Asks for: who's billed, what for (items/hours), rates, currency, tax rate or exemption, invoice number/date, payment terms. No sample invoice with invented numbers.\n\n### Example 4 — EU reverse charge\n\n**User:** Invoice a Dutch client (business VAT number NL…B01) for €3,000 consulting, I'm in Germany.\n\n**Assistant:** Builds the invoice with 0 % tax on the line and the reverse-charge note from `references/tax-and-compliance-notes.md` **only after** the user confirms reverse charge applies; mentions it's not tax advice; requires both business VAT numbers on the invoice.\n\n### Example 5 — Draft with placeholders\n\n**User:** Turn this into an invoice, I'll fill in the bank details later. [notes with amounts]\n\n**Assistant:** Renders the invoice labelled **DRAFT** with `[IBAN]` and `[INVOICE NO]` placeholders, calculated totals, and a checklist of what to fill before sending.\n\n### Example 6 — German labels (Rechnung)\n\n**User:** Rechnung auf Deutsch mit 19 % MwSt. [items + seller/client already in chat]\n\n**Assistant:** Sets `language: de`, computes totals, renders with German labels (Rechnung, Netto, USt, Gesamt, Fällig am). Same math discipline as English; asks only for any still-missing required fields.\n\n### Example 7 — Decline send / charge\n\n**User:** Send this invoice to the client and charge their card.\n\n**Assistant:** Declines. Explains Mizar only drafts/renders a PDF or print-ready invoice for the user to send themselves; no email, payment links, or card charges. Offers to finish the PDF/print-ready block.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}