Claude Code extract-errors for React Source Error Codes
Use extract-errors after adding an error message in the React source repository. It checks which messages need numeric codes and whether the error code map is current. It is useful when preparing a React contribution or investigating an unknown error code warning in a build.
中文Install in Claude Code
Claude Code, a React source checkout, Node.js, Yarn, and the project's installed dependencies. The extractor reads artifacts under `build`.
- Open a React source checkout containing the pinned skill file. Confirm `.claude/skills/extract-errors/SKILL.md` exists under the repository root.
- Start Claude Code at the React repository root. Enter `/extract-errors` and point it to the file that contains the new message.
Example task
On a local React practice branch, change the message of a `throw new Error(...)` handled by the production build to `Unexpected draft row type.` Rebuild the affected package. Ask: ‘/extract-errors Check this new message and report the assigned code and map diff.’What to check
If the production build emits an error marker for the unregistered message, `scripts/error-codes/codes.json` should gain a mapping. If the map is unchanged, check for a current marker under `build` and see whether the text already exists.
Original SKILL.md on GitHub · Updated
Frequently asked question
Can this skill diagnose an exception in a regular React app?
It works with the error code map and `extract-errors` script in the React source repository. Use the app's own logs, stack traces, or developer tools for application errors.