mohganji/skills · Archived

setup-react-doctor

One-time setup skill that adds React performance and pattern analysis via pre-commit hook and CI.

First seen May 10, 2026

Installation

$ npx skills add mohganji/skills --skill setup-react-doctor

Summary

  • One-time setup skill that adds React performance and pattern analysis via pre-commit hook and CI.
  • Detects React usage, configures react-doctor checks for component anti-patterns, unnecessary re-renders, and performance issues.
  • Use when user wants automated React quality enforcement.

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from mohganji/skills · top by installs.

npx skills add mohganji/skills

Browse all from mohganji/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 4
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,509 B
  • docs SUMMARY.md 309 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 4 installs

SKILL.md

Setup React Doctor

One-time guided setup. Adds react-doctor analysis at both CI and pre-commit hook level. Defaults to setting up both -- confirms with user before proceeding.

Workflow

Step 1 -- Detect project setup

  • Confirm the project uses React (check for react in package.json dependencies)
  • If no package.json but .tsx/.jsx files exist, ask user to confirm React usage
  • Identify component directories (e.g. src/components/, app/, pages/)
  • Check for existing ESLint React rules or other React linting
  • Check if .github/workflows/ already exists

Present findings to user and ask them to confirm or correct. Use AskUserQuestion to clarify:

  • If component directories can't be determined: ask where React components live
  • If multiple potential component roots found (e.g. monorepo): ask which to include

Step 2 -- Ask user preferences

Use AskUserQuestion for each:

  1. Where to enforce -- default is both, confirm with user:

- Both CI and pre-commit hook (recommended) - CI only -- GitHub Actions workflow - Pre-commit hook only -- local enforcement

  1. Scope -- what to analyze:

- Changed files only (recommended for pre-commit) -- fast, focused - Full project scan (recommended for CI) -- comprehensive

  1. CI enforcement mode (if CI selected):

- Fail the check (recommended) -- PR cannot merge - Warn only -- post a comment but don't block

Step 3 -- Generate files

  • If CI selected: generate .github/workflows/react-doctor.yml
  • If pre-commit hook selected: write hook script to .git/hooks/pre-commit (or append to existing) and make it executable
  • Hook should only run react-doctor on staged .tsx/.jsx files

Step 4 -- Verify

  • Read back generated files and sanity-check them
  • Show the user what was generated for review
  • Run react-doctor on a sample component as a smoke test

Key rules

  • Skip setup entirely if the project doesn't use React -- inform user and exit
  • Never overwrite existing workflow files or hooks without asking
  • Idempotent -- running again detects existing setup and skips