hotfix-deploy
/hotfix-deploy
Full hotfix workflow for deploying urgent fixes to a production branch (coop-production, rh-production, southernlanka-staging, etc.). Covers branch creation, fix, commit, push, and PR targeting the production branch. Use when you need to apply an urgent fix directly to a production environment without going through the normal development → QA → prod pipeline. The agent may invoke this on its own judgment to prepare a hotfix (branch, fix, commit, push, PR) — merging the PR, which is what actually triggers CI/CD deployment, remains a manual human action.
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
GPL-3.0, otwarta.
What it does and when to use it
Full hotfix workflow for deploying urgent fixes to a production branch (coop-production, rh-production, southernlanka-staging, etc.). Covers branch creation, fix, commit, push, and PR targeting the production branch. Use when you need to apply an urgent fix directly to a production environment without going through the normal development → QA → prod pipeline. The agent may invoke this on its own judgment to prepare a hotfix (branch, fix, commit, push, PR) — merging the PR, which is what actually triggers CI/CD deployment, remains a manual human action.
Arguments
/hotfix-deploy <prod-branch> <description>
Original author description
Full hotfix workflow for deploying urgent fixes to a production branch (coop-production, rh-production, southernlanka-staging, etc.). Covers branch creation, fix, commit, push, and PR targeting the production branch. Use when you need to apply an urgent fix directly to a production environment without going through the normal development → QA → prod pipeline. The agent may invoke this on its own judgment to prepare a hotfix (branch, fix, commit, push, PR) — merging the PR, which is what actually triggers CI/CD deployment, remains a manual human action.
How it works
- Arguments
- Critical Rule
- Step 1 — Stash Any Uncommitted Work
- Step 2 — Create Hotfix Branch from Production
- Step 3 — Apply the Fix
- Step 4 — Pre-Commit Checklist
- Step 5 — Commit
- Step 6 — Push
- Step 7 — Create PR Targeting the Production Branch
- Step 8 — Restore Stashed Work
SKILL.md preview
---
name: hotfix-deploy
description: >
Full hotfix workflow for deploying urgent fixes to a production branch
(coop-production, rh-production, southernlanka-staging, etc.). Covers branch creation,
fix, commit, push, and PR targeting the production branch. Use when you need
to apply an urgent fix directly to a production environment without going
through the normal development → QA → prod pipeline. The agent may invoke
this on its own judgment to prepare a hotfix (branch, fix, commit, push,
PR) — merging the PR, which is what actually triggers CI/CD deployment,
remains a manual human action.
allowed-tools: Bash, Read, Grep, Edit, Write
argument-hint: "<prod-branch> <description>"
---
# Hotfix Deployment Workflow
Deploy an urgent fix directly to a production branch.
## Arguments
- `$0` — Target production branch (e.g., `coop-production`, `rh-production`, `southernlanka-staging`)
- `$1` — Short description of the fix (e.g., `sequence-preallocation`, `critical-billing-fix`)
## Critical Rule
**The branch name MUST end with `-hotfix`.**
CI merge validation will block PRs from branches that do not end with `-hotfix`.
## Step 1 — Stash Any Uncommitted Work
```bash
git stash
```
## Step 2 — Create Hotfix Branch from Production
```bash
git fetch origin
git checkout -b $1-hotfix origin/$0
```
Branch name format: `<description>-hotfix`
Examples:
- `sequence-preallocation-hotfix`
- `critical-billing-fix-hotfix`
- `persistence-tuning-hotfix`
## Step 3 — Apply the Fix
Make only the minimal changes required. Do NOT port unrelated features or refactors.
Before editing `persistence.xml`, compare against the target production branch to understand the current state:
```bash
git show origin/$0:src/main/resources/META-INF/persistence.xml
```
## Step 4 — Pre-Commit Checklist
- [ ] `persistence.xml` uses `${JDBC_DATASOURCE}` / `${JDBC_AUDIT_DATASOURCE}` — not hardcoded JNDI names (e.g., `jdbc/coop`)
- [ ] No credentials or sensitive files staged
- [ ] Changes are minimal — only what is needed for the hotfix
> **Note:** The `persistence.xml` on production branches typically uses `${JDBC_DATASOURCE}` environment variable placeholders, while the local development `persistence.xml` has hardcoded JNDI names (e.g., `jdbc/coop`). Never copy the hardcoded JNDI name into the production branch.
## Step 5 — Commit
```bash
git add <changed-files>
git commit -m "fix: <description of fix>
<Explanation of why this was needed and what it fixes.>
References issues #NNNN.
Co-Authored-By: Codex <noreply@openai.com>"
```
## Step 6 — Push
```bash
git push origin $1-hotfix
```
## Step 7 — Create PR Targeting the Production Branch
```bash
gh pr create \
--title "fix: <description>" \
--base $0 \
--head $1-hotfix \
--body "..."
```
The PR **must** target `$0` (the production branch), not `development` or `master`.
The body is public: state the defect, the fix and the deploy note, and keep the
affected hospital's record counts, production bill numbers, schema names and
data-fix steps out of it. See
[What May Go Into a GitHub Issue, PR, or Comment](../../../developer_docs/git/github-public-content-policy.md).
## Step 8 — Restore Stashed Work
```bash
git checkout <your-previous-branch>
git stash pop
```
## Step 9 — Clean Up Old Branch (Post-Merge)
After the PR is merged:
```bash
git branch -d $1-hotfix
```
## Common Production Branches
| Hospital/Environment | Branch |
|----------------------|----------------|
| COOP pharmacy | `coop-production` |
| COOP inward | `coop-staging` |
| Ruhunu hospital | `rh-production` |
| Southern Lanka (live)| `southernlanka-staging` |
Full map: `developer_docs/deployment/ci-cd-pipeline-overview.md`. CI's `-hotfix`
head check does not yet run for these targets (#24453); follow the naming rule anyway.
## Reference
- [Commit Conventions — Hotfix Branches](../../../developer_docs/git/commit-conventions.md#hotfix-branches)
- [Production Deployment Guide](../hmis.wiki/Deployment/Production-Deployment-Guide.md)
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · hmislk/hmis | 100 | GPL-3.0 |
| hmislk/hmis | 100 | GPL-3.0 |
Database snapshot: 13.11.2026 · package version 3ee0082eaf48 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95tl-hotfix
Emergency hotfix to main: stash/cherry-pick changes, create hotfix branch from main, validate, open PR with auto-merge, restore source branch. Use when: critical production bug, urgent fix to main, hotfix, or the user says "/nacl:tl-hotfix". - 95nacl-tl-hotfix
Emergency hotfix to main: stash/cherry-pick changes, create hotfix branch from main, validate, open PR with auto-merge, restore source branch. Use when: critical production bug, urgent fix to main, hotfix, or the user says "/nacl-tl-hotfix". - 90commit-push-current
Use when a human asks to commit and push, not publish, the checked-out branch, including directly to the default branch, with no branch creation and no pull request. Not for a feature branch off the default: use commit-push-pr in its no-PR mode. - 100hotfix
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. - 90commit-push-current
Use when a human explicitly asks to commit and push to the checked-out branch with no branch creation and no pull request. Not for the default branch: use commit-push-main; not for a pull request: use commit-push-pr. - 100hotfix
Executes a hotfix workflow: creates a hotfix branch, applies the targeted fix, runs verification, and prepares release artifacts. Use when a critical production bug needs immediate patching or when the user mentions hotfix or emergency fix.