millionco/react-doctor

rule-writing

Implement React Doctor rules from a validated contract.

Ver código fuente
Documento original del Skill

Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.

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 values
  • framework escape hatches
  • control-flow paths required by the diagnostic claim
  • regressions found by reviews or evals

Keep uncertain cases quiet. Match the message to the condition the detector proves.

Run repository checks

Use @antfu/ni commands:

sh
nr test
nr lint
nr typecheck
nr format
nr smoke:json-report

Use focused commands while iterating. Record each command that ran.

Report the implementation

Report changed rules, tests, registration, reused or added utilities, reported behavior, intentional non-goals, and validation results. End with the rule-validate handoff.

del mismo repositorio

Más Skills

Todos los Skills
millionco
Comunidad

improve-react

Survey a whole React codebase as a senior React engineer, using React Doctor's scan as evidence, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper models) to execute. Read-only on source code — it plans improvements, it does not apply them. Use when the user asks to "improve the React code", "audit this codebase", "make this app faster / more robust", or wants a roadmap of fixes rather than a review of a single diff. For a regression check or a fix-it-now pass, use the react-doctor skill instead.

instalaciones
2
GitHub Stars
14,7 mil
Actualizado
3 sept
millionco
Comunidad

react-doctor

Use when finishing a feature, fixing a bug, before committing React code, or when the user types /doctor, asks to scan, triage, or clean up React diagnostics. Covers lint, accessibility, bundle size, architecture. Includes a regression check and a full local-triage workflow that fetches the canonical playbook.

instalaciones
2
GitHub Stars
14,7 mil
Actualizado
2 sept
millionco
Comunidad

benchmark-fp-fn-audit

Audit React Doctor against ReactBench or similar diagnostic benchmark corpora for confirmed false positives, false negatives, taxonomy gaps, and verifier artifacts. Use when analyzing rd.log, rd-before.json, rd-after.json, model.patch, result.json, reward/test logs, rule distributions, or when asked to perform a second adversarial pass over React Doctor benchmark findings.

instalaciones
2
GitHub Stars
14,7 mil
Actualizado
2 sept
millionco
Comunidad

deslop

Simplify and refine recently modified code while preserving functionality. Use when asked to "deslop", "clean up code", "simplify code", or after making changes that could benefit from refinement.

instalaciones
2
GitHub Stars
14,7 mil
Actualizado
2 sept