
fix-bug
Fix a reported bug in React Router from a GitHub issue. Use when the user provides a GitHub issue URL and asks to fix a bug, investigate an issue, or reproduce a problem. Handles the full workflow: fetching the issue, finding the reproduction, writing a failing test, and implementing the fix.
- Installs
- 102
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/remix-run/react-router --skill fix-bug- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads fix-bug automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Fix React Router Bug
Fix the bug reported in the following GitHub issue: $ARGUMENTS
Branching
Bug fixes should start from a clean working tree. If there are changes, prompt me to resolve them before continuing.
Bugs should be fixed from the main branch in a new branch using the format {author}/{semantic-branch-name} (i.e., brophdawg11/fix-navigation):
git branch {author}/{semantic-branch-name} main
git checkout {author}/{semantic-branch-name}
Workflow
1. Fetch and Understand the Issue
Use gh issue view <number> --repo remix-run/react-router or WebFetch to read the full issue.
Extract:
- Bug description and expected vs actual behavior
- React Router version and mode (Declarative / Data / Framework / RSC)
- Any code snippets in the issue
- Links to reproductions (StackBlitz, CodeSandbox, GitHub repo, etc.)
2. Validate the Reproduction
If there's a StackBlitz/CodeSandbox/online sandbox link:
- Use
WebFetchto read the sandbox URL and extract the relevant code - Identify the exact sequence of events that triggers the bug
If there's a GitHub repository link:
- Use
WebFetchto read key files (package.json, relevant source files) from the raw GitHub URL - Identify the route configuration, loaders, actions, or components involved
If no reproduction link exists:
- Search the issue comments with
gh issue view <number> --repo remix-run/react-router --comments - Look for code snippets in comments
- Ask the user: "No reproduction was provided. Can you share a minimal reproduction or paste the relevant code?"
3. Identify the Affected Code
Based on the bug, locate the relevant source files. Consult the key file map:
| Area | Files |
|---|---|
| Core router logic | packages/react-router/lib/router/router.ts |
| React components/hooks | packages/react-router/lib/components.tsx, lib/hooks.tsx |
| DOM utilities | packages/react-router/lib/dom/ |
| Vite/Framework plugin | packages/react-router-dev/vite/plugin.ts |
| RSC | packages/react-router/lib/rsc/ |
Use Grep and Glob to trace the relevant code paths.
4. Write a Failing Test
Unit test (for router logic, hooks, pure component behavior — no build needed):
- Location:
packages/react-router/__tests__/ - Use Jest; run with:
pnpm test packages/react-router/__tests__/<file> - Match the style of nearby test files (describe/it blocks,
createStaticHandler,createMemoryRouter,render,screen, etc.)
Integration test (for Vite plugin, SSR, hydration, Framework Mode):
- Location:
integration/ - Use Playwright with
createFixture()→createAppFixture()→PlaywrightFixture - Run with:
pnpm test:integration:run --project chromium integration/<file> - Build first if needed:
pnpm test:integration --project chromium
Write the test to reproduce the bug exactly — it must fail before the fix.
Run it and confirm it fails:
pnpm test packages/react-router/__tests__/<file> # unit
# or
pnpm test:integration:run --project chromium integration/<file> # integration
5. Implement the Fix
- Make the minimal change needed to fix the bug
- Do not refactor unrelated code
- Confirm the fix addresses the root cause, not just the symptom
- Consider all five modes: does this fix break anything in Declarative / Data / Framework / RSC?
Run the failing test again — it must now pass:
pnpm test packages/react-router/__tests__/<file>
Run the broader test suite to check for regressions:
pnpm test packages/react-router/
If the fix touches Framework/Vite code, run integration tests too:
pnpm test:integration:run --project chromium
Confirm linting and typechecking pass:
pnpm lint
pnpm typecheck
6. Create a Change file
Create a change file at packages/<package>/.changes/<type>.<unique-meaningful-name>.md. <type> should be either patch, minor, major or unstable to indicate the type of API change being made.
Format:
fix: <brief description of what was fixed>
7. Report Results
Summarize:
- What the bug was and why it happened
- What code was changed and why
- That the test now passes
- Any edge cases or related issues noticed
Ask me to review the changes and iterate based on any feedback.
8. Open PR
Once I approve the fix, commit the changes and open a PR to main. Include a Closes #NNNN in the description to link the PR to the original issue. Also link the issue in the Development sidebar
FAQ
What does the fix-bug skill do?
Fix a reported bug in React Router from a GitHub issue. Use when the user provides a GitHub issue URL and asks to fix a bug, investigate an issue, or reproduce a problem. Handles the full workflow: fetching the issue, finding the reproduction, writing a failing test, and implementing the fix.
How do I install fix-bug?
Run npx skills add https://github.com/remix-run/react-router --skill fix-bug in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/fix-bug/ (personal) or .claude/skills/fix-bug/ (project).
Which AI agents can use fix-bug?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is fix-bug safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains fix-bug?
It is published by remix-run in remix-run/react-router. It has 102 recorded installs.
More from remix-run/react-router
react-router
remix-run/react-router
Build applications with React Router in Framework, Data, Declarative, and unstable RSC modes. Use when configuring routes, route modules, loaders, actions, forms, fetchers, navigation, pending UI, SSR/SPA/pre-rendering, middleware, URL params/search params, or React Router upgrades.
implement-rfc
remix-run/react-router
Implement a React Router RFC from a GitHub discussion URL. Fetches the proposal, evaluates community feedback, resolves outstanding questions interactively, then implements the feature with tests, future flags (if breaking), and a changeset.
create-pr
remix-run/react-router
Create and package React Router pull requests. Use when the user asks to create, open, prepare, or finish a PR for this repository, including branch/commit/push handoff, draft PR creation, PR body writing, and applying GitHub labels such as pkg:, feat:, docs, github-actions, or dependencies.
finish-line
remix-run/react-router
Open the skill to read its SKILL.md instructions.
prepare-release-notes
remix-run/react-router
Open the skill to read its SKILL.md instructions.
agentic-workflows
remix-run/react-router
Route gh-aw workflow design/create/debug/upgrade requests to the right prompts.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.