# Get Invoice Details

> Extract and store invoice details from documents — vendor, date, amount, line items, tax, payment terms. Saves structured JSON to vault. Triggers: "get-invoice-details" | "extract invoice" | "parse invoice" | "invoice details" | "read invoice" | "analyze this invoice" | "process this invoice" | "analyse cette facture" | "extract this invoice" | "get invoice data".

- Skill: `roxabi/get-invoice-details` (Agent Skill)
- Install (CLI): `npx skillmds@latest add roxabi/get-invoice-details`
- Raw SKILL.md: https://api.skillmd.com/api/skills/roxabi/get-invoice-details/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Finance & Business
- Author: Roxabi (https://skillmd.com/u/roxabi)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/roxabi/get-invoice-details

---


# Get Invoice Details

Let:
  V := `~/.roxabi-vault/invoices`

**Goal:** Extract structured data from an invoice → store as JSON in V.

## Workflow

### Phase 1 — Accept Input

1. Accept invoice file path or pasted content via `$ARGUMENTS`.
2. Input ∄ → ask user "Provide the path to the invoice file or paste the invoice content."
3. Path given → verify file ∃.

### Phase 2 — Extract Details

1. Read invoice content. PDF → run extraction script:
```bash
python3 plugins/get-invoice-details/scripts/extract.py --input "<file_path>"
```
2. Extract fields: `vendor` | `invoice_number` | `date` (ISO 8601) | `due_date` (ISO 8601) | `currency` (3-letter) | `subtotal` | `tax` | `total` | `line_items` (array of `{description, quantity, unit_price, amount}`) | `payment_terms` | `status` ("pending" | "paid" | "overdue")

### Phase 3 — Save to Vault

1. Create V on first use:
```bash
mkdir -p -m 700 ~/.roxabi-vault/invoices
```
2. Save JSON → `V/<invoice_number>.json`.
3. `vault_healthy()` → index in vault database. ∄ → save JSON only, inform user.

### Phase 4 — Display Results

Display extracted details in readable format. Confirm save location. Report vault indexing status (indexed ∨ vault unavailable).

### Self-Check

- V created automatically — ¬manual init required
- Extraction script handles text ∧ PDF
- Vault indexing optional — plugin works without vault

$ARGUMENTS

