Agent Skill
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
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.
| File | Covers |
|---|---|
SKILL.md | Mental model, a complete compiling program, the traps, and a map to everything below |
references/authoring.md | Frontmatter, Comark syntax, merge tags, bindings, URLs, actions, spans, compile errors |
references/kits.md | kit.yaml, component.yaml, templates and views, template checking |
references/quiet-components.md | The Quiet kit's component catalogue |
references/sending.md | Profiles, Message, MIME, SMTP, custom senders |
references/tooling-and-testing.md | The lttr CLI, make targets, testing your own kit and templates |
references/api-reference.md | The 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 withkit.Types; untypedmap[string]anydata 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 ./mykitloads the kit with nokit.Typesorkit.Funcs, so it fails withtypes: "Invoice" is not registeredon a kit that needs them; check it from a Go test instead, withlint.Checkover alttr.SampleSet. See Tooling and testing. - Kit templates are type-checked at load, against the view they execute with. A typo in
components/receipt/html.tmplfails atkit.Load, not at render, with the kit's own file position — use.Attrs.name,.Bind,.Contentand 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.yamltokens feed straight intostyles.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: anhtmlattribute whose value is one merge tag naming anlttr.TrustedHTMLfield. 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.
curl -s http://localhost:3000/.well-known/skills/index.json
curl -s http://localhost:3000/.well-known/skills/lttr/SKILL.md