Catalog
github/react-audit-grep-patterns

github

react-audit-grep-patterns

Provides the complete, verified grep scan command library for auditing React codebases before a React 18.3.1 or React 19 upgrade. Use this skill whenever running a migration audit - for both the react18-auditor and react19-auditor agents. Contains every grep pattern needed to find deprecated APIs, removed APIs, unsafe lifecycle methods, batching vulnerabilities, test file issues, dependency conflicts, and React 19 specific removals. Always use this skill when writing audit scan commands - do not rely on memory for grep syntax, especially for the multi-line async setState patterns which require context flags.

v1.0Latest
New~446Updated Jun 26, 2026

React Audit Grep Patterns

Complete scan command library for React 18.3.1 and React 19 migration audits.

Usage

Read the relevant section for your target:

  • references/react18-scans.md - all scans for React 16/17 → 18.3.1 audit
  • references/react19-scans.md - all scans for React 18 → 19 audit
  • references/test-scans.md - test file specific scans (used by both auditors)
  • references/dep-scans.md - dependency and peer conflict scans

Base Patterns Used Across All Scans

# Standard flags used throughout:
# -r = recursive
# -n = show line numbers
# -l = show filenames only (for counting affected files)
# --include="*.js" --include="*.jsx" = JS/JSX files only
# | grep -v "\.test\.\|\.spec\.\|__tests__" = exclude test files
# | grep -v "node_modules" = safety (usually handled by not scanning node_modules)
# 2>/dev/null = suppress "no files found" errors

# Source files only (exclude tests):
SRC_FLAGS='--include="*.js" --include="*.jsx"'
EXCLUDE_TESTS='grep -v "\.test\.\|\.spec\.\|__tests__"'

# Test files only:
TEST_FLAGS='--include="*.test.js" --include="*.test.jsx" --include="*.spec.js" --include="*.spec.jsx"'
Files5
5 files · 19.1 KB

Select a file to preview

Overall Score

82/100

Grade

B

Good

Safety

85

Quality

82

Clarity

88

Completeness

75

Summary

This skill provides a complete library of verified grep commands for auditing React codebases before upgrading to React 18.3.1 or React 19. It supplies scan patterns for detecting deprecated APIs, removed APIs, unsafe lifecycle methods, batching vulnerabilities, test file issues, and dependency conflicts across four reference documents (react18, react19, tests, dependencies). The skill is designed to be consulted during migration audits to avoid relying on memory for complex multi-line grep patterns.

Detected Capabilities

file readgrep command generationcode pattern matchingdependency analysistest file scanning

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

react 18 migration auditreact 19 upgrade scanlifecycle method detectionenzyme blocker checkbatching vulnerability scan

Risk Signals

INFO

Dynamic environment variable access in dependency version check

references/react18-scans.md Phase 0
INFO

Pipe to Python for JSON parsing (package.json dependency extraction)

references/dep-scans.md Current Versions section
INFO

npm ls output parsing - external command execution

references/dep-scans.md Peer Dependency Conflicts

Use Cases

  • React 18 migration audit - detect unsafe lifecycle methods, legacy context, string refs, and batching vulnerabilities
  • React 19 migration audit - identify all removed APIs and deprecated patterns before upgrade
  • Pre-migration dependency analysis - scan for Enzyme blocker, peer conflicts, and incompatible versions
  • Test suite compatibility check - find deprecated test utilities and patterns before React upgrade
  • Codebase profiling - count class components, function components, and overall API usage

Quality Notes

  • Well-structured reference library with clear phase-based organization matching migration auditor workflows
  • Each scan command documents its purpose and grep flags, enabling understanding without external docs
  • Comprehensive coverage of both R18 and R19 breaking changes with practical scan ordering
  • Summary scripts provide quick codebase overview before detailed analysis
  • Some bash variable declarations (SRC_FLAGS, EXCLUDE_TESTS) are documented but not consistently used in examples
  • Missing error context notes - some patterns may yield false positives (e.g., 'this.context' in modern code)
  • Dependency scan section relies on external tooling (npm, node, python3) but appropriately uses 2>/dev/null for error suppression
Model: claude-haiku-4-5-20251001Analyzed: Jun 26, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use github/react-audit-grep-patterns in your dev environment

Command Palette

Search for a command to run...