htmx-go-templates
Installation
SKILL.md
htmx on Go html/template
The server owns state; a template only presents it; htmx moves HTML between the two. Most drift in these apps comes from that split being decided ad hoc, per handler and per template: seven ways to detect an htmx request, the same four attributes hand-copied across files, errors that vanish. The rules below make each of those decisions once.
This skill holds the general rules. The repo's AGENTS.md holds what only the repo knows: its swap-target ids, the names of its shared partials, and the htmx version it vendors. Read it first.
Where to look
| If you're working on… | Load |
|---|---|
A handler: choosing page / fragment / redirect, htmx headers, Vary, 303, error responses |
references/responses.md |
| A template: partials, repeated attribute bundles, forms, live regions, conditionals | references/templates.md |
Any client JS: whether you need it at all, islands, htmx glue, polling guards, aria-busy |
references/client.md |