Agent Skillsmillionco/react-doctor › rule-validate

rule-validate

GitHub

用于在合并前验证 React Doctor 规则实现的正确性,涵盖代码审查、测试运行、PR 一致性比对及发布制品准备。

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

Trigger Scenarios

新规则或检测器行为变更的合并前验证 修复错误后需要添加回归测试和一致性检查

Install

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

Non-standard path

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

Use without installing

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

指定 Agent (Claude Code)

npx skills add millionco/react-doctor --skill rule-validate -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-validate",
    "description": "Validate an implemented React Doctor rule before merge. Use after focused tests pass to review detector correctness, inspect open-source hits, run pull request parity, add regression coverage, prepare a changeset, write pull request copy, or address review findings."
}

Validate a rule

Verify that the implementation matches its rule-research contract on tests and real code.

Review the implementation

Check for:

  • false positives and missed claimed behavior
  • incorrect imports, aliases, or shadowed bindings
  • impossible control-flow path merges
  • nested functions treated as immediate execution
  • dynamic properties treated as static names
  • missed transparent wrappers
  • unsupported imported values
  • messages that overstate detection
  • missing valid and invalid tests

Use truffler before accepting a new helper:

bunx @rayhanadev/truffler "<helper-name>" packages \
  --kind function,method,interface,type,constant --limit 20

Fix each implementation bug with a focused regression test.

Run validation

Run focused tests, package typecheck, and required lint and format checks. Run broader checks when the change affects shared behavior.

Use rde-eval for bounded local inspection of the target rule. Inspect all hits when counts are low and a representative sample when counts are high. Add every confirmed false positive to rule tests and the fuzz corpus.

Run run-parity for every new rule or detector behavior change after the pull request head is pushed. Skip it for documentation-only or test-only changes. If parity cannot run, report the exact blocker.

Do not claim parity unless both Daytona runs complete. Compare repository and project-root counts separately. Inspect target-rule deltas before classifying them.

Prepare release artifacts

Run nr changeset for user-visible changes to published packages. Use a patch changeset for rules, bug fixes, false-positive fixes, and diagnostic refinements unless release impact requires more. Skip only private, documentation, test, or tooling changes, and state why.

Write pull request copy after validation:

## Why

<specific runtime problem>

## What changed

- <detector behavior>
- <valid patterns preserved>
- <tests added>

## Eval results

| Check             | Result                |
| ----------------- | --------------------- |
| Projects compared | `<count>`             |
| Skipped projects  | `<count>`             |
| Added / removed   | `<added> / <removed>` |
| Target rule delta | `<added> / <removed>` |
| False positives   | `<count>`             |
| Artifacts         | `<paths>`             |

## Test plan

- `<command and result>`

Omit the eval table when parity did not run. State the reason instead.

Handle review findings

Fix correctness bugs, duplicated helpers, misleading names, and confusing code. Defer unsupported control flow only when it falls outside the contract. Reject requests that broaden the message or increase false positives.

Resolve review threads after the fix or explanation reaches the pull request.

Report validation

Report commands, review findings, local RDE evidence, parity results or blocker, false positives fixed, regression tests, changeset, pull request notes, and residual non-goals.

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-research/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
8a949751
Indexed
2026-07-25 11:11

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