Hub rules-htmx

rules-htmx

v3 public Verified

htmx

htmx allows you to access AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes. These rules govern HTMX usage, attribute-driven interactivity, and secure server communication for AI agents.

@sigmashakeinc 2 pulls 6 rules published Apr 8, 2026 synced Nov 22, 2026 sigmashakeinc/rules/rulesets/rules-htmx →
Severity
1 error 5 warn 0 info
demo.cast
htmx allows you to access AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes. These rules govern HTMX usage, attribute-driven interactivity, and secure server communication for AI agents.

Rules index

6 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

htmx

htmx-block-unsafe-patterns warning ask

Potentially unsafe pattern detected in htmx code: "hx-disable". Review the use case — this may indicate a security risk, a deprecated API, or a misconfiguration. Confirm the write is intentional.

Rule source requires an active Pro or Enterprise subscription.
htmx-force-updated-api warning log

hx-sse is part of the deprecated htmx 1.x SSE extension. In htmx 2.x use the official htmx-ext-sse extension. Update to avoid broken behaviour and unmaintained code.

Rule source requires an active Pro or Enterprise subscription.
htmx-no-cross-origin-hx-requests warning log

htmx requests to cross-origin URLs bypass the same-origin policy with CORS, but htmx will still send cookies and auth headers to the target. Use relative paths or validate that the target origin is intentional and has proper CORS headers.

Rule source requires an active Pro or Enterprise subscription.
htmx-no-hx-on-inline-js error block

Server-side template interpolation inside an hx-on:* attribute creates a reflected XSS vulnerability — the injected value executes as JavaScript in the user's browser. Encode all server values before rendering into hx-on attributes, or move the logic to a separate JS function referenced by name.

Rule source requires an active Pro or Enterprise subscription.
htmx-no-hx-trigger-load-unauthed warning log

hx-trigger="load" fires an AJAX request on every page load without user interaction. If the endpoint is not protected by server-side authentication, this creates an unauthenticated data fetch path. Ensure the triggered endpoint enforces the same authz as the page that embeds it.

Rule source requires an active Pro or Enterprise subscription.
htmx-no-outerhtml-swap-user-content warning log

hx-swap="outerHTML" replaces the target element entirely with server HTML. If the server response includes unescaped user content, this enables XSS. Ensure the server response is fully HTML-escaped and consider hx-swap="innerHTML" with a dedicated safe container instead.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v3
Published
Apr 8, 2026
Source commits
0
Synced
Nov 22, 2026
Hash
d770bdbdab2cbf49fcdf565f6bca536eb9d07b0c125d6959cad19149e741bc60
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-htmx/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-htmx. The published version only bumps when a maintainer resyncs.

No commit history available.