letter-md

Agent skill · Node CLI · MIT

Say what you need to write. Get a proper letter.

Tell your agent what the letter must say. It sets the words on your own letterhead, puts the address where the envelope window is, and hands you one file to print or save as PDF.

npx skills add isatimur/letter-md

A UK solicitors' letter in the Chambers letterhead: spaced serif capitals, a lozenge rule, and a notice to end a tenancy. A German DIN 5008 Form B letter with its address field, information block, fold lines at 105 and 210 mm and the hole mark drawn on in dashed lines.
DIN 5008 Form B address field 85 × 45 mm at 20, 45 mm · folds at 105 and 210 mm

How it works

  1. 01

    Say what it is for

    “Write to my tenant: we accept his notice, the tenancy ends on 31 January.” Give the facts. The agent asks only for what is missing, like the address.

  2. 02

    Pick a letterhead

    The agent writes the letter as JSON, checks it, and shows it in three letterheads side by side. You choose one, and the layout standard for your country.

  3. 03

    Print it, fold it, post it

    You get one HTML file. Print it, or save it as PDF. The address lands in the envelope window and the fold marks sit where they should.

It formats what you say. It does not give legal advice, and it does not add claims you did not make.

Laid out to the millimetre

Five layouts, each measured from its published source. Run render --guides to see every zone drawn on your own letter.

A US block letter on US Letter paper with the #10 window drawn at 22.2 mm from the left, the date position and the fold lines at thirds.
US block, US Letter, #10 window
Layout standards and their measurements
StandardPaperAddress fieldFolds
DIN 5008 Form AA485 × 40 at 20, 2787 · 192
DIN 5008 Form BA485 × 45 at 20, 45105 · 210
UK businessA490 × 34 at 20, 5099 · 198
US blockLetter114.3 × 16.9 at 22.2, 63.593.1 · 186.3
US modified blockLetter114.3 × 16.9 at 22.2, 63.593.1 · 186.3

All sizes in mm, from the top-left corner of the sheet. DIN letters print a hole mark at 148.5 mm, put the subject before the salutation, and keep a return-address line in the window. Long letters flow onto continuation pages with a running header and “Page 2 of 3”.

Five letterheads

Each one has its own type and its own layout. Every picture here is real output from the engine.

One template, a letter per row

Put {{first_name}} anywhere in the letter and give a spreadsheet as CSV. You get one file with every letter on its own sheets, or one file per person.

letter-md merge thanks.json volunteers.csv
# wrote thanks-merged.html: 3 letters

letter-md merge thanks.json volunteers.csv \
  --split letters --name-by first_name
# 001-ama.html  002-henrik.html  003-wen.html

Every value is plain text. A value that holds <script> or {{x}} prints as written.

Three thank-you letters from one template, each with its own name, address, library and a personal note.

Install

Claude Code plugin

/plugin marketplace add isatimur/letter-md
/plugin install letter-md@letter-md

Any agent, with skills.sh

npx skills add isatimur/letter-md

Just the CLI

npx github:isatimur/letter-md render letter.json --theme chambers --standard din-b

Node 20 or newer. No dependencies. PDF export uses Playwright only if you already have it; otherwise print from the browser.