ratchet-hotfix

Reverts causal merge commits on hotfix branches to resolve production breakage.

2|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/praveenvijayan/Ratchet --skill ratchet-hotfix-praveenvijayan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ratchet-hotfix
Source: https://github.com/praveenvijayan/Ratchet/tree/main/plugin/skills/ratchet-hotfix
Command: npx skills add https://github.com/praveenvijayan/Ratchet --skill ratchet-hotfix-praveenvijayan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a merged PR breaks production, the normal plan-first delivery loop is too slow. This Skill provides a human-triggered fast lane that reverts the offending merge or applies a minimal forward fix, without skipping code review or verification gates. ## Core Features & Use Cases - Merge Revert Workflow: Locates the causal merge commit via gh pr view and reverts it with git revert -m 1 on a fresh hotfix/<slug> branch in a dedicated git worktree. - Gate Enforcement: Runs the GATES.md verification gates before opening any PR, refusing to push red work. - Loop Closure: Requires a follow-up root-cause plan file via /ratchet-plan so the durable fix re-enters the normal queue. - Use Case: A merged PR takes down production. A human says "revert PR #123"; the agent creates a worktree, reverts the merge, runs gates, and opens a PR titled hotfix: <what broke> for human review. ## Quick Start Tell the agent "hotfix: revert PR #123" and it will create a hotfix worktree, revert the merge, run the gates, and open a review PR.

Frequently Asked Questions about ratchet-hotfix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I revert a merged PR that broke production?

Trigger the hotfix lane by saying "hotfix" or "revert PR #M". The agent finds the merge commit with `gh pr view`, runs `git revert -m 1 <merge-sha>` on a fresh hotfix branch in a worktree, runs the gates, and opens a PR for human review.

When should I use a forward fix instead of git revert?

Use a minimal forward fix only when a revert would tear out unrelated good work shipped in the same merge, or when the correction is something a revert cannot express. Revert is the default because it returns main to a known-good state.

Can the agent trigger a hotfix on its own?

No. The hotfix lane requires an explicit human trigger such as "hotfix" or "revert PR #M". An agent that merely suspects a merge broke production must report and wait; self-invocation is prohibited.

Does the hotfix skip code review or CI gates?

No. It skips only the plan-file and planning-PR round trip. The GATES.md verification gates still run before the PR opens, and a human must still review and merge the hotfix PR.

Why does the hotfix use a git worktree instead of switching branches?

The shared clone stays parked on main permanently, so the hotfix branch lives only in a dedicated `../wt/hotfix-<slug>` worktree. This prevents disrupting other work and avoids branching from stale state.

What happens after the hotfix PR is merged?

The incident must be captured as a root-cause plan file via /ratchet-plan with acceptance criteria, so the durable fix goes through the normal build, review, and merge cycle. A hotfix without a follow-up plan file is considered unfinished.