Cursor HTMX 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 htm,适用于各类文档与内容的智能化处理。
Cursor HTMX 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 htm,适用于各类文档与内容的智能化处理。
**文件来源:** PatrickJS/awesome-cursorrules → `rules/htmx-basic-cursorrules-prompt-file.mdc`
**原仓库:** https://github.com/PatrickJS/awesome-cursorrules
**评分:** ⭐ 仓库 40k stars (社区最权威 Cursor rules 合集)
把 `htmx-basic-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。
> 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)
`;
有问题或建议,在本 skill 下留言。
把 `htmx-basic-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。
> Cursor rules for HTMX development with basic setup.