File contents /hotfix
Quick patch workflow for production issues with minimal risk.
Usage
/hotfix <issue> [--from <branch>] [--cherry-pick <commit>]
Arguments
issue: Issue number, description, or "rollback"
--from <branch>: Base branch (default: production/main)
--cherry-pick <commit>: Apply specific commit as hotfix
Instructions
When this skill is invoked:
Agent Behavior
Autonomy:
Move quickly but safely
Minimize changes to only what's necessary
Complete the hotfix cycle end-to-end
Safety:
Never skip tests
Always verify fix in isolation
Create clear audit trail
Urgency:
Prioritize fix over perfection
Document thoroughly for follow-up
Communicate status clearly
Hotfix Process
Phase 1: Assess
Understand the issue :
Severity level (critical, high, medium)
Impact scope (all users, subset, specific feature)
Current workarounds (if any)
Determine approach :
New fix vs cherry-pick existing commit
Rollback vs forward-fix
Scope of changes needed
Create hotfix branch :
git checkout main
git pull origin main
git checkout -b hotfix/{issue_number}-{description}
Phase 2: Fix
Implement minimal fix :
Change only what's necessary
Avoid refactoring
Avoid unrelated improvements
Add targeted test :
Test the specific failure case
Regression test for the bug
Keep test focused
Verify locally :
{test_command} tests/ -v
{lint_command}
Phase 3: Validate
Run full test suite :
{test_command} tests/ --tb=short
Security check :
{security_scan_command}
Review changes :
git diff main...HEAD
Phase 4: Deploy
Create commit :
git commit -m "$(cat <<'EOF'
hotfix(scope): brief description
Issue: #123
Severity: Critical
Impact: All users experiencing login failures
Root cause: [brief explanation]
Fix: [what was changed]
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Push and create PR :
git push -u origin hotfix/{branch_name}
gh pr create \
--title "HOTFIX: brief description" \
--body "[hotfix PR template]" \
--label "hotfix,urgent"
Request expedited review :
Tag on-call reviewer
Note urgency in PR
After merge :
Verify deployment
Monitor for issues
Update incident log
Rollback Workflow
When /hotfix rollback is invoked:
Identify last good commit :
git log --oneline -20
Create revert commit :
git revert <bad_commit> --no-edit
Or deploy previous version :
git checkout <last_good_commit>
Verify rollback :
Run smoke tests
Check critical paths
Cherry-Pick Workflow
When --cherry-pick is specified:
Fetch the commit :
git fetch origin
git cherry-pick <commit_hash>
Resolve conflicts if any
Verify cherry-pick :
{test_command}
Hotfix PR Template
## HOTFIX: [Brief Description]
**Severity:** Critical / High / Medium
**Issue:** #123
**Incident:** [Link to incident if applicable]
### Problem
[1-2 sentences describing what's broken]
### Impact
- Affected users: [All / Subset / Specific]
- Started: [Timestamp]
- Current workaround: [If any]
### Root Cause
[Brief technical explanation]
### Fix
[What this PR changes]
### Testing
- [ ] Unit test added for failure case
- [ ] Full test suite passes
- [ ] Manually verified fix
### Rollback Plan
[How to rollback if this fix causes issues]
### Follow-up
- [ ] Post-mortem scheduled
- [ ] Long-term fix ticket created: #XXX
---
**HOTFIX - Expedited review requested**
Post-Hotfix Checklist
Example Output
$ /hotfix 789 --from main
HOTFIX Mode Activated
Issue: #789 - Users unable to login
Severity: Critical
Branch: hotfix/789-login-failure
Creating hotfix branch from main...
✅ Branch created: hotfix/789-login-failure
Analyzing issue...
Reading: src/services/auth.py
Reading: src/api/login.py
Reading: recent commits
Root cause identified:
Commit abc123 introduced a typo in token validation
`token.exipres` instead of `token.expires`
Implementing fix...
✅ Fixed typo in src/services/auth.py:45
Adding regression test...
✅ Created tests/unit/test_auth_token_expiry.py
Running verification...
✅ Tests pass (145/145)
✅ Linting passes
✅ Security scan clean
Ready to commit:
hotfix(auth): fix token expiration check typo
Issue: #789
Severity: Critical
Impact: All users unable to login due to token validation failure
Root cause: Typo in token.expires property access (exipres → expires)
Fix: Corrected property name in validation check
Co-Authored-By: Claude <noreply@anthropic.com>
Creating PR...
✅ PR created: https://github.com/org/repo/pull/456
✅ Labels added: hotfix, urgent
✅ Reviewers notified
Next steps:
1. Get expedited review
2. Merge when approved
3. Monitor deployment
4. Update incident channel
1 --- 2 name: hotfix 3 description: Quick patch workflow for production issues with minimal risk. 4 --- 5 6 # /hotfix 7 8 Quick patch workflow for production issues with minimal risk. 9 10 ## Usage 11 12 ``` 13 /hotfix <issue> [--from <branch>] [--cherry-pick <commit>] 14 ``` 15 16 ## Arguments 17 18 - `issue`: Issue number, description, or "rollback" 19 - `--from <branch>`: Base branch (default: production/main) 20 - `--cherry-pick <commit>`: Apply specific commit as hotfix 21 22 ## Instructions 23 24 When this skill is invoked: 25 26 ### Agent Behavior 27 28 **Autonomy:** 29 - Move quickly but safely 30 - Minimize changes to only what's necessary 31 - Complete the hotfix cycle end-to-end 32 33 **Safety:** 34 - Never skip tests 35 - Always verify fix in isolation 36 - Create clear audit trail 37 38 **Urgency:** 39 - Prioritize fix over perfection 40 - Document thoroughly for follow-up 41 - Communicate status clearly 42 43 ### Hotfix Process 44 45 #### Phase 1: Assess 46 47 1. **Understand the issue**: 48 - Severity level (critical, high, medium) 49 - Impact scope (all users, subset, specific feature) 50 - Current workarounds (if any) 51 52 2. **Determine approach**: 53 - New fix vs cherry-pick existing commit 54 - Rollback vs forward-fix 55 - Scope of changes needed 56 57 3. **Create hotfix branch**: 58 ```bash 59 git checkout main 60 git pull origin main 61 git checkout -b hotfix/{issue_number}-{description} 62 ``` 63 64 #### Phase 2: Fix 65 66 1. **Implement minimal fix**: 67 - Change only what's necessary 68 - Avoid refactoring 69 - Avoid unrelated improvements 70 71 2. **Add targeted test**: 72 - Test the specific failure case 73 - Regression test for the bug 74 - Keep test focused 75 76 3. **Verify locally**: 77 ```bash 78 {test_command} tests/ -v 79 {lint_command} 80 ``` 81 82 #### Phase 3: Validate 83 84 1. **Run full test suite**: 85 ```bash 86 {test_command} tests/ --tb=short 87 ``` 88 89 2. **Security check**: 90 ```bash 91 {security_scan_command} 92 ``` 93 94 3. **Review changes**: 95 ```bash 96 git diff main...HEAD 97 ``` 98 99 #### Phase 4: Deploy 100 101 1. **Create commit**: 102 ```bash 103 git commit -m "$(cat <<'EOF' 104 hotfix(scope): brief description 105 106 Issue: #123 107 Severity: Critical 108 Impact: All users experiencing login failures 109 110 Root cause: [brief explanation] 111 Fix: [what was changed] 112 113 Co-Authored-By: Claude <noreply@anthropic.com> 114 EOF 115 )" 116 ``` 117 118 2. **Push and create PR**: 119 ```bash 120 git push -u origin hotfix/{branch_name} 121 122 gh pr create \ 123 --title "HOTFIX: brief description" \ 124 --body "[hotfix PR template]" \ 125 --label "hotfix,urgent" 126 ``` 127 128 3. **Request expedited review**: 129 - Tag on-call reviewer 130 - Note urgency in PR 131 132 4. **After merge**: 133 - Verify deployment 134 - Monitor for issues 135 - Update incident log 136 137 ### Rollback Workflow 138 139 When `/hotfix rollback` is invoked: 140 141 1. **Identify last good commit**: 142 ```bash 143 git log --oneline -20 144 ``` 145 146 2. **Create revert commit**: 147 ```bash 148 git revert <bad_commit> --no-edit 149 ``` 150 151 3. **Or deploy previous version**: 152 ```bash 153 git checkout <last_good_commit> 154 ``` 155 156 4. **Verify rollback**: 157 - Run smoke tests 158 - Check critical paths 159 160 ### Cherry-Pick Workflow 161 162 When `--cherry-pick` is specified: 163 164 1. **Fetch the commit**: 165 ```bash 166 git fetch origin 167 git cherry-pick <commit_hash> 168 ``` 169 170 2. **Resolve conflicts** if any 171 172 3. **Verify cherry-pick**: 173 ```bash 174 {test_command} 175 ``` 176 177 ### Hotfix PR Template 178 179 ```markdown 180 ## HOTFIX: [Brief Description] 181 182 **Severity:** Critical / High / Medium 183 **Issue:** #123 184 **Incident:** [Link to incident if applicable] 185 186 ### Problem 187 188 [1-2 sentences describing what's broken] 189 190 ### Impact 191 192 - Affected users: [All / Subset / Specific] 193 - Started: [Timestamp] 194 - Current workaround: [If any] 195 196 ### Root Cause 197 198 [Brief technical explanation] 199 200 ### Fix 201 202 [What this PR changes] 203 204 ### Testing 205 206 - [ ] Unit test added for failure case 207 - [ ] Full test suite passes 208 - [ ] Manually verified fix 209 210 ### Rollback Plan 211 212 [How to rollback if this fix causes issues] 213 214 ### Follow-up 215 216 - [ ] Post-mortem scheduled 217 - [ ] Long-term fix ticket created: #XXX 218 219 --- 220 **HOTFIX - Expedited review requested** 221 ``` 222 223 ### Post-Hotfix Checklist 224 225 - [ ] Fix deployed to production 226 - [ ] Monitoring shows improvement 227 - [ ] Incident communication sent 228 - [ ] Follow-up ticket created 229 - [ ] Post-mortem scheduled (if critical) 230 231 ## Example Output 232 233 ``` 234 $ /hotfix 789 --from main 235 236 HOTFIX Mode Activated 237 238 Issue: #789 - Users unable to login 239 Severity: Critical 240 Branch: hotfix/789-login-failure 241 242 Creating hotfix branch from main... 243 ✅ Branch created: hotfix/789-login-failure 244 245 Analyzing issue... 246 Reading: src/services/auth.py 247 Reading: src/api/login.py 248 Reading: recent commits 249 250 Root cause identified: 251 Commit abc123 introduced a typo in token validation 252 `token.exipres` instead of `token.expires` 253 254 Implementing fix... 255 ✅ Fixed typo in src/services/auth.py:45 256 257 Adding regression test... 258 ✅ Created tests/unit/test_auth_token_expiry.py 259 260 Running verification... 261 ✅ Tests pass (145/145) 262 ✅ Linting passes 263 ✅ Security scan clean 264 265 Ready to commit: 266 267 hotfix(auth): fix token expiration check typo 268 269 Issue: #789 270 Severity: Critical 271 Impact: All users unable to login due to token validation failure 272 273 Root cause: Typo in token.expires property access (exipres → expires) 274 Fix: Corrected property name in validation check 275 276 Co-Authored-By: Claude <noreply@anthropic.com> 277 278 Creating PR... 279 ✅ PR created: https://github.com/org/repo/pull/456 280 ✅ Labels added: hotfix, urgent 281 ✅ Reviewers notified 282 283 Next steps: 284 1. Get expedited review 285 2. Merge when approved 286 3. Monitor deployment 287 4. Update incident channel 288 ```
coreindustries/core-ai-template/tree/main/.claude/skills/hotfix commit c9e7030a7c
Frequently asked questions How do I install the Hotfix skill? Run npx skillmds@latest add coreindustries/hotfix in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Hotfix skill do? Quick patch workflow for production issues with minimal risk. It is listed under Productivity on SkillMD.
Is Hotfix safe to use? This skill has not completed SkillMD's automated safety review yet. Capability flags: makes network calls, reads secrets. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Hotfix? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Hotfix free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Hotfix? coreindustries (@coreindustries) published this skill. Their other Agent Skills are listed on their SkillMD profile.