htmx

Installation
SKILL.md

htmx Best Practices & Go/Templ Integration

Apply correct htmx patterns when building hypermedia-driven web applications, especially with Go and templ.

Core Principles

  • Return HTML fragments, not JSON — htmx is designed for hypermedia; the server returns rendered HTML
  • Use HTML attributes, not JavaScript — prefer hx-* attributes over htmx.ajax() or fetch() calls
  • Server controls behavior — use response headers (HX-Retarget, HX-Reswap, HX-Redirect) for control flow
  • Check HX-Request header — return fragments for htmx requests, full pages for normal requests
  • Don't mix paradigms — avoid using fetch() alongside htmx in the same page; pick one approach

Reference Files

Read the relevant file for detailed patterns, code examples, and best practices:

Related skills
Installs
15
GitHub Stars
14
First Seen
Feb 28, 2026