Rule

0 installs · 0 said it worked

PatrickJS@patrickjs·
CodingRule· for Cursor

Cursor rules for building HTMX apps with a basic setup

A Cursor rules file that guides the assistant through HTMX development, covering core hx- attributes, a suggested src folder layout, and general practices like semantic HTML, CSRF protection, and progressive enhancement.

People use this for

  • htmx cursor rules
  • htmx web app rules
  • cursor rules for htmx apps
  • building htmx apps with cursor assistant
  • set up htmx project structure
Name
cursor-rules-for-building-htmx-apps-with-a-basic-setup
Works with
Cursor
License
CC0(as observed at the source)
Version
v1 · updated Nov 29, 2026
Imported · UnclaimedCC0

Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.

Are you the author?Claim this profileRequest removal

Use this rule

$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/cursor-rules-for-building-htmx-apps-with-a-basic-setup-2uuu/export/mdc" -o .cursor/rules/cursor-rules-for-building-htmx-apps-with-a-basic-setup.mdc

Then open a new session; Cursor picks it up from .cursor/rules/.

Download cursor-rules-for-building-htmx-apps-with-a-basic-setup.mdc
Manual install

Save cursor-rules-for-building-htmx-apps-with-a-basic-setup.mdc as .cursor/rules/cursor-rules-for-building-htmx-apps-with-a-basic-setup.mdc for this project or ~/.cursor/rules/cursor-rules-for-building-htmx-apps-with-a-basic-setup.mdc for every project, then start a new session.

Rule


description: "Cursor rules for HTMX development with basic setup." globs: */ alwaysApply: false

// HTMX Basic Setup .cursorrules

// HTMX best practices

const htmxBestPractices = [ "Use hx-get for GET requests", "Implement hx-post for POST requests", "Utilize hx-trigger for custom events", "Use hx-swap to control how content is swapped", "Implement hx-target to specify where to swap content", "Utilize hx-indicator for loading indicators", ];

// Folder structure

const folderStructure = src/ templates/ static/ css/ js/ app.py;

// Additional instructions

const additionalInstructions = `

  1. Use semantic HTML5 elements
  2. Implement proper CSRF protection
  3. Utilize HTMX extensions when needed
  4. Use hx-boost for full page navigation
  5. Implement proper error handling
  6. Follow progressive enhancement principles
  7. Use server-side templating (e.g., Jinja2, Handlebars) `;

No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.

Tried it

Reports from people who added this rule to their editor. They roll up into the badges above.

No one has filed a report yet. Try the prompt and be the first.

License: CC0v1 · published Nov 29, 2026

Comments

No comments yet. If you tried this prompt, say how it went.