Skip to content
Skills Library
Programming · Building & coding

fix-bug

/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.

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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.

Original author description

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 it works

  1. Branching
  2. Workflow
Original SKILL.md headings · 143 lines, 662 words
SKILL.md preview
---
name: fix-bug
description: "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."
disable-model-invocation: true
---

# 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`):

```sh
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 `WebFetch` to 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 `WebFetch` to 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:

```bash
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:

```bash
pnpm test packages/react-router/__tests__/<file>
```

Run the broader test suite to check for regressions:

```bash
pnpm test packages/react-router/
```

If the fix touches Framework/Vite code, run integration tests too:

```bash
pnpm test:integration:run --project chromium
```

Confirm linting and typechecking pass:

```bash
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:

```markdown
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

Versions

RepositoryScoreLicence
This page · remix-run/react-router100MIT
mthines/agent-skills100MIT
mgiovani/cc-arsenal100MIT
tddworks/claudebar100Apache-2.0
bytebase/dbhub100MIT
Cynnamoroll/factory-stack100MIT
nowsprinting/unity-coding-skills100Unlicense
Slama-Consulting/proofbench100MIT
downbelowdotxyz/downbelow-skills100MIT

Database snapshot: 13.11.2026 · package version 72719e85320d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100bugfix
    Fix a bug from a GitHub issue, following the reproduce-first workflow. Use when the user asks to fix a bug, investigate a GitHub issue, or debug a user-reported problem. Takes a GitHub issue URL or number as input.
  • 90pb-bug-fix
    Turn a GitHub issue into a tested fix on a branch with an open PR: read the issue as the contract, find the root cause, write the failing test first, fix, prove it, review the diff against the issue, push and open the PR only after GO. Merging stays with pb-ship. Use for "fix…
  • 100reproduce-bug
    Systematically reproduce and investigate a bug from a GitHub issue. Use when the user provides a GitHub issue number or URL for a bug they want reproduced or investigated.
  • 100reproduce-bug
    Systematically reproduce and investigate a bug from a GitHub issue. Use when the user provides a GitHub issue number or URL for a bug they want reproduced or investigated.
  • 100reproduce-bug
    Systematically reproduce and investigate a bug from a GitHub issue. Use when the user provides a GitHub issue number or URL for a bug they want reproduced or investigated.
  • 90fix-issue
    Use when fixing a GitHub issue — reproduce, trace root cause, fix, add regression test

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.