executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
htmx-interactivityCoordinate htmx with lightweight browser-side interactivity. Use when adding Alpine.js, _hyperscript, local UI state, custom events, dialogs, transitions, keyboard behavior, or browser-only state around htmx swaps in a server-rendered app.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when htmx handles server trips but the page still needs local browser behavior. Keep the ownership line explicit so server-rendered HTML and client-side state do not fight each other.
_hyperscript is best for short event-driven behaviors attached to markup.Keep persistent Alpine state outside htmx targets that will be replaced. If htmx swaps the element that owns x-data, that state resets.
_hyperscript syntax as part of the template layer.Avoid _hyperscript for complex state machines, security-sensitive logic, large data transforms, or behavior that needs substantial tests.
Use events as the bridge between server results and local browser state:
_hyperscript, or plain JavaScript listens for the event.Prefer domain event names over implementation names:
<section x-data="{ open: true }" @profile-saved.window="open = false">
<form hx-post="/profile" hx-target="#profile-panel" hx-swap="outerHTML">
...
</form>
</section>
Use lifecycle events for cross-cutting behavior:
htmx:configRequest for headers such as CSRF when the framework needs them.htmx:beforeRequest and htmx:afterRequest for instrumentation and loading behavior that attributes cannot express.htmx:beforeSwap for exceptional status handling.htmx:afterSwap or htmx:load for initializing third-party widgets in swapped content.Prefer htmx attributes such as hx-indicator and hx-disabled-elt before writing lifecycle JavaScript.
htmx.process from the htmx-js-api skill.aria-expanded, aria-controls, aria-selected, and aria-hidden from local state.Alpine, _hyperscript, inline event attributes, and hx-on can all affect Content Security Policy. Use htmx-security when adding or tightening CSP, accepting user-authored HTML, or choosing CSP-compatible builds.
x-html or equivalent APIs for untrusted content.