From 55cfcce496bc15a064522d8d1541282ddbde1e9a Mon Sep 17 00:00:00 2001 From: Hoid Date: Mon, 9 Feb 2026 01:47:04 +0000 Subject: [PATCH] Add invoice-generator skill --- skills/invoice-generator/SKILL.md | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 skills/invoice-generator/SKILL.md diff --git a/skills/invoice-generator/SKILL.md b/skills/invoice-generator/SKILL.md new file mode 100644 index 0000000..ff49141 --- /dev/null +++ b/skills/invoice-generator/SKILL.md @@ -0,0 +1,35 @@ +--- +name: invoice-generator +description: Generate and send time tracking invoice Excel files from FreeScout data. Use when the user asks for an invoice, time report, or hours summary for a customer and time period. +--- + +# Invoice Generator + +Generate Excel invoices from FreeScout time tracking data and send them via WhatsApp. + +## Workflow + +1. Identify customer name and date range from the user's request +2. Run: `bin/freescout excel --from YYYY-MM-DD --to YYYY-MM-DD --customer "NAME" --output /tmp/invoice-CUSTOMER-PERIOD.xlsx` +3. Send the file to the user via the `message` tool +4. Reply with NO_REPLY (the file message is the reply) + +## Available customers + +If unsure which customer, run `bin/freescout report --from 2024-01-01 --to 2099-12-31` to see all, or pass a wrong name — the script prints available customers. + +## Other commands + +``` +bin/freescout mailboxes # List mailboxes +bin/freescout users # List users +bin/freescout report --from --to # Terminal report (add --customer, --mailbox, --user) +bin/freescout excel --from --to # Excel generation (add --customer, --mailbox, --user, --output) +``` + +## Notes + +- `time_spent` in DB is seconds, displayed as decimal hours +- Excel groups by conversation: subject, customer, website, total hours +- Customer and Website come from FreeScout custom fields (dropdowns) +- Only timelogs within the date range are counted, not conversation creation dates