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/Renvia-code/best-cursor-rulesWrote 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/renvia-code/best-cursor-rules/django-htmx)<a href="https://agentmods.dev/rules/renvia-code/best-cursor-rules/django-htmx"><img src="https://agentmods.dev/badge/rules/renvia-code/best-cursor-rules/django-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/renvia-code/best-cursor-rules/django-htmx"><img src="https://agentmods.dev/badge/rules/renvia-code/best-cursor-rules/django-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.00000 | $0.03062 |
| Opus 5.5 | $0.00000 | $0.01225 |
| Sonnet 5.5 | $0.00000 | $0.00612 |
| Haiku 4.5 | $0.00000 | $0.00306 |
Grade A, and why
django-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 1mo 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- django-htmx — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 503 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Django + HTMX Stack
Overview
| Layer | Technology | Purpose |
|---|---|---|
| Framework | Django 5 | Full-stack web framework |
| Interactivity | HTMX | HTML-driven interactivity |
| Styling | Tailwind CSS | Utility-first CSS |
| Templates | Django Templates | Server-side rendering |
| Database | PostgreSQL | Production database |
Related rules: python.mdc, tailwind.mdc
Project Structure
project/
├── config/
│ ├── __init__.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── apps/
│ ├── core/ # Shared utilities
│ │ ├── templatetags/
│ │ └── mixins.py
│ ├── users/
│ │ ├── models.py
│ │ ├── views.py
│ │ ├── urls.py
│ │ └── forms.py
│ └── posts/
│ ├── models.py
│ ├── views.py
│ ├── urls.py
│ └── forms.py
├── templates/
│ ├── base.html
│ ├── components/ # Reusable partials
│ │ ├── _button.html
│ │ ├── _modal.html
│ │ └── _toast.html
│ ├── partials/ # HTMX response partials
│ │ └── posts/
│ │ ├── _list.html
│ │ └── _item.html
│ └── pages/
│ └── posts/
│ ├── list.html
│ └── detail.html
├── static/
│ ├── css/
│ └── js/
└── manage.py
HTMX Setup
Base Template
<!-- templates/base.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}{{ title }}{% endblock %}</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- HTMX -->
<script src="https://unpkg.com/[email protected]"></script>
<!-- CSRF Token for HTMX -->
<meta name="csrf-token" content="{{ csrf_token }}">
</head>
<body hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
{% include "components/_toast.html" %}
<main class="container mx-auto px-4 py-8">
{% block content %}{% endblock %}
</main>
</body>
</html>
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.
- 1mo ago First seen · 503 lines · 0 tokens per session scan A 51c05b1cdd43
django-htmx is a cursor rule published in the GitHub repository Renvia-code/best-cursor-rules (13 stars, last pushed 10mo ago), licensed CC0-1.0. It costs nothing until one of its globs matches a file; then it loads 3,062 tokens. 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.
Other cursor rules, from other repositories
python-flask-json-guide-cursorrules-prompt-file
Cursor rules for Python Flask development with JSON guide.
py-fast-api
Cursor rules for Python FastAPI backend development and best practices.
python-django-best-practices-cursorrules-prompt-fi
Cursor rules for Python Django development with best practices.
python
Python best practices and patterns for modern software development with Flask and SQLite.
fastapi
FastAPI best practices and patterns for building modern Python web APIs.
python-fastapi-best-practices-cursorrules-prompt-f
Cursor rules for Python FastAPI development with best practices.