skill-rule-protection

skill-rule-protection is a cursor rule for Cursor from TashanGKD/tashan-cursor-skills. It costs 0 tokens per session (370 once invoked), scanned A, original, MIT.

A safety rule for changing AI skills and rules stored in .cursor/skills/ and .cursor/rules/. It requires checks and a backup before those instruction files are edited.

In plain words
What is it for?
Use it when modifying skills or rules to require impact questions, a history copy, and other review steps before editing.
Why use it?
It reduces the risk that an unnoticed change will alter the agent's behaviour across future tasks.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when modifying skills or rules to require impact questions, a history copy, and other review steps before editing.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/tashangkd/tashan-cursor-skills/skill-rule-protection
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/TashanGKD/tashan-cursor-skills

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 skill-rule-protection

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/tashangkd/tashan-cursor-skills/skill-rule-protection"><img src="https://agentmods.dev/badge/rules/tashangkd/tashan-cursor-skills/skill-rule-protection.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 370 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.00370
Opus 5 $0.00000 $0.00185
Sonnet 5 $0.00000 $0.00074
Haiku 4.5 $0.00000 $0.00037

Measured 12d ago against content hash 1844773833c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

skill-rule-protection 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 12d 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.

rules/skill-rule-protection.mdc · 35 lines

What it actually says

Skill / Rule 修改保护规则

这条规则在 AI 试图修改任何 Skill 或 Rule 文件时自动生效。

强制前置步骤

在修改 .cursor/skills/.cursor/rules/ 下的任何文件之前,必须先执行

Step 1  加载并阅读:.cursor/skills/skill-rule-修改规范/SKILL.md
Step 2  回答「修改前三问」(根因/影响范围/验证方法)
Step 3  执行版本留痕(Copy-Item 到 history/ 目录)
Step 4  然后才能开始修改

跳过以上步骤直接修改 = 违规操作。

为什么

Skill 和 Rule 是所有 AI 行为的约束层。修改它们的影响范围远大于修改业务代码:

  • 业务代码出错:某个功能不对
  • Skill/Rule 出错:所有未来任务都可能系统性偏差,且难以溯源

豁免情况

以下情况可以在修改后补做留痕(但「修改前三问」不可豁免):

  • 紧急修复正在造成系统性错误的规则
  • 在同一对话轮次内对刚刚新建的 Skill/Rule 的小幅修正(尚未有任何执行历史)
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. 12d ago First seen · 35 lines · 0 tokens per session scan A 1844773833c8

Subscribe to this mod's changes

skill-rule-protection is a cursor rule published in the GitHub repository TashanGKD/tashan-cursor-skills (20 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 370 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.