1kalin/afrexai-invoice-engine/SKILL.md
Generate, manage, and track professional invoices with payment terms, recurring billing, overdue automation, and financial reporting. Use when creating invoices, tracking payments, managing clients, or reviewing revenue.
npx skillsauth add openclaw/skills afrexai-invoice-engineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A zero-dependency agent skill for end-to-end invoicing — from quote to payment to reporting.
When the user says "create an invoice" or "bill [client]":
Maintain a YAML client database in your workspace:
# clients.yaml
clients:
- id: "CLI-001"
name: "Acme Corp"
contact: "Jane Smith"
email: "[email protected]"
address:
line1: "123 Business Ave"
line2: "Suite 400"
city: "New York"
state: "NY"
zip: "10001"
country: "US"
tax_id: "US-EIN-12-3456789"
payment_terms: "net-30" # net-15, net-30, net-45, net-60, due-on-receipt, custom
preferred_currency: "USD"
default_tax_rate: 0 # 0 for B2B cross-border, local rate for domestic
notes: "PO required for invoices > $5,000"
created: "2026-01-15"
lifetime_revenue: 12500.00
invoices_sent: 3
invoices_paid: 2
avg_days_to_pay: 22
When adding a new client, collect:
[PREFIX]-[YEAR].[MONTH].[SEQUENCE]
Example: INV-2026.02.001
Configurable prefix per business line:
INV = standard invoicePRO = proforma / quoteREC = recurring invoiceCN = credit noteWhen generating an invoice, structure it as:
╔══════════════════════════════════════════════════════════╗
║ [YOUR COMPANY NAME] ║
║ [Address Line 1] ║
║ [City, State ZIP] ║
║ [Country] ║
║ Tax ID: [YOUR TAX ID] ║
╠══════════════════════════════════════════════════════════╣
║ ║
║ INVOICE [NUMBER] Date: [ISSUE DATE] ║
║ Due: [DUE DATE] ║
║ ║
║ Bill To: Payment Terms: ║
║ [CLIENT NAME] [Net-30 / etc.] ║
║ [Client Address] ║
║ [City, State ZIP] PO Number: ║
║ Tax ID: [CLIENT TAX ID] [If applicable] ║
║ ║
╠══════════════════════════════════════════════════════════╣
║ # │ Description │ Qty │ Rate │ Amount ║
╠═════╪══════════════════════╪═════╪═════════╪════════════╣
║ 1 │ [Service/Product] │ 1 │ $X,XXX │ $X,XXX.XX ║
║ 2 │ [Service/Product] │ 3 │ $XXX │ $X,XXX.XX ║
║ 3 │ [Expense passthrough]│ 1 │ $XXX │ $XXX.XX ║
╠═════╧══════════════════════╧═════╧═════════╧════════════╣
║ Subtotal: $XX,XXX.XX ║
║ Discount: -$X,XXX.XX ║
║ Tax (X%): $X,XXX.XX ║
║ ───────────────────────── ║
║ TOTAL DUE: $XX,XXX.XX ║
╠══════════════════════════════════════════════════════════╣
║ Payment Methods: ║
║ • Bank Transfer: [Bank] | Acct: [XXXX] | Routing: [XX] ║
║ • PayPal: [email] ║
║ • Stripe: [payment link] ║
║ • Bitcoin: [address] / Lightning: [LNURL] ║
║ ║
║ Notes: [Custom message / thank you / late fee notice] ║
╚══════════════════════════════════════════════════════════╝
Is client in same country as you?
├── YES → Apply local tax rate
│ ├── Client tax-exempt? → Add exemption reference, 0% tax
│ └── Client NOT exempt → Apply standard rate
└── NO → Usually 0% (reverse charge / export)
├── Both in EU? → Reverse charge mechanism (0%, note on invoice)
├── US interstate? → Check nexus rules
└── International → 0% with export reference
DRAFT → SENT → VIEWED → PARTIALLY_PAID → PAID → CLOSED
↓
OVERDUE → ESCALATED → WRITTEN_OFF
↓
DISPUTED → RESOLVED → PAID
# invoices.yaml
invoices:
- number: "INV-2026.02.001"
client_id: "CLI-001"
status: "sent"
issue_date: "2026-02-13"
due_date: "2026-03-15"
currency: "USD"
subtotal: 5000.00
discount: 0
tax: 0
total: 5000.00
amount_paid: 0
balance_due: 5000.00
payment_terms: "net-30"
line_items:
- description: "AI Integration Consulting — February"
qty: 20
rate: 250.00
amount: 5000.00
payments: []
notes: ""
sent_date: "2026-02-13"
reminders_sent: 0
created: "2026-02-13T10:30:00Z"
When a payment comes in:
payments:
- date: "2026-03-10"
amount: 5000.00
method: "bank_transfer" # bank_transfer, stripe, paypal, btc, cash, check
reference: "TXN-ABC123"
notes: "Paid in full"
Update: amount_paid, balance_due, status (→ paid if balance = 0, → partially_paid if balance > 0)
recurring:
- id: "REC-001"
client_id: "CLI-001"
description: "Monthly Retainer — AI Ops Support"
frequency: "monthly" # weekly, biweekly, monthly, quarterly, annually
day_of_month: 1 # 1-28 (avoid 29-31 for safety)
line_items:
- description: "AI Operations Retainer"
qty: 1
rate: 3500.00
auto_send: true # false = create as draft
start_date: "2026-01-01"
end_date: null # null = indefinite
next_invoice: "2026-03-01"
invoices_generated: 2
active: true
recurring entries where next_invoice <= today and active = trueauto_send = true → mark as sent, notify clientauto_send = false → save as draft, notify user for reviewnext_invoice to next occurrence| Days After Due | Action | Tone | |---|---|---| | +1 day | Friendly reminder email | "Just a gentle reminder..." | | +7 days | Follow-up with invoice attached | "Following up on..." | | +14 days | Firm reminder, mention late fee | "This invoice is now 14 days past due..." | | +30 days | Final notice before escalation | "Final notice — please remit payment..." | | +45 days | Escalate to human (Kalin/Christina) | Flag for personal outreach | | +60 days | Consider write-off or collections | Business decision |
Day +1 (Friendly)
Subject: Friendly reminder — Invoice [NUMBER] due [DATE]
Hi [CONTACT],
Hope all is well! Just a quick reminder that invoice [NUMBER] for [AMOUNT] was due on [DATE].
If you've already sent payment, please disregard this note.
Payment details are on the attached invoice. Let me know if you need anything.
Best,
[YOUR NAME]
Day +14 (Firm)
Subject: Invoice [NUMBER] — 14 days overdue ([AMOUNT])
Hi [CONTACT],
Invoice [NUMBER] for [AMOUNT] is now 14 days past the due date of [DATE].
Per our agreement, a late fee of [X]% may apply to balances outstanding beyond [Y] days.
Could you confirm when we can expect payment? Happy to discuss if there's an issue.
Thanks,
[YOUR NAME]
Day +30 (Final)
Subject: Final notice — Invoice [NUMBER] overdue ([AMOUNT])
Hi [CONTACT],
This is a final reminder that invoice [NUMBER] for [AMOUNT] remains unpaid, now 30 days past the due date.
Please arrange payment within the next 7 business days to avoid further action.
If there's a dispute or issue with this invoice, please let me know immediately so we can resolve it.
Regards,
[YOUR NAME]
Standard: 1.5% per month on overdue balance (18% APR)
Grace period: 5 business days after due date
Compound: Simple interest (not compound)
Cap: 25% of invoice total (or local legal maximum)
Formula: late_fee = balance_due × (monthly_rate / 30) × days_overdue
Example: $5,000 × (0.015 / 30) × 14 = $35.00
═══ REVENUE SUMMARY — [MONTH YEAR] ═══
Invoiced This Month: $XX,XXX.XX ([N] invoices)
Collected This Month: $XX,XXX.XX ([N] payments)
Outstanding (not overdue): $XX,XXX.XX ([N] invoices)
Overdue: $XX,XXX.XX ([N] invoices, avg [X] days late)
Written Off (YTD): $XX,XXX.XX
Collection Rate: XX.X% (collected / invoiced, trailing 90 days)
Avg Days to Pay: XX days (trailing 90 days)
Avg Invoice Size: $X,XXX.XX
═══ TOP CLIENTS (by revenue, YTD) ═══
1. [Client] — $XX,XXX ([N] invoices, avg [X] days to pay)
2. [Client] — $XX,XXX ([N] invoices, avg [X] days to pay)
3. [Client] — $XX,XXX ([N] invoices, avg [X] days to pay)
═══ AGING REPORT ═══
Current (not yet due): $XX,XXX ([N] invoices)
1-15 days overdue: $XX,XXX ([N] invoices)
16-30 days overdue: $XX,XXX ([N] invoices)
31-60 days overdue: $XX,XXX ([N] invoices)
60+ days overdue: $XX,XXX ([N] invoices) ⚠️
═══ MONTHLY TREND ═══
Jan: $XX,XXX ████████████
Feb: $XX,XXX ████████████████
Mar: $XX,XXX ██████████
...
═══ ACTIONS NEEDED ═══
• [N] invoices need reminder emails
• [N] recurring invoices due for generation
• [Client] has disputed INV-XXXX — needs resolution
When a refund or correction is needed:
credit_note:
number: "CN-2026.02.001"
original_invoice: "INV-2026.01.003"
client_id: "CLI-001"
reason: "Partial refund — service hours overcharged"
line_items:
- description: "Correction: 5 hours overcharged"
qty: -5
rate: 250.00
amount: -1250.00
total: -1250.00
issued: "2026-02-13"
Apply credit notes against:
currencies:
primary: "USD"
accepted: ["USD", "GBP", "EUR", "BTC"]
exchange_rates: # Update weekly or use live rates
GBP_USD: 1.27
EUR_USD: 1.08
BTC_USD: 97500
conversion_note: "Converted at rate on invoice date. Payment accepted in invoiced currency only."
Rules:
Same as invoice template but:
PRO- instead of INV-QUOTE → ACCEPTED → INVOICE → PAID
↓
EXPIRED (auto-expire after validity period)
↓
REVISED (new version with changes)
When a quote is accepted:
Set up cron jobs or heartbeat checks for:
When the user needs to export:
invoice_number,client,date,due_date,total,status,amount_paid,balance
| Command | Action | |---|---| | "Invoice [client] for [amount/description]" | Create new invoice | | "Quote [client] for [service]" | Create proforma | | "Show outstanding invoices" | List unpaid invoices | | "What's overdue?" | Aging report, overdue only | | "Revenue this month" | Monthly revenue dashboard | | "Send reminder for [invoice]" | Generate reminder email | | "Record payment [invoice] [amount]" | Log payment received | | "Recurring: [client] [amount] [frequency]" | Set up recurring invoice | | "Credit note for [invoice]" | Issue credit/adjustment | | "Client report [name]" | Full client payment history | | "Export invoices [format]" | CSV/JSON/Markdown export | | "Void [invoice]" | Void an invoice | | "Update rates" | Refresh exchange rates |
tools
Use when the user wants to connect to, test, or use the McDonalds service at mcp.mcd.cn, including checking authentication, probing MCP endpoints, listing tools, or calling McDonalds MCP tools through a reusable local CLI.
development
Web scraping platform — Twitter/X data, Vinted marketplace, and general web scraping API
development
SlowMist AI Agent Security Review — comprehensive security framework for skills, repositories, URLs, on-chain addresses, and products (Claude Code version)
data-ai
去除中文文本中的 AI 写作痕迹,使其读起来自然。基于维基百科 AI 写作特征指南,检测 24 种 AI 模式。触发词:humanizer-cn、去除 AI 痕迹、去除 AI 写作痕迹、中文文本人性化。