invoice-generator-agent
БесплатноБез исполняемых скриптовНе проверенAutomatic invoice generation with CRM integration
от aAAaqwq★ 123 звезды на GitHubОб этом скилле
Invoice Generator Agent
Generates professional invoices for WeLabelData Inc. with CRM integration
When to use
- "generate invoice for deal-enterprise-002"
- "create invoice for Enterprise Corp"
- "invoice for Client D"
- When deal.stage = 'delivered' and an invoice needs to be issued
How to execute
Step 1: Run the agent
By Deal ID:
cd $AGENTS_PATH/invoice-generator
python3 invoice_generator_agent.py --deal deal-enterprise-002
By client name:
python3 invoice_generator_agent.py --client "Enterprise Corp"
Interactive mode (shows all deals with stage='delivered'):
python3 invoice_generator_agent.py --interactive
Dry-run (check without writing):
python3 invoice_generator_agent.py --dry-run --deal deal-enterprise-002
Step 2: The agent will execute
- Load deal from deals.csv + client/company/contact info
- Validate: stage must be 'delivered' or 'in_progress'
- Get invoice number: atomically from invoice_tracker.json (with file locking)
- Generate invoice: call generate_invoice.py → HTML + PDF
- Update CRM: deals.csv → stage='invoiced', invoice_date, invoice_number
- Show for review:
✓ Invoice #100 generated Client: Client D Inc. Amount: $1,000.00 USD Description: Training services Files: docs/invoices/Invoice_100_WeLabelData_ClientD.pdf Review the invoice and choose: 1. Open PDF for review 2. Send to client now 3. Skip sending (manual delivery) 4. Cancel (delete invoice) - Process user decision:
- Open PDF → opens PDF viewer
- Send now → shows instructions for sending email (placeholder for now)
- Skip → generates but does not send (for manual delivery)
- Cancel → deletes files, rolls back invoice number, does not change CRM
- Log activity → activities.csv
- Send Telegram → Saved Messages with details
- Write log → invoice_generator_log.json
Step 3: If email needs to be sent
Email sending is not yet implemented; the agent will show instructions:
Email sending not yet implemented in this version.
Please send the invoice manually using your email client.
To: [email protected]
Subject: Invoice #100 - WeLabelData - Training services
Attachment: docs/invoices/Invoice_100_WeLabelData_ClientD.pdf
Use skill /email-send-direct or google-tools to send.
Human Approval
IMPORTANT: The agent ALWAYS requires human review before sending.
Review options:
- Open PDF → opens PDF for viewing, then asks again
- Send now → (placeholder for now) shows instructions for email
- Skip sending (DEFAULT) → generates invoice, updates CRM, does not send
- Cancel → full rollback (deletes files, restores invoice_tracker, does not change deals.csv)
Rollback
If the user chooses "Cancel":
- Deletes invoice files (HTML + PDF)
- Restores invoice_tracker.json to the previous number
- Does NOT change deals.csv (no CRM update was made)
- Logs 'cancelled' activity
- Sends Telegram notification
Client mapping
The agent automatically maps CRM companies → client keys for generate_invoice.py:
| Client Key | Company patterns |
|---|---|
| clienta | clienta, doe, clientk |
| clientb | clientb |
| clientc | clientc |
| clientd | clientd |
| cliente | cliente, clientetech |
Unknown clients → custom client with company.name
Data Flow
Reads:
sales/crm/relationships/deals.csvsales/crm/relationships/clients.csvsales/crm/contacts/companies.csvsales/crm/contacts/people.csvdocs/company/invoice_tracker.json
Writes:
docs/invoices/Invoice_{n}_WeLabelData_{Client}.htmldocs/invoices/Invoice_{n}_WeLabelData_{Client}.pdfsales/crm/relationships/deals.csv(update: stage, invoice_date, invoice_number)sales/crm/activities.csv(append)docs/company/invoice_tracker.json(increment)agents/data/invoice_generator_log.json- Telegram notification via tg-tools
Error Handling
| Error | Behavior |
|---|---|
| Deal not found | Exit with message, suggest --interactive |
| Deal already has invoice | Warn, ask for confirmation to regenerate |
| Invalid stage | Exit, explain which stages are valid ('delivered', 'in_progress') |
| generate_invoice.py fail | Show stderr, exit without CRM update |
| PDF generation fail | Save HTML, continue with CRM update |
| CRM write fail | Critical, save files but warn about manual CRM fix |
| Telegram fail | Warning, continue (non-critical) |
Testing
Dry-run
python3 invoice_generator_agent.py --dry-run --deal deal-enterprise-002
Shows parameters without creating files or CRM updates.
Full test with rollback
python3 invoice_generator_agent.py --interactive
# Select deal
# Review invoice
# Choose "4. Cancel"
# Verify that files are deleted, invoice_tracker unchanged
Examples
Generate for a specific deal
python3 invoice_gen
Установить invoice-generator-agent в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл invoice-generator-agent?
Automatic invoice generation with CRM integration
Как установить скилл invoice-generator-agent?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл invoice-generator-agent запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
gtm-enterprise-account-planning
Strategic account planning and execution for enterprise deals. Use when planning complex sales cycles, managing multiple stakeholders, applying MEDDICC…
от GitHubgtm-partnership-architecture
Build and scale partner ecosystems that drive revenue and platform adoption. Use when building partner programs from scratch, tiering partnerships, managing…
от GitHublanding-page-conversion-audit
Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review…
от GitHubpower-platform-architect
Use this skill when the user needs to transform business requirements, use case descriptions, or meeting transcripts into a technical Power Platform solution…
от GitHub