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.
npx agentmods add rules/haidong-once/cursor-rules-collection/301-html-structuregit clone --depth 1 https://github.com/HaiDong-Once/cursor-rules-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/haidong-once/cursor-rules-collection/301-html-structure)<a href="https://agentmods.dev/rules/haidong-once/cursor-rules-collection/301-html-structure"><img src="https://agentmods.dev/badge/rules/haidong-once/cursor-rules-collection/301-html-structure.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.01717 |
| Opus 5 | $0.00000 | $0.00859 |
| Sonnet 5 | $0.00000 | $0.00343 |
| Haiku 4.5 | $0.00000 | $0.00172 |
Grade A, and why
301-html-structure 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 4d 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 — 277 lines — stays where its author put it; the contents beside it link to each section on GitHub.
HTML结构规范 (301)
规则概述
本规范定义了HTML文档的结构和编码规范,旨在提高代码的可读性、可维护性和语义化。
基本规范
1.1 文档结构
- 使用 HTML5 文档类型:
<!DOCTYPE html> - 使用 UTF-8 字符编码:
<meta charset="UTF-8"> - 添加适当的视口设置:
<meta name="viewport" content="width=device-width, initial-scale=1.0"> - 使用语义化标签组织页面结构:
<header>,<footer>,<main>,<section>,<article>,<nav>,<aside>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>页面标题</title>
</head>
<body>
<!-- 头部区域 开始 -->
<header>
<nav>
<ul>
<li><a href="/">首页</a></li>
<li><a href="/about">关于</a></li>
</ul>
</nav>
</header>
<!-- 头部区域 结束 -->
<!-- 主要内容 开始 -->
<main>
<section>
<h2>内容区域标题</h2>
<article>
<h3>文章标题</h3>
<p>内容区块</p>
</article>
</section>
<aside>侧边栏</aside>
</main>
<!-- 主要内容 结束 -->
<!-- 页脚区域 开始 -->
<footer>
<p>版权信息</p>
</footer>
<!-- 页脚区域 结束 -->
</body>
</html>
1.2 代码格式
- 缩进使用 2 个空格(一个 tab)
- 使用双引号
"而非单引号'标记属性值 - 标签名、属性名全部使用小写
<!-- 推荐 -->
<div class="example" data-type="demo">
<p>示例文本</p>
</div>
<!-- 不推荐 -->
<DIV CLASS='example' data-Type='demo'>
<P>示例文本</P>
</DIV>
1.3 分块注释
在每个组件模块的起始和结束位置添加HTML注释,便于识别模块的范围:
<!-- 用户信息模块 开始 -->
<section class="user-info">
<h2>用户详情</h2>
<div class="user-avatar">
<img src="avatar.jpg" alt="用户头像">
</div>
<div class="user-details">
<!-- 用户基本信息 -->
<p>姓名:张三</p>
<p>年龄:30</p>
</div>
</section>
<!-- 用户信息模块 结束 -->
语义化规范
2.1 使用语义化标签
优先使用语义化标签,而不是简单的 <div> 或 <span>:
<!-- 推荐 -->
<header>
<h1>网站标题</h1>
</header>
<nav>
<ul>
<li><a href="/">首页</a></li>
<li><a href="/about">关于</a></li>
</ul>
</nav>
<main>
<article>
<h2>文章标题</h2>
<p>文章内容...</p>
</article>
</main>
<footer>
<p>版权信息</p>
</footer>
<!-- 不推荐 -->
<div class="header">
<h1>网站标题</h1>
</div>
<div class="nav">
<ul>
<li><a href="/">首页</a></li>
<li><a href="/about">关于</a></li>
</ul>
</div>
<div class="content">
<div class="article">
<h2>文章标题</h2>
<p>文章内容...</p>
</div>
</div>
<div class="footer">
<p>版权信息</p>
</div>
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.
- 4d ago First seen · 277 lines · 0 tokens per session scan A 29a7833441c1
301-html-structure is a cursor rule published in the GitHub repository HaiDong-Once/cursor-rules-collection (24 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,717 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
css-styling
CSS architecture, tokens, and styling rules for this Docusaurus site. Apply when creating or modifying components, styles, layouts, or any UI-facing code.
frontend
Demo Shop frontend guidance.
ui-components
USE WHEN: Building UI components, structuring layouts, and applying styles using Tailwind CSS.
ui-components
USE WHEN: Building UI components, structuring layouts, and applying styles using Tailwind CSS.
taste-enforcement
These dials drive all downstream decisions. Adjust per-prompt when the user specifies a different mood.
widget-iframe-overlay
Floating widgets with iframes — z-index doesn't work, reserve layout space instead.