Getting started

Agent Skill

Install the lttr agent skill so Claude Code, Cursor, and other coding agents write lttr templates and kits correctly the first time.

This site publishes an agent skill: a package of instructions that teaches a coding agent how lttr actually works. Point your agent's installer at this domain and it picks up the shape of a Comark template, the kit files behind it, the Go wiring around both, and the handful of behaviours that are easy to get wrong.

Install it

Terminal
pnpx skills add https://lttr.sulv.org

npx skills add https://lttr.sulv.org does the same thing if you are not using pnpm.

The installer reads the discovery index at /.well-known/skills/index.json, which lists every skill this site publishes along with its files. There is one, named lttr.

Know what it contains

The skill leads with a short SKILL.md your agent always reads, and six reference files it loads only when the task calls for one. That split keeps the common case cheap: an agent adding a component to a template pulls in the component catalogue, not the SMTP details.

FileCovers
SKILL.mdMental model, a complete compiling program, the traps, and a map to everything below
references/authoring.mdFrontmatter, Comark syntax, merge tags, bindings, URLs, actions, spans, compile errors
references/kits.mdkit.yaml, component.yaml, templates and views, template checking
references/quiet-components.mdThe Quiet kit's component catalogue
references/sending.mdProfiles, Message, MIME, SMTP, custom senders
references/tooling-and-testing.mdThe lttr CLI, make targets, testing your own kit and templates
references/api-reference.mdThe exported surface, signature-dense

Understand what it corrects

A model that has never seen lttr will fall back on habits from Handlebars, MJML or Go's html/template, and several of those habits produce templates that compile and then misbehave, or fail in ways that are hard to read. The skill front-loads exactly those cases:

  • Bindings need the exact registered type. :order="order" only resolves if the kit registered that Go type with kit.Types; untyped map[string]any data can fill a merge tag but never a binding. See Go types and funcs.
  • A kit that binds Go types or adds functions can only be checked from Go, not the CLI. lttr kit check ./mykit loads the kit with no kit.Types or kit.Funcs, so it fails with types: "Invoice" is not registered on a kit that needs them; check it from a Go test instead, with lint.Check over a lttr.SampleSet. See Tooling and testing.
  • Kit templates are type-checked at load, against the view they execute with. A typo in components/receipt/html.tmpl fails at kit.Load, not at render, with the kit's own file position — use .Attrs.name, .Bind, .Content and the other view fields the schema actually declares. See Template checking.
  • An optional URL attribute needs an explicit empty fallback. src="{{map_url}}" with no value is a render error; src="{{map_url |}}" leaves it unset instead. See Merge tags and data.
  • " is banned in token CSS values. kit.yaml tokens feed straight into styles.css; quote a font stack with ' ('Times New Roman'), not ". See kit.yaml.
  • A fallback inside a table cell needs \|. The table parser splits cells on a bare |, so {{name | there}} breaks the row; write {{name \| there}}. See Comark syntax.
  • Raw HTML is always a compile error, in every kit, with no opt-out. So are unknown components, unknown attributes, and slots (slots are reserved). See Compile errors. Pre-rendered HTML reaches an email only from Go: an html attribute whose value is one merge tag naming an lttr.TrustedHTML field. See Component schemas.

Every error message the skill quotes is copied from the source, and the program in SKILL.md is compiled as part of keeping it honest.

Keep it up to date

Re-run the install command to pull the current version. The skill is versioned with the docs site, so it describes the library as of whatever is deployed here.

Publish it from your own build

The skill lives in docs-site/skills/lttr/ and is served by the Docus skills module, which scans a skills/ directory at the Nuxt root and needs no configuration. A local pnpm dev serves the same endpoints, so you can point an installer at http://localhost:3000 to test a change before it ships.

Terminal
curl -s http://localhost:3000/.well-known/skills/index.json
curl -s http://localhost:3000/.well-known/skills/lttr/SKILL.md

Go further

Quick start

Build your first email, with or without an agent.

API reference

The same surface the skill's reference file distils.
Copyright © 2026