Invoice Generation Skill
Overview
Generate professional HTML invoices using pre-configured templates for hourly and subscription billing. Track client information, automatically increment invoice numbers, and maintain invoice history across all clients.
When to Use This Skill
Use this skill when:
- Creating a new invoice for an existing client by name
- Adding a new client to the invoice system
- Viewing client information or invoice history
- Generating invoices with work log entries (hourly) or subscription billing
Core Capabilities
1. Generate Invoice for Existing Client
When the user requests an invoice for a client by name:
Load client data from clients.json to retrieve:
- Client details and billing information
- Invoice type (hourly or subscription)
- Last invoice number for auto-increment
For hourly invoices:
- Request work log entries from the user (they will paste as text)
- Parse work log format:
Date - Project - Hours - Description
- For Versa Computing, parse:
Date - Project - Hours - Description with separate Project and Description columns
- Calculate total hours and amount (hours × hourly_rate)
For subscription invoices:
- No work log needed
- Use subscription_name and subscription_amount from client data
Increment invoice number:
- New number = last_invoice_number + 1
- Format:
{invoice_prefix}-2025-{new_number:03d}
Calculate dates:
- Invoice date: Use current date (check system date in environment)
- Due date: Invoice date + payment_terms_days
Load appropriate template:
- Hourly:
assets/hourly-invoice-template.html
- Subscription:
assets/subscription-invoice-template.html
Replace placeholders with client data:
{{INVOICE_NUMBER}}, {{INVOICE_DATE}}, {{DUE_DATE}}
{{CLIENT_NAME}}, {{CLIENT_ATTENTION}}, {{CLIENT_ADDRESS_LINE1}}, {{CLIENT_CITY_STATE_ZIP}}
{{PAYMENT_TERMS}} (e.g., "30" for Net 30)
{{PROJECT_REFERENCE}} or {{PO_NUMBER}} as applicable
- For hourly:
{{TOTAL_HOURS}}, {{HOURLY_RATE}}, {{SUBTOTAL}}, {{TOTAL_AMOUNT}}
- For subscription:
{{SUBSCRIPTION_NAME}}, {{BILLING_MONTH}}, {{AMOUNT}}
- Work log entries (populate table rows in HTML)
Special handling for Versa Computing:
- Use 4-column work log table: DATE | PROJECT | DESCRIPTION | HOURS
- Separate project name from description in work log entries
- Project names go in the PROJECT column, descriptions in DESCRIPTION column
Save invoice:
- Filename format:
Invoice-{invoice_number}-{short_name}-{month}-2025.html
- Location: User's Desktop (
/Users/arlenagreer/Desktop/)
Update clients.json:
- Set last_invoice_number to new number
- Set last_invoice_date to invoice date
- Save changes to maintain accurate history
2. Add New Client
To add a new client to the system:
Request necessary information:
- Company name and contact details (attention, address)
- Invoice type (hourly or subscription)
- Invoice number prefix (3-letter abbreviation)
- Billing rate (for hourly) or subscription amount
- Payment terms in days
- Special requirements (e.g., project column, PO number)
Add new client object to clients.json following the existing structure
Confirm client has been added successfully
3. View Client Information
To view or list clients:
- Read
clients.json and display client details
- Show invoice history (last invoice number and date)
- List all tracked clients
Client Database Structure
Client information is stored in clients.json in the skill folder. Each client entry includes:
Required fields (all clients):
name: Full client name
short_name: Abbreviated name for filenames
invoice_prefix: 3-letter invoice number prefix
invoice_type: "hourly" or "subscription"
company_name: Company name for invoice
attention: Contact attention line
address_line1: Street address
city_state_zip: City, state, and ZIP
last_invoice_number: Last invoice number sent (integer)
last_invoice_date: Date of last invoice (YYYY-MM-DD)
payment_terms_days: Payment terms in days (e.g., 30 for Net 30)
Hourly invoice fields:
hourly_rate: Billing rate per hour
project_reference: Default project name
requires_project_column: (optional) true if work log needs separate project column
Subscription invoice fields:
subscription_name: Name of subscription service
subscription_amount: Monthly subscription amount
Current Clients
- American Laboratory Trading (INV prefix, hourly billing)
- Empirico (EMP prefix, subscription billing)
- Versa Computing (VER prefix, hourly billing with project column)
Invoice Templates
Hourly Invoice Template
Located at: assets/hourly-invoice-template.html
Features:
- Two-page layout: invoice summary (page 1) and detailed work log (page 2)
- Standard work log table: DATE | HOURS | DESCRIPTION
- For clients requiring project column: DATE | PROJECT | DESCRIPTION | HOURS
- Professional styling with Inter font and blue color scheme (#2563eb)
- Print-optimized CSS
Placeholders to replace:
{{INVOICE_NUMBER}}, {{INVOICE_DATE}}, {{DUE_DATE}}
{{CLIENT_NAME}}, {{CLIENT_ATTENTION}}, {{CLIENT_ADDRESS_LINE1}}, {{CLIENT_CITY_STATE_ZIP}}
{{PAYMENT_TERMS}}, {{PROJECT_REFERENCE}}, {{PO_NUMBER}}
{{TOTAL_HOURS}}, {{HOURLY_RATE}}, {{SUBTOTAL}}, {{TOTAL_AMOUNT}}
- Work log table rows (HTML tbody content)
Subscription Invoice Template
Located at: assets/subscription-invoice-template.html
Features:
- Single-page layout
- Simplified line items table: Description and Amount only
- Same professional styling as hourly template
Placeholders to replace:
{{INVOICE_NUMBER}}, {{INVOICE_DATE}}, {{DUE_DATE}}
{{CLIENT_NAME}}, {{CLIENT_ATTENTION}}, {{CLIENT_ADDRESS_LINE1}}, {{CLIENT_CITY_STATE_ZIP}}
{{PAYMENT_TERMS}}, {{SUBSCRIPTION_NAME}}, {{PO_NUMBER}}
{{BILLING_MONTH}}, {{AMOUNT}}
Workflow Example
User: "Generate an invoice for Versa Computing"
Process:
- Read
clients.json and locate Versa Computing client data
- Determine invoice type: hourly (requires work log)
- Prompt: "Please provide the work log entries for this invoice"
- User pastes work log text
- Parse entries, extracting: date, project, description, hours
- Calculate totals: sum hours × hourly_rate
- Increment invoice number: VER-2025-011 → VER-2025-012
- Calculate dates: invoice_date (today), due_date (today + 30 days)
- Load
assets/hourly-invoice-template.html
- For Versa, use 4-column work log table format
- Replace all placeholders with client data and formatted work log entries
- Save to:
/Users/arlenagreer/Desktop/Invoice-VER-2025-012-VersaComputing-Nov-2025.html
- Update
clients.json: set last_invoice_number to 12, last_invoice_date to today
- Confirm: "Invoice VER-2025-012 generated and saved to Desktop. Ready for review."
Important Notes
- Date handling: Always check the system date in
<env> context (Today's date)
- Work log parsing: Accept pasted text format, parse carefully to extract all components
- Decimal hours: Use decimal format (0.5, 1.0, 2.5) not time format
- Invoice numbering: Always auto-increment based on last_invoice_number
- File location: Save all invoices to
/Users/arlenagreer/Desktop/
- No email sending: Skill only generates HTML files; user reviews and sends manually
- Database updates: Always update
clients.json after successful invoice generation
- Template format: For Versa, modify table structure to include PROJECT column between DATE and DESCRIPTION
1---2name: invoice3description: Generate professional invoices for clients using standardized templates with automatic invoice numbering and client management. This skill should be used when creating invoices for American Laboratory Trading, Empirico, Versa Computing, or other clients with tracked invoice histories.4---5
6# Invoice Generation Skill
7
8## Overview
9
10Generate professional HTML invoices using pre-configured templates for hourly and subscription billing. Track client information, automatically increment invoice numbers, and maintain invoice history across all clients.
11
12## When to Use This Skill
13
14Use this skill when:
15- Creating a new invoice for an existing client by name
16- Adding a new client to the invoice system
17- Viewing client information or invoice history
18- Generating invoices with work log entries (hourly) or subscription billing
19
20## Core Capabilities
21
22### 1. Generate Invoice for Existing Client
23
24When the user requests an invoice for a client by name:
25
261. **Load client data** from `clients.json` to retrieve:
27 - Client details and billing information
28 - Invoice type (hourly or subscription)
29 - Last invoice number for auto-increment
30
312. **For hourly invoices:**
32 - Request work log entries from the user (they will paste as text)
33 - Parse work log format: `Date - Project - Hours - Description`
34 - For Versa Computing, parse: `Date - Project - Hours - Description` with separate Project and Description columns
35 - Calculate total hours and amount (hours × hourly_rate)
36
373. **For subscription invoices:**
38 - No work log needed
39 - Use subscription_name and subscription_amount from client data
40
414. **Increment invoice number:**
42 - New number = last_invoice_number + 1
43 - Format: `{invoice_prefix}-2025-{new_number:03d}`
44
455. **Calculate dates:**
46 - Invoice date: Use current date (check system date in environment)
47 - Due date: Invoice date + payment_terms_days
48
496. **Load appropriate template:**
50 - Hourly: `assets/hourly-invoice-template.html`
51 - Subscription: `assets/subscription-invoice-template.html`
52
537. **Replace placeholders** with client data:
54 - `{{INVOICE_NUMBER}}`, `{{INVOICE_DATE}}`, `{{DUE_DATE}}`
55 - `{{CLIENT_NAME}}`, `{{CLIENT_ATTENTION}}`, `{{CLIENT_ADDRESS_LINE1}}`, `{{CLIENT_CITY_STATE_ZIP}}`
56 - `{{PAYMENT_TERMS}}` (e.g., "30" for Net 30)
57 - `{{PROJECT_REFERENCE}}` or `{{PO_NUMBER}}` as applicable
58 - For hourly: `{{TOTAL_HOURS}}`, `{{HOURLY_RATE}}`, `{{SUBTOTAL}}`, `{{TOTAL_AMOUNT}}`
59 - For subscription: `{{SUBSCRIPTION_NAME}}`, `{{BILLING_MONTH}}`, `{{AMOUNT}}`
60 - Work log entries (populate table rows in HTML)
61
628. **Special handling for Versa Computing:**
63 - Use 4-column work log table: DATE | PROJECT | DESCRIPTION | HOURS
64 - Separate project name from description in work log entries
65 - Project names go in the PROJECT column, descriptions in DESCRIPTION column
66
679. **Save invoice:**
68 - Filename format: `Invoice-{invoice_number}-{short_name}-{month}-2025.html`
69 - Location: User's Desktop (`/Users/arlenagreer/Desktop/`)
70
7110. **Update clients.json:**
72 - Set last_invoice_number to new number
73 - Set last_invoice_date to invoice date
74 - Save changes to maintain accurate history
75
76### 2. Add New Client
77
78To add a new client to the system:
79
801. Request necessary information:
81 - Company name and contact details (attention, address)
82 - Invoice type (hourly or subscription)
83 - Invoice number prefix (3-letter abbreviation)
84 - Billing rate (for hourly) or subscription amount
85 - Payment terms in days
86 - Special requirements (e.g., project column, PO number)
87
882. Add new client object to `clients.json` following the existing structure
89
903. Confirm client has been added successfully
91
92### 3. View Client Information
93
94To view or list clients:
95- Read `clients.json` and display client details
96- Show invoice history (last invoice number and date)
97- List all tracked clients
98
99## Client Database Structure
100
101Client information is stored in `clients.json` in the skill folder. Each client entry includes:
102
103**Required fields (all clients):**
104- `name`: Full client name
105- `short_name`: Abbreviated name for filenames
106- `invoice_prefix`: 3-letter invoice number prefix
107- `invoice_type`: "hourly" or "subscription"
108- `company_name`: Company name for invoice
109- `attention`: Contact attention line
110- `address_line1`: Street address
111- `city_state_zip`: City, state, and ZIP
112- `last_invoice_number`: Last invoice number sent (integer)
113- `last_invoice_date`: Date of last invoice (YYYY-MM-DD)
114- `payment_terms_days`: Payment terms in days (e.g., 30 for Net 30)
115
116**Hourly invoice fields:**
117- `hourly_rate`: Billing rate per hour
118- `project_reference`: Default project name
119- `requires_project_column`: (optional) true if work log needs separate project column
120
121**Subscription invoice fields:**
122- `subscription_name`: Name of subscription service
123- `subscription_amount`: Monthly subscription amount
124
125### Current Clients
126
127- **American Laboratory Trading** (INV prefix, hourly billing)
128- **Empirico** (EMP prefix, subscription billing)
129- **Versa Computing** (VER prefix, hourly billing with project column)
130
131## Invoice Templates
132
133### Hourly Invoice Template
134
135Located at: `assets/hourly-invoice-template.html`
136
137Features:
138- Two-page layout: invoice summary (page 1) and detailed work log (page 2)
139- Standard work log table: DATE | HOURS | DESCRIPTION
140- For clients requiring project column: DATE | PROJECT | DESCRIPTION | HOURS
141- Professional styling with Inter font and blue color scheme (#2563eb)
142- Print-optimized CSS
143
144Placeholders to replace:
145- `{{INVOICE_NUMBER}}`, `{{INVOICE_DATE}}`, `{{DUE_DATE}}`
146- `{{CLIENT_NAME}}`, `{{CLIENT_ATTENTION}}`, `{{CLIENT_ADDRESS_LINE1}}`, `{{CLIENT_CITY_STATE_ZIP}}`
147- `{{PAYMENT_TERMS}}`, `{{PROJECT_REFERENCE}}`, `{{PO_NUMBER}}`
148- `{{TOTAL_HOURS}}`, `{{HOURLY_RATE}}`, `{{SUBTOTAL}}`, `{{TOTAL_AMOUNT}}`
149- Work log table rows (HTML tbody content)
150
151### Subscription Invoice Template
152
153Located at: `assets/subscription-invoice-template.html`
154
155Features:
156- Single-page layout
157- Simplified line items table: Description and Amount only
158- Same professional styling as hourly template
159
160Placeholders to replace:
161- `{{INVOICE_NUMBER}}`, `{{INVOICE_DATE}}`, `{{DUE_DATE}}`
162- `{{CLIENT_NAME}}`, `{{CLIENT_ATTENTION}}`, `{{CLIENT_ADDRESS_LINE1}}`, `{{CLIENT_CITY_STATE_ZIP}}`
163- `{{PAYMENT_TERMS}}`, `{{SUBSCRIPTION_NAME}}`, `{{PO_NUMBER}}`
164- `{{BILLING_MONTH}}`, `{{AMOUNT}}`
165
166## Workflow Example
167
168**User:** "Generate an invoice for Versa Computing"
169
170**Process:**
1711. Read `clients.json` and locate Versa Computing client data
1722. Determine invoice type: hourly (requires work log)
1733. Prompt: "Please provide the work log entries for this invoice"
1744. User pastes work log text
1755. Parse entries, extracting: date, project, description, hours
1766. Calculate totals: sum hours × hourly_rate
1777. Increment invoice number: VER-2025-011 → VER-2025-012
1788. Calculate dates: invoice_date (today), due_date (today + 30 days)
1799. Load `assets/hourly-invoice-template.html`
18010. For Versa, use 4-column work log table format
18111. Replace all placeholders with client data and formatted work log entries
18212. Save to: `/Users/arlenagreer/Desktop/Invoice-VER-2025-012-VersaComputing-Nov-2025.html`
18313. Update `clients.json`: set last_invoice_number to 12, last_invoice_date to today
18414. Confirm: "Invoice VER-2025-012 generated and saved to Desktop. Ready for review."
185
186## Important Notes
187
188- **Date handling:** Always check the system date in `<env>` context (Today's date)
189- **Work log parsing:** Accept pasted text format, parse carefully to extract all components
190- **Decimal hours:** Use decimal format (0.5, 1.0, 2.5) not time format
191- **Invoice numbering:** Always auto-increment based on last_invoice_number
192- **File location:** Save all invoices to `/Users/arlenagreer/Desktop/`
193- **No email sending:** Skill only generates HTML files; user reviews and sends manually
194- **Database updates:** Always update `clients.json` after successful invoice generation
195- **Template format:** For Versa, modify table structure to include PROJECT column between DATE and DESCRIPTION