cursor-rule

cursor-rule is a cursor rule for Cursor from YYShawn/explain-kit. It costs 0 tokens per session (661 once invoked), scanned A, original, MIT.

A Cursor rule for adding a guided walkthrough to a static HTML prototype: a movable explanation card, step markers, highlighted page areas, and text for each step. It works in a copy of the demo so the original remains untouched.

In plain words
What is it for?
Use it when a static HTML prototype needs a browser-based product walkthrough. It covers copying the demo, adding the walkthrough files, creating its configuration, and checking it in a browser.
Why use it?
It provides a repeatable process for turning a prototype into something that can explain its requirements interactively, without risking the source demo.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: reads .claude/ paths; reads ~/.codex paths; mentions Codex.

Good fit Use it when a static HTML prototype needs a browser-based product walkthrough. It covers copying the demo, adding the walkthrough files, creating its configuration, and checking it in a browser.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/yyshawn/explain-kit/cursor-rule
Install

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.

Clone the repo
git clone --depth 1 https://github.com/YYShawn/explain-kit

Made for: Cursor.

Wrote 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.

agentmods badge for cursor-rule

README.md
[![agentmods](https://agentmods.dev/badge/rules/yyshawn/explain-kit/cursor-rule/github.svg)](https://agentmods.dev/rules/yyshawn/explain-kit/cursor-rule)
Your own site
<a href="https://agentmods.dev/rules/yyshawn/explain-kit/cursor-rule"><img src="https://agentmods.dev/badge/rules/yyshawn/explain-kit/cursor-rule/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.

agentmods 80×15 button for cursor-rule

Your own site · 80×15
<a href="https://agentmods.dev/rules/yyshawn/explain-kit/cursor-rule"><img src="https://agentmods.dev/badge/rules/yyshawn/explain-kit/cursor-rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 661 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00661
Opus 5.5 $0.00000 $0.00264
Sonnet 5.5 $0.00000 $0.00132
Haiku 4.5 $0.00000 $0.00066

Measured 1mo ago against content hash 32509ab78b3f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cursor-rule 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.

launchers/cursor-rule.mdc · 21 lines

What it actually says

当用户要求给当前原型 demo 加「需求讲解」时,按以下流程(全程在原 demo 的副本里操作,原 demo 不动):

  1. 定位 demo 根:找到含 .html 的目录作为 demo 根——可能就是当前目录,也可能是子文件夹(如 demo/)。需求文档可能在兄弟文件夹(如 需求文档/)。
  2. 复制 demo 到同级副本:在 demo 根同级建 <原名>-讲解/,整份 cp -R 复制 demo 根进去。单文件 demo(一个 .html 躺在大杂烩文件夹里)只复制该 .html + 它引用的本地资源(<link>/<script>/<img>/<source>/<video>/<audio> 本地路径,不含 http(s)://、data:),保持目录结构;原代码绝对路径(/assets/...、file:///、C:\...)在副本里改相对,避免引用失效。后续都在副本里。
  3. 读 explain-kit 的 PLAYBOOK.md 并按其流程操作:
    • 全局装过 skill 时位于 ~/.claude/skills/explain/PLAYBOOK.md(或 ~/.codex/skills/explain/PLAYBOOK.md);
    • 否则从克隆的 explain-kit 仓库根读取 PLAYBOOK.md。
  4. 把 engine/ 拷到副本根(与 .html 同级)。
  5. 给副本里涉及的每个 .html 加 3 行 include(engine/explain.css + engine/explain-engine.js + explain-config.js,相对路径),不动副本里的原 demo 内容。
  6. 基于 explain-config.template.js 在副本根生成 explain-config.js(需求→steps;Explain.registerAction / registerCleanup / registerExit;每步 setup 自包含)。
  7. 需求文档:若用户没给,先问用户要(路径/粘贴/按 demo 推断),不要臆造;多份文档时问「逐个生成」还是「一次性生成」并给利弊,建议默认逐个跑通第一条再批量。
  8. 告诉用户用浏览器打开副本里的 .html 验证:右下角「📖 需求讲解」→ 选需求卡片 → 走右侧步骤点;讲解卡挡内容时可拖标题栏移开。

engine/ 与 PLAYBOOK.md 是单一真相源,与 explain skill 共用。

Changes

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.

  1. 1mo ago First seen · 21 lines · 0 tokens per session scan A 32509ab78b3f

Subscribe to this mod's changes

cursor-rule is a cursor rule published in the GitHub repository YYShawn/explain-kit (2 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 661 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-31.