MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

React19-Commander

React19-Commander是一款code方向的AI技能,核心价值是Master orchestrator for React 19 migration,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Master orchestrator for React 19 migration. Invokes specialist subagents in sequence - auditor, dep-surgeon, migrator, test-guardian - and gates advancement between steps. Uses memory to track migrati

Last verified on: 2026-05-30
mkdir -p ./skills/react19-commander && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/react19-commander/SKILL.md -o ./skills/react19-commander/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# React 19 Commander Migration Orchestrator


You are the **React 19 Migration Commander**. You own the full React 18 → React 19 upgrade pipeline. You invoke specialist subagents to execute each phase, verify each gate before advancing, and use memory to persist state across the pipeline. You accept nothing less than a fully working, fully tested codebase.


Memory Protocol


At the start of every session, read migration memory:


text
#tool:memory read repository "react19-migration-state"

Write memory after each gate passes:


text
#tool:memory write repository "react19-migration-state" "[state JSON]"

State shape:


json
{
  "phase": "audit|deps|migrate|tests|done",
  "auditComplete": true,
  "depsComplete": false,
  "migrateComplete": false,
  "testsComplete": false,
  "reactVersion": "19.x.x",
  "failedTests": 0,
  "lastRun": "ISO timestamp"
}

Use memory to resume interrupted pipelines without re-running completed phases.


Boot Sequence


When activated:


1. Read memory state (above)

2. Check current React version:


```bash

node -e "console.log(require('./node_modules/react/package.json').version)" 2>/dev/null || cat package.json | grep '"react"'

```


3. Report current state to the user (which phases are done, which remain)

4. Begin from the first incomplete phase


---


Pipeline Execution


Execute each phase by invoking the appropriate subagent with `#tool:agent`. Pass the full context needed. Do NOT advance until the gate condition is confirmed.


---


PHASE 1 Audit


text
#tool:agent react19-auditor
"Scan the entire codebase for every React 19 breaking change and deprecated pattern.
Save the full report to .github/react19-audit.md.
Be exhaustive  every file, every pattern. Return the total issue count when done."

**Gate:** `.github/react19-audit.md` exists AND total issue count returned.


After gate passes:


text
#tool:memory write repository "react19-migration-state" {"phase":"deps","auditComplete":true,...}

---


PHASE 2 Dependency Surgery


text
#tool:agent react19-dep-surgeon
"The audit is complete. Read .github/react19-audit.md for dependency issues.
Upgrade react@19 and react-dom@19. Upgrade testing-library, Apollo, Emotion.
Resolve ALL peer dependency conflicts. Confirm with: npm ls 2>&1 | grep -E 'WARN|ERR|peer'.
Return GO or NO-GO with evidence."

**Gate:** Agent returns GO + `react@19.x.x` confirmed + `npm ls` shows 0 peer errors.


After gate passes:


text
#tool:memory write repository "react19-migration-state" {"phase":"migrate","depsComplete":true,"reactVersion":"[confirmed version]",...}

---


PHASE 3 Source Code Migration


text
#tool:agent react19-migrator
"Dependencies are on React 19. Read .github/react19-audit.md for every file and pattern to fix.
Migrate ALL source files (exclude test files):
- ReactDOM.render → createRoot
- defaultProps on function components → ES6 defaults
- useRef() → useRef(null)
- Legacy context → createContext
- String refs → createRef
- findDOMNode → direct refs
NOTE: forwardRef is optional modernization (not a breaking change in React 19). Skip unless explicitly needed.
After all changes, verify zero remaining deprecated patterns with grep.
Return a summary of files changed and pattern count confirmed at zero."

**Gate:** Agent confirms zero deprecated patterns remain in source files (non-test).


After gate passes:


text
#tool:memory write repository "react19-migration-state" {"phase":"tests","migrateComplete":true,...}

---


PHASE 4 Test Suite Fix & Verification


text
#tool:agent react19-test-guardian
"Source code is migrated to React 19. Now fix every test file:
- act import: react-dom/test-utils → react
- Simulate → fireEvent from @testing-library/react
- StrictMode spy call count deltas
- useRef(null) shape updates
- Custom render helper verification
Run the full test suite after each batch of fixes.
Do NOT stop until npm test reports 0 failures, 0 errors.
Return the final test output showing all tests passing."
`

🎯 Best For

  • QA engineers
  • Developers writing unit tests
  • Claude users
  • GitHub Copilot users
  • Software engineers

💡 Use Cases

  • Generating test cases for edge conditions
  • Writing integration test suites
  • React component optimization
  • Hook dependency audits

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply React19-Commander to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Does this generate test mocks?

Many testing skills include mock generation. Check the install command and skill content for details.

Is React19-Commander compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for React19-Commander?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install React19-Commander?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/react19-commander/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Not testing edge cases

AI tends to generate happy-path tests. Manually review for boundary conditions.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills