Agent skill · Frontend

rule-writing

Implement React Doctor rules from a validated contract. Use when writing oxlint rules, planning syntax or control-flow detection, designing adversarial tests, reusing syntax tree utilities, or updating rule registration.

Million Software, Inc.14,162★ · +123/wk · 1 repos on radarProfile →
claude-codeNOASSERTION
Install
npx skills add millionco/react-doctor --skill rule-writing --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Path: .agents/skills/rule-writing/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 14,264 · +102 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Write a rule Implement the `rule-research` contract. If none exists, define a compact contract before editing. ## Plan the detector State the diagnostic condition, required syntax and bindings, unsupported cases, and adversarial tests. Keep this plan short when the user already requested implementation. Before adding a helper, search for one to reuse: ```sh bunx @rayhanadev/truffler "<symbol-or-behavior>" \ packages/oxlint-plugin-react-doctor/src/plugin \ --kind function,interface,type,constant --limit 20 ``` Read `docs/HOW_TO_WRITE_A_RULE.md`, nearby rules, utilities, and tests. ## Implement and test 1. Write detector pseudocode. 2. Add adversarial valid and invalid tests. 3. Implement only the contract's supported behavior. 4. Reuse utilities before creating new ones. 5. Update generated registration with repository commands. 6. Run focused tests and package checks. 7. Use `rde-eval` when real-code feedback could expose noise. 8. Hand the finished change to `rule-validate`. Account for: - import aliases and shadowed bindings - nested functions that do not execute immediately - transparent JavaScript and TypeScript wrappers - dynamic computed properties - imported or unresolved

What's inside
Steps it walks through
  1. Plan the detector
  2. Implement and test
  3. Run repository checks
  4. Report the implementation
Commands it runs
bunx @rayhanadev/truffler "<symbol-or-behavior>" \
packages/oxlint-plugin-react-doctor/src/plugin \
nr test
nr lint
nr typecheck
nr format
nr smoke:json-report
More from react-doctor
All skills →
About this skill
What does the rule-writing skill do?

Implement React Doctor rules from a validated contract. Use when writing oxlint rules, planning syntax or control-flow detection, designing adversarial tests, reusing syntax tree utilities, or updating rule registration.

How do I install it?

Run `npx skills add millionco/react-doctor --skill rule-writing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From millionco/react-doctor, a repository with 14,264 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going