agentleFS
RiggdAIRiggdAI/invoicerig/skills/invoice/SKILL.md

invoice

Skill0 starsChanged 5 months agoMITView on GitHub

Use when the user wants to create, edit, style, or export an invoice PDF — opens a local split-pane editor (style/data controls + HTML/CSS escape hatch, live preview) and exports PDFs via headless Chromium. Claude fills invoice data by editing workspace JSON files.

  • Installs packages

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. AlpacaLabsLLC/skills-for-architects★ 390same name
    2. metadist/synaplan-desktop★ 257same name
    3. dithiothreitol/jdg-ksiegowy★ 11same name
    4. jpoindexter/theft-kit★ 1same name
    5. FacturaHub-com/facturahub-plugin★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create, edit, and export styled invoice PDFs through a split-pane browser editor.

    line 8
  2. Distinctive:

    All files are validated against these schemas at load time.

    line 73
  3. Distinctive:

    When the user asks to create or update an invoice (e.g.

    line 119
  4. Very specific:

    Write or update workspace/invoices/<name>.json following InvoiceSchema exactly.

    line 123
  5. Very specific:

    If the editor is running at http://localhost:4317, it hot-reloads the preview automatically when the file is saved.

    line 147

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Invoice skill

Create, edit, and export styled invoice PDFs through a split-pane browser editor. Claude drives the workflow by writing workspace JSON files; the editor hot-reloads the preview. Headless PDF export runs without opening a browser.

1. Setup

Install dependencies and the Chromium browser used for PDF export:

npm install
npx playwright install chromium

Scaffold the workspace directory (creates sample profile, invoice, and template):

tsx skills/invoice/scripts/launch.ts

This prints:

Workspace ready at ./workspace.
Run "npm run editor" and open http://localhost:4317 to edit and preview.
Export headlessly with: npm run export -- <invoice-name>

To use a custom workspace path, set INVOICE_WORKSPACE:

INVOICE_WORKSPACE=/path/to/ws tsx skills/invoice/scripts/launch.ts

2. Launch the editor

npm run editor

Open http://localhost:4317 in a browser. The UI has two panes:

  • Left — tabbed controls: Data (invoice fields), Style (colours, fonts, page size), Code (raw HTML/CSS template editor).
  • Right — live preview that hot-reloads whenever workspace files change.

Clicking Export PDF in the editor exports the current invoice and saves it to workspace/output/<invoice-name>.pdf.

3. Workspace file contract

workspace/
  profiles/
    <name>.json          # sender profile (company, address, logo)
  invoices/
    <name>.json          # invoice data (client, items, dates)
  templates/
    <name>/
      template.html      # Handlebars HTML template
      template.css       # template stylesheet
      style.json         # style variables (colours, fonts, page size)
  output/
    <name>.pdf           # generated PDFs (written by export)

The classic template is seeded by scaffoldWorkspace. Add more templates by creating additional subdirectories under templates/.

4. JSON schemas

All files are validated against these schemas at load time. Unknown fields are ignored; all fields listed here are required unless marked optional.

workspace/invoices/<name>.json — InvoiceSchema

FieldTypeNotes
profilestringName of the profile file (without .json)
templatestringName of the template directory
numberstringInvoice number, e.g. "INV-001"
clientobjectSee sub-fields below
client.namestringClient company or person name
client.addressstringClient postal address
client.emailstringClient email address
itemsarrayLine items — see LineItemSchema below
items[].descriptionstringDescription of the service or product
items[].quantitynumberNon-negative quantity
items[].ratenumberNon-negative unit price
issueDatestringISO date string, e.g. "2026-06-29"
dueDatestringISO date string
notesstringFree-text footer notes (can be empty)
taxRatenumberTax rate as a decimal fraction, non-negative (e.g. 0.2 for 20%)

workspace/profiles/<name>.json — ProfileSchema

FieldTypeNotes
namestringSender name or company
addressstringSender postal address
emailstringSender email address
logoPathstring(optional) Path to logo image file
taxIdstring(optional) VAT / tax registration number
currencystringISO 4217 currency code, e.g. "EUR" or "USD"

workspace/templates/<name>/style.json — StyleSchema

FieldTypeNotes
accentColorstringCSS colour value, e.g. "#2563eb"
fontFamilystringCSS font-family string
fontSizenumberBase font size in px (positive)
pageSize"A4" | "Letter"PDF page size
marginnumberPage margin in px (non-negative)
logoPosition"left" | "right" | "center"Logo alignment in header

5. Filling invoice data as Claude

When the user asks to create or update an invoice (e.g. "invoice Beta Corp for 10 h design at €90"):

  1. Choose an existing profile from workspace/profiles/ (or create one if none exists).
  2. Choose a template from workspace/templates/ (default: classic).
  3. Write or update workspace/invoices/<name>.json following InvoiceSchema exactly.

Example invoice file workspace/invoices/beta-design.json:

{
  "profile": "acme",
  "template": "classic",
  "number": "INV-001",
  "client": {
    "name": "Beta Corp",
    "address": "123 Client St, London",
    "email": "accounts@beta.example"
  },
  "items": [
    { "description": "Design work", "quantity": 10, "rate": 90 }
  ],
  "issueDate": "2026-06-29",
  "dueDate": "2026-07-29",
  "notes": "",
  "taxRate": 0
}

If the editor is running at http://localhost:4317, it hot-reloads the preview automatically when the file is saved. Tell the user to refresh the browser tab if the preview does not update immediately.

To create a new sender profile, write workspace/profiles/<name>.json following ProfileSchema.

6. Export to PDF

Export headlessly without opening a browser:

npm run export -- <invoice-name>

For example:

npm run export -- beta-design

The command prints the output path when done, e.g.:

Exported workspace/output/beta-design.pdf

The PDF is saved to workspace/output/<invoice-name>.pdf.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.