React fixer

From agentic-dev3o/devx-plugins · View interactive version

React fixer is an AI agent skill from the GitHub repository agentic-dev3o/devx-plugins. Audits React codebases for anti-patterns (useEffect misuse, missing cleanup, stale closures, derived-state-in-effects, memory leaks) and produces a scored gap analysis table with severity ratings. Applies prioritized fixes on request. Triggers on: audit react code, fix react anti-patterns, review re

How to use this skill

Skill file

Fixing React Anti-Patterns

Target: $ARGUMENTS (path to scan, defaults to src/)

Workflow

Progress checklist:

React Anti-Pattern Audit:
- [ ] Step 1: Scan for anti-patterns
- [ ] Step 2: Classify findings
- [ ] Step 3: Produce gap analysis table
- [ ] Step 4: Apply fixes (if requested)
- [ ] Step 5: Verify with lint

Step 1: Scan for Anti-Patterns

Run scripts/scan-antipatterns.sh against the target directory to get a quick

inventory of suspect patterns. Then read flagged files to confirm true positives.

Use the Explore agent for deeper analysis when the script flags ambiguous cases.

Step 2: Classify Findings

For each confirmed finding, assign exactly one category using the authoritative rules

and before/after examples in the reference files:

Severity levels:

Step 3: Produce Gap Analysis Table

Output a markdown table with these columns:

| Practice | Status | Severity | File:Line | Evidence |

|----------|--------|----------|-----------|----------|

Status values: Respected, Violated, Partially respected, N/A

Group rows by category:

  1. useEffect rules
  2. State management
  3. Component architecture
  4. Cleanup & memory safety
  5. Navigation & DOM

End with a Score summary per category (X/10) and a Top fixes list ordered by impact.

Step 4: Apply Fixes

When the user requests fixes, apply them in priority order. For each fix:

  1. Read the file and surrounding context
  2. Apply the minimal change — no over-engineering, no unrelated refactors
  3. Preserve existing code style (semicolons, quotes, imports)

Consult the reference files for detailed before/after examples of each fix pattern.

Step 5: Verify

Run lint (bun run lint or project-specific command) after applying fixes.

Confirm no regressions by checking that modified components still render correctly.

Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.