/ratchet-github:git-commit-checklistfrom ratchet-github
Use before every git commit, before a rebase, reset, or force push of a branch another person or agent may push to, when a rebase or merge conflicts in a lockfile, a generated file, or source, when a stacked branch's base has merged, and when git fails on a .lock file. Check scope, staged content, and message, resolve conflicts without taking a side, and force-push or clear a lock safely.
Ships in ratchet-github. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read every applicable AGENTS.md first. Repository-local policy overrides these defaults. It
owns the commit format, required trailers, file-size limits, and which checks to run.
git status and the complete diff. Stage only the files that implement the task. Name
them; git add -A also stages whatever else is in the tree.Do not amend or rewrite a commit someone else made unless they asked for it.
A branch that someone else can push to may have moved. A bare --force-with-lease compares
against the tracking ref, and any later fetch moves that ref, including a background fetch by an
editor. The push then overwrites commits you never read.
Fetch once, read what arrived, capture the remote tip before any rewrite, and push against that value:
git fetch origin main my-branch
sha=$(git rev-parse origin/my-branch)
old_head=$(git rev-parse HEAD)
# rebase or other rewrite
git diff $old_head HEAD # read every hunk; see below
git push --force-with-lease=my-branch:$sha origin my-branch
Name the remote and the branch in the push, so a configured push remote cannot change where it goes.
Before the force push, run git diff $old_head HEAD: the local head from before the rewrite,
not the remote tip, which lacks unpushed commits. git range-diff alone does not do, because
it skips merge commits. Read the content, not only --stat, and account for every hunk that
changed without being meant to. A rebase without --rebase-merges drops whatever lived only in a merge commit,
such as a resolution or a new file, and nothing fails at push time.
If the push is rejected, fetch and read the new commits. Do not retry with --force.
Do not commit or push with --no-verify. A hook that fails is reporting something; fix it, or
say which hook is broken and ask. A slow hook is not a reason either, also when the person
offers to skip it: say what the hook checks, leave it running, and do not hand over the flag
as their call.
Resolve every conflicted hunk by hand. Read both sides and the base (git diff <file>, or
git show :1:<file>, :2: and :3:), then edit the file to what both changes intend. Do not
settle it by taking one side: not with git checkout --ours or --theirs, git restore --ours
or --theirs, a merge with -X ours, -X theirs, or -s ours, nor by copying either version
over the file. This holds even when one side looks right in full. A whole side also drops the
other side's changes to that file, and only reading each hunk shows that nothing was lost.
git status, not only the UU files. A merge can bring back a file the branch
deleted, or stage a change no conflict flagged. Each needs the same reading.git diff --check no longer sees it; use git diff --cached --check.git commit --no-edit keeps git's # Conflicts:
list in the message.Read a stacked branch after its base merges when the pull request a branch was stacked on has merged, above all by squash.
A lockfile, generated code (an API client, schema types, protobuf stubs), and a generated project
file are each the output of a tool. When a rebase or merge conflicts in one, do not edit its
hunks by hand, and do not settle the conflict by taking one side with git checkout --ours or
--theirs and committing that. One side alone drops what the other side added, and a hand-merged
file is output no run of the tool produced.
package.json), schema, or specification.
Keep both sides' changes; where they contradict, such as a removal against a bump, find which
one was intended.AGENTS.md. If you cannot find it, ask; do
not fall back to editing the output.git add the inputs and the output, and continue the rebase or merge. A
rebase of several commits can stop on the same file again; regenerate at each stop.A lockfile needs more care, because it also records choices that are not in the manifest: regenerating it from nothing moves every dependency to its newest allowed version.
pnpm install --no-frozen-lockfile. pnpm merges both sides. If that install fails on the
markers, take the next step.This holds for a dependency-update pull request and for any other branch.
Read rebase and lease push before rebasing a branch whose remote may hold commits you do not have. It says how to compare the two sides and what to do in each case.
Read a checkout that worktrees share when git fails on a
.lock file, and before a command that writes .git/config in a checkout other worktrees use.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jongleberry/ratchet-stack --plugin ratchet-githubOther plugins' skills for the same job
11 skills in this plugin
/dependabotUse when writing or reviewing dependabot.yml or a workflow that runs on Dependabot pull requests, when asked to trigger, re-run, or force a Dependabot run, or when a Dependabot pull request has a conflict, a stale lockfile, or a failing bump. Configures coverage, grouping, cooldowns, and secrets, starts an update check on demand, and repairs a Dependabot pull request./github-actions-authoringUse when writing, editing, or reviewing a GitHub Actions workflow such as ci.yml, or a composite action, or when asked to add or change a job, a matrix, test shards, triggers, or a concurrency block. Design GitHub Actions workflows that react to events instead of polling, and check triggers, concurrency, timeouts, runners, pins, and job size./