Installs into .claude/skills of the current project.
Are you the author of Hotfix?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/edjchapman-hotfix)
---
name: hotfix
description: Ship an urgent production fix — minimal change, targeted tests, PR. Use when the user says "hotfix" or describes a bug that has to reach main now.
argument-hint: "<bug description>"
---
Guide me through creating a hotfix: branch from main, apply a minimal fix, run targeted tests, and prepare a PR.
## Arguments
`$ARGUMENTS`
- Describe the bug or issue that needs an urgent fix
- Example: `/hotfix users getting 500 on password reset`
## Steps
### 1. Create Hotfix Branch
```bash
git fetch origin main
git checkout -b hotfix/<short-description> origin/main
```
Ask the user to confirm the branch name before creating it.
### 2. Investigate the Issue
- Locate the relevant code based on the bug description
- Identify the root cause with minimal investigation
- Focus on the immediate fix, not broader refactoring
### 3. Apply Minimal Fix
- Make the **smallest possible change** that resolves the issue
- Do NOT refactor surrounding code
- Do NOT add features or improvements
- Add a targeted test that reproduces the bug and verifies the fix
### 4. Verify
Run only the tests directly related to the fix:
- Django: `python3 manage.py test <app.tests.TestClass> --no-input`
- TypeScript: `npx vitest run <specific_test_file>`
- Full suite: `python3 manage.py test --no-input --parallel=8` (if fast enough)
### 5. Prepare PR
Use `gh pr create` with:
- Title: `hotfix: <description>`
- Label: `hotfix` (if available)
- Body should include:
- **Problem**: What was broken
- **Root Cause**: Why it happened
- **Fix**: What was changed and why
- **Risk**: Assessment of the fix's impact
- **Test Plan**: How the fix was verified
### 6. Post-Fix Checklist
Present to the user:
- [ ] Fix is minimal and targeted
- [ ] Test reproduces the original bug
- [ ] Test passes with the fix
- [ ] No unrelated changes included
- [ ] PR description explains the urgency
## Output
Present the PR URL when complete and remind the user to:
- Request expedited review
- Monitor deployment after merge
- Consider if a follow-up ticket is needed for deeper investigation