htmx-foundations
Installation
SKILL.md
htmx Foundations
Use this skill before implementation details get scattered across endpoints, templates, and browser scripts. The goal is to keep the server in charge of durable state while htmx adds targeted interactivity through HTML attributes.
Core Model
- The server owns persistence, authorization, validation, and rendered HTML.
- The browser sends normal HTTP requests from annotated HTML elements.
- Endpoints return HTML fragments when updating part of a page and full pages when supporting direct navigation.
- htmx swaps response HTML into a selected target instead of expecting JSON plus client-side rendering.
- Add browser-side JavaScript only for local state, specialized widgets, or imperative integration points.
When htmx Fits
Use htmx when the workflow is mostly: