跳到主要内容
知仓学习社ZHICANG

rule-research

Define a precise React Doctor rule contract before implementation. Use when validating a rule idea, collecting official or open-source evidence, ide…

不碰外部(只输出文字)无严重或高危命中millionco/react-doctor

它会碰到什么

扫了多少1 个文本文件,2 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Research a rule

Produce a rule contract that rule-writing can implement without guessing.

Define the behavior

Resolve only questions that affect correctness:

  • Which code pattern should report?
  • Which runtime behavior makes it harmful?
  • Which similar code must stay quiet?
  • Does detection need syntax, scope, or path analysis?
  • Which imported, dynamic, type-driven, or interprocedural cases stay out of scope?

If the user requested implementation, make the contract concise and continue.

Collect evidence

  1. Define the rule in one sentence: This rule catches <pattern> that causes <problem>.
  2. Explain the runtime reason.
  3. Inspect nearby rules, tests, utilities, and the generated registry.
  4. Use truffler before proposing a new detector or helper:
   bunx @rayhanadev/truffler "<symbol-or-behavior>" \
     packages/oxlint-plugin-react-doctor/src/plugin \
     --kind function,interface,type,constant --limit 20
  1. Gather official documentation, implementation notes, related linter behavior, and open-source examples.
  2. Separate strong positives, adjacent patterns, valid traps, and unsupported cases.
  3. Choose syntax-only, scope-aware, or path-aware detection.

Use rde-eval when a bounded open-source sample could change the contract. Leave final pull request parity to rule-validate.

Write the contract

Return:

Rule definition:
<pattern and specific problem>

Runtime reason:
<short explanation>

Detector precision:
<syntax-only, scope-aware, or path-aware>

Evidence:

- <source and implication>

Strong positives:

- <reportable examples>

False-positive traps:

- <valid examples>

In scope:

- <supported cases>

Out of scope:

- <explicit boundaries>

Test seeds:

- <invalid and valid fixtures>

Open questions:

- <correctness blockers only>

Treat false positives as correctness bugs. Keep the diagnostic narrower than or equal to the proven behavior. Split adjacent ideas into separate rules.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 14,859
本站分层T1
该仓技能数17
原文件路径.agents/skills/rule-research/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 17 个技能