ワンクリックで
morning-invoice
Create invoices via Morning API. Use for: create invoice, batch invoices, tax invoices.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create invoices via Morning API. Use for: create invoice, batch invoices, tax invoices.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create branded Hebrew/RTL contract PDFs for Aviz. Use this whenever the user asks to create, draft, generate, brand, update, or export a contract/agreement/הסכם/חוזה as PDF, especially for workshops, lectures, consulting, AI services, quotes that need contractual terms, or client-facing legal-style documents. The skill gathers missing deal details, applies AVIZ branding, renders HTML to PDF, creates a preview image, and verifies the result before delivery.
Manage Morning (Green Invoice) payment links — create, update, search, deactivate, duplicate. Use for: payment link, לינק לתשלום, דף תשלום, morning payment, create link, update price.
Produce podcast episodes for הצב נחום with script→video→subtitles→Instagram pipeline. Use when: 'פרק חדש של נחום', 'nachum episode', 'פודקאסט נחום', 'היי אתה פרק', or wants to create turtle-character podcast content.
Transform substantial reflections, manifestos or foundational insights into durable workshop concepts, social posts and quote files.
Turn a raw Hebrew idea/draft from Aviz into a publish-ready Facebook post. Restructures into paragraphs (single blank line between each), preserves his voice ("less hype, more practical"), copies the final body to clipboard via pbcopy, and saves to content/posts/YYYY-MM-DD-slug.md as an Obsidian-compatible note with [[wikilinks]] to existing concepts. Triggers on - "פוסט לפייסבוק", "כתוב פוסט", "facebook post", "תסדר את הפוסט", "יש לי רעיון לפוסט", "post idea", "תפרסם", "redact a post".
Clean desktop for live session. Use for: prepare for live, clean desktop, get ready for streaming.
| name | morning-invoice |
| description | Create invoices via Morning API. Use for: create invoice, batch invoices, tax invoices. |
Generate invoices using the Morning (Green Invoice) API for workshop participants and course customers.
This skill integrates with Morning (greeninvoice.co.il) to:
--preview flag → real PDF preview via Morning's /documents/preview endpoint (does NOT issue)Every single-invoice issuance MUST be a two-step flow:
--preview first → opens real PDF for review (not issued, not in Morning's records)--preview → issues the binding tax invoiceA tax invoice (חשבונית מס) is irreversible once issued. Never skip step 1.
cd /Users/aviz/architect-workshops/.codex/skills/morning-invoice/scripts
npm install
Create .env file in the scripts folder:
cp .env.example .env
# Edit .env with your credentials
Required variables:
| Variable | Description |
|---|---|
MORNING_API_KEY | Your Morning API key (UUID format) |
MORNING_API_SECRET | Your Morning API secret |
MORNING_BASE_URL | API endpoint (production or sandbox) |
MORNING_ENVIRONMENT | production or sandbox |
API URLs:
https://api.greeninvoice.co.il/api/v1https://sandbox.d.greeninvoice.co.il/api/v1# Test API connection
npx ts-node invoice.ts test
# Dry-run: preview invoices without creating
npx ts-node invoice.ts dry-run
# Step 1 — preview PDF (REQUIRED before issuing)
npx ts-node invoice.ts create-single --name "Test Customer" --email "test@example.com" --phone "0501234567" --amount 500 --description "Workshop" --preview
# Step 2 — issue (run the exact same line WITHOUT --preview after user confirms)
npx ts-node invoice.ts create-single --name "Test Customer" --email "test@example.com" --phone "0501234567" --amount 500 --description "Workshop"
# Business invoice (company with ח.פ. + multiple recipient emails) — preview first
npx ts-node invoice.ts create-single \
--name "Company Ltd" --tax-id "517093746" \
--emails "contact@company.co.il,dokka@company.co.il" \
--phone "0501234567" --amount 500 \
--payment "העברה בנקאית" --date "2026-03-15" \
--description "סדנת AI" --preview
# Batch create from customer table
npx ts-node invoice.ts batch --file customers.md
# Batch with options
npx ts-node invoice.ts batch --file customers.md --start 5 --limit 10
| Option | Description | Default |
|---|---|---|
--file | Path to customer markdown table | Required for batch |
--start | Start from customer ID | 1 |
--limit | Max invoices to create | All |
--dry-run | Preview only, don't create | false |
--skip-existing | Skip already processed customers | true |
Create a markdown file with this table structure:
| # | Name | Phone | Email | Amount | Title | Description | Payment Method |
|---|------|-------|-------|--------|-------|-------------|----------------|
| 1 | ישראל ישראלי | 0501234567 | israel@email.com | 500 | סדנה | קורס | ביט |
| 2 | שרה כהן | 0521234567 | sarah@email.com | 400 | סדנה | קורס (שותף) | העברה בנקאית |
Payment Methods:
ביט / אפליקציית תשלום → Type 10 (App payment)העברה בנקאית → Type 4 (Bank transfer)For B2B invoices to companies, create-single supports:
--tax-id <HP> — company ח.פ. (tax ID). Required for a valid Israeli tax invoice to a business.--emails "a@b.com,c@d.com" — comma-separated list of recipients. Morning sends the PDF to all of them. Use this for companies that have a dedicated doc-intake inbox (e.g. dokka.co.il) alongside the contact person.VAT is calculated automatically: pass the gross amount (VAT included) via --amount. Morning splits it using the current rate (18% as of 2025).
The skill creates Type 320 invoices (חשבונית מס / קבלה with VAT):
| Field | Value |
|---|---|
| Type | 320 (Invoice/Receipt) |
| Language | Hebrew (he) |
| Currency | ILS |
| VAT | Included in price |
| Payment Terms | 30 days |
| Signed | Yes |
| Email Attachment | Yes |
Morning uses JWT token authentication:
// 1. Get token
POST /account/token
Body: { id: API_KEY, secret: API_SECRET }
Response: { token: "jwt...", expires: timestamp }
// 2. Use in requests
Authorization: Bearer <token>
POST /documents
{
type: 320,
lang: 'he',
currency: 'ILS',
vatType: 0, // VAT included
client: {
name: "Customer Name",
emails: ["email@example.com"],
phone: "0501234567",
add: true
},
income: [{
description: "Workshop",
quantity: 1,
price: 500,
vatType: 1
}],
payment: [{
date: "2025-01-01",
type: 10, // 10=app, 4=bank
price: 500
}]
}
processed-customers.json)invoice-results-{timestamp}.jsonWhen creating invoices for a workshop:
workshop.md to get participant listUser: Create an invoice for David Cohen, david@email.com, 0501234567, 500 NIS for the Claude Code workshop
Claude: I'll create the invoice using Morning API.
[Runs: npx ts-node invoice.ts create-single --name "David Cohen" --email "david@email.com" --phone "0501234567" --amount 500 --description "Claude Code Workshop"]
Invoice created successfully:
- Invoice ID: abc123
- Invoice Number: 1234
- Amount: 500 NIS (including VAT)
- Email sent to: david@email.com
User: Show me what invoices would be created for workshop participants
Claude: Running dry-run to preview invoices...
[Runs: npx ts-node invoice.ts batch --file participants.md --dry-run]
Dry run results:
1. David Cohen - 500 NIS
2. Sarah Levi - 500 NIS
3. Michael Ben - 400 NIS (affiliate)
Total: 3 invoices, 1,400 NIS
| File | Description |
|---|---|
processed-customers.json | List of customers who already have invoices |
invoice-results-{timestamp}.json | Results from batch run |
| Error | Solution |
|---|---|
| 401 Unauthorized | Check API key and secret |
| 400 Bad Request | Verify customer data format |
| Rate limit | Automatic 1-second delay between requests |
| Duplicate | Skipped if in processed-customers.json |
create-single issuance is preceded by a --preview run. The PDF opens for the user to verify, only then re-run without --preview to issue.--dry-run shows the customer list as text (no PDFs). Use that before a batch.