Rule

0 installs · 0 said it worked

PatrickJS@patrickjs·
CodingRule· for Cursor

Cursor rules for building HTMX and Flask web apps

Cursor rules guiding HTMX-driven Flask development: server-side rendering, Flask-WTF forms with CSRF protection, Blueprints, application factory layout, migrations, and error handling.

People use this for

  • htmx flask cursor rules
  • flask htmx server rendering prompt
  • cursorrules for flask web apps
  • write cursor rules for htmx flask project
  • guide cursor to build flask htmx apps with blueprints and csrf
Name
cursor-rules-for-building-htmx-and-flask-web-apps
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-and-flask-web-apps-6hzb/export/mdc" -o .cursor/rules/cursor-rules-for-building-htmx-and-flask-web-apps.mdc

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

Download cursor-rules-for-building-htmx-and-flask-web-apps.mdc
Manual install

Save cursor-rules-for-building-htmx-and-flask-web-apps.mdc as .cursor/rules/cursor-rules-for-building-htmx-and-flask-web-apps.mdc for this project or ~/.cursor/rules/cursor-rules-for-building-htmx-and-flask-web-apps.mdc for every project, then start a new session.

Rule


description: "Cursor rules for HTMX development with Flask integration." globs: */ alwaysApply: false

// HTMX with Flask .cursorrules

// HTMX and Flask best practices

const htmxFlaskBestPractices = [ "Use Flask's render_template for server-side rendering", "Implement Flask-WTF for form handling", "Utilize Flask's url_for for generating URLs", "Use Flask's jsonify for JSON responses", "Implement Flask-SQLAlchemy for database operations", "Utilize Flask's Blueprint for modular applications", ];

// Folder structure

const folderStructure = app/ templates/ static/ css/ js/ models/ routes/ __init__.py config.py run.py;

// Additional instructions

const additionalInstructions = `

  1. Use Jinja2 templating with HTMX attributes
  2. Implement proper CSRF protection with Flask-WTF
  3. Utilize Flask's request object for handling HTMX requests
  4. Use Flask-Migrate for database migrations
  5. Implement proper error handling and logging
  6. Follow Flask's application factory pattern
  7. Use environment variables for configuration `;

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.