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/TashanGKD/tashan-cursor-skillsWrote 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/tashangkd/tashan-cursor-skills/fragment-before-direct-edit)<a href="https://agentmods.dev/rules/tashangkd/tashan-cursor-skills/fragment-before-direct-edit"><img src="https://agentmods.dev/badge/rules/tashangkd/tashan-cursor-skills/fragment-before-direct-edit/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/tashangkd/tashan-cursor-skills/fragment-before-direct-edit"><img src="https://agentmods.dev/badge/rules/tashangkd/tashan-cursor-skills/fragment-before-direct-edit.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.00071 | $0.00561 |
| Opus 5 | $0.00036 | $0.00280 |
| Sonnet 5 | $0.00014 | $0.00112 |
| Haiku 4.5 | $0.00007 | $0.00056 |
Grade A, and why
fragment-before-direct-edit 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 11d 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:
- fragment-before-direct-edit — 100% identical, 0 lines differ
What it actually says
碎片优先规则(Fragment Before Direct Edit)
核心原则
直接修改L1文档 vs 先记录为L2碎片再整合,这两种路径有本质区别:
| 直接修改 | 先记录碎片再整合 |
|---|---|
| 快,但跳过了关卡A(可能引入重复) | 稍慢,但经过检查 |
| 没有留下「这个想法的来龙去脉」 | 碎片记录了原始想法的背景 |
| 难以追溯「为什么加了这段」 | 碎片整合索引可追溯 |
| 适合:修改已有内容的表述 | 适合:加入全新的洞见或观点 |
触发条件
当用户说类似以下表述,且尚未明确说「直接改」时:
- 「我想在[文档]里加上X」
- 「[文档]的某章应该包含...」
- 「我觉得[文档]漏了一个点」
- 「[文档]需要补充...」
AI 应该做的事
在直接修改之前,先询问一次:
「这个新观点是加入[文档],还是先作为碎片记录后再整合?
直接修改:更快,适合修改已有表述、纠正错误 先记碎片:更严谨,适合加入全新洞见(会自动检查是否重复、标注关联)
[直接修改] [先记录为碎片]」
→ 用户选「直接修改」→ 触发 cognitive-update-knowledge Skill
→ 用户选「先记录为碎片」→ 触发 cognitive-capture-fragment Skill,之后自动问是否立即整合
例外情况(不需要询问,直接执行修改)
- 用户明确说「直接改」「不用记碎片了」
- 修改类型是纠正错别字/改格式/更新日期等非内容修改
- 用户正在执行某个 Skill 的中间步骤(已经走在整合流程里)
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.
- 11d ago First seen · 53 lines · 71 tokens per session scan A 210b5bb7ea14
fragment-before-direct-edit is a cursor rule published in the GitHub repository TashanGKD/tashan-cursor-skills (20 stars, last pushed 5mo ago), licensed MIT. It adds 71 tokens to every session and 561 once invoked, about $0.0004 per session on Opus 5. 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
00-workflow
Before responding to any request, call getsessioncontext.
resume
Resume from last checkpoint with state drift detection — validate persisted assumptions before continuing.
checkpoint
Save a session checkpoint — what was done, what's next, blockers.
note
Quick note — save a thought, decision, or observation to session memory.
10-feature-development
Feature implementation workflow and engineering mindset.
11-template-conventions
Reusable building blocks shipped with this template - use them instead of writing new ones.