Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Review and harden security for htmx and server-driven web apps.
79% 88%+8 ptsof test cases passed
Passed 21 of 24 test cases with the skill, and 19 of 24 without it.
3 of 3 safety checks passed
Not used yet
Use this skill before shipping htmx features that render user content, accept rich HTML, add third-party scripts, change Content Security Policy, or expose new mutation endpoints.
htmx keeps rendering on the server, but unsafe HTML is still unsafe HTML. A fragment swap can insert scripts, event handlers, dangerous URLs, or htmx attributes that cause requests. Treat every fragment as executable browser surface unless it is escaped or sanitized.
hx-*, data-hx-*, hx-on, inline event handlers, script, dangerous URLs, and style features that the product does not explicitly allow.Choose one content policy:
| User content type | Policy |
|---|---|
| Plain text | Escape and render as text |
| Markdown | Render through a sanitizer and allow only safe tags/attributes |
| Rich HTML | Sanitize with a narrow allowlist and strip htmx/event/script capabilities |
| Trusted admin HTML | Still sanitize unless the trust boundary is documented and access is tightly controlled |
Do not mark content safe merely because it was stored in the database earlier.
hx-get, hx-post, hx-put, hx-patch, hx-delete, or hx-trigger can create unintended requests.hx-on or inline handlers can execute JavaScript.hx-vals can smuggle unexpected parameters.Use hx-history="false" on sensitive pages or containers that should not be stored in htmx history cache.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.