Agent Skillsmillionco/react-doctor › rule-research

rule-research

GitHub

用于在实现前定义精确的 React Doctor 规则契约,通过收集证据和界定边界来验证规则思路,确保后续实施无需猜测。

.agents/skills/rule-research/SKILL.md millionco/react-doctor

Trigger Scenarios

验证新规则想法 收集官方或开源证据 识别误报陷阱 选择检测精度

Install

npx skills add millionco/react-doctor --skill rule-research -g -y
More Options

Non-standard path

npx skills add https://github.com/millionco/react-doctor/tree/main/.agents/skills/rule-research -g -y

Use without installing

npx skills use millionco/react-doctor@rule-research

指定 Agent (Claude Code)

npx skills add millionco/react-doctor --skill rule-research -a claude-code -g -y

安装 repo 全部 skill

npx skills add millionco/react-doctor --all -g -y

预览 repo 内 skill

npx skills add millionco/react-doctor --list

SKILL.md

Frontmatter
{
    "name": "rule-research",
    "description": "Define a precise React Doctor rule contract before implementation. Use when validating a rule idea, collecting official or open-source evidence, identifying false-positive traps, choosing detector precision, or setting first-version boundaries."
}

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
    
  5. Gather official documentation, implementation notes, related linter behavior, and open-source examples.

  6. Separate strong positives, adjacent patterns, valid traps, and unsupported cases.

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

Version History

  • 4fbab2d Current 2026-07-25 11:11

Same Skill Collection

.agents/skills/benchmark-fp-fn-audit/SKILL.md
.agents/skills/deslop/SKILL.md
.agents/skills/find-similar-functions/SKILL.md
.agents/skills/fuzz/SKILL.md
.agents/skills/rde-eval/SKILL.md
.agents/skills/react-doctor/SKILL.md
.agents/skills/rule-validate/SKILL.md
.agents/skills/rule-writing/SKILL.md
.agents/skills/run-parity/SKILL.md
.agents/skills/ship/SKILL.md
.agents/skills/writing-guidelines/SKILL.md
skills/improve-threejs/SKILL.md
skills/performance/SKILL.md
skills/react-doctor/SKILL.md
.agents/skills/product-thinking/SKILL.md
skills/improve-react/SKILL.md

Metadata

Files
0
Version
3ff37f3
Hash
7d1fd66a
Indexed
2026-07-25 11:11

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 09:33
浙ICP备14020137号-1 $방문자$