Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collectionWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/htmx)<a href="https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/htmx"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/htmx/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/htmx"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/htmx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00529 | $0.00529 |
| Opus 5.5 | $0.00212 | $0.00212 |
| Sonnet 5.5 | $0.00106 | $0.00106 |
| Haiku 4.5 | $0.00053 | $0.00053 |
Grade A, and why
htmx scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
htmx Cursor Rules
You are an expert htmx developer. Follow these rules:
Core Principles
- Server returns HTML fragments, not JSON. Every endpoint returns renderable markup
- Progressive enhancement: pages work without JavaScript first, htmx enhances
- Hypermedia as the engine of application state — URLs and links drive navigation
- Prefer hx-get/hx-post over fetch/XMLHttpRequest. No client-side state management
Attributes
- Always set hx-target to scope updates. Never rely on default (innerHTML of triggering element)
- Use hx-swap="outerHTML" for replacing elements, "innerHTML" for updating contents
- hx-indicator for loading states on every network request. Users need feedback
- hx-push-url="true" on navigation requests to maintain browser history
- hx-confirm for destructive actions (delete, reset)
Server Responses
- Return 200 with HTML fragment for success. Use HX-Trigger response header for events
- Return 422 with form HTML (including errors) for validation failures — htmx swaps it in
- Use HX-Redirect header for server-side redirects, not 301/302
- Return 204 No Content to do nothing. Return empty string with HX-Trigger for event-only responses
- Use HX-Retarget and HX-Reswap headers to override client-side targeting from the server
Patterns
- Inline editing: hx-get to fetch edit form, hx-put to save, swap back to display view
- Infinite scroll: hx-get with hx-trigger="revealed" on sentinel element
- Active search: hx-get with hx-trigger="input changed delay:300ms" and hx-indicator
- Bulk operations: use hx-include to gather checkbox values, hx-vals for extra data
Forms
- hx-post on forms, not buttons. Let the form handle submission semantics
- Use name attributes on all inputs. Server reads standard form data, not JSON
- Disable buttons during submission with htmx:beforeRequest/afterRequest events
- Return the full form with errors on validation failure, not just error messages
Organization
- Keep htmx attributes in HTML, not added via JavaScript
- Server-side partials/fragments for reusable components
- Use hx-boost="true" on body or nav for automatic AJAX navigation
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 47 lines · 529 tokens per session scan A eee419fb37ef
htmx is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (38 stars, last pushed 9mo ago), licensed MIT. It adds 529 tokens to every session, about $0.0021 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
htmx compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| htmxnedcodes-ok/cursorrules-collection | Cursor rule | 38 | 9mo ago | MIT | A | 529 | Cursor |
| 23-app-startuporbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 0 | Cursor |
| 21-ads-billingorbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 0 | Cursor |
| 30-screen-languageorbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 0 | Cursor |
| 01-feature-checklistorbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 36 | Cursor |
| 06-coroutines-floworbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 0 | Cursor |
| 09-resources-xmlorbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 0 | Cursor |