Git
Git workflow skills and tools — commit craft, history surgery, release notes, and a git-state report.
2 commands · 10 skills · 6 tools
Everything an agent needs to make safe, reviewable commits — and to inspect or repair history when it goes wrong.
What it does
- Commit craft:
git-commits(subject form and the Problems/Solutions body),git-conventional-commits(the type/scope taxonomy),git-atomic-commits(one logical change per commit, staged file by file), andgit-fixup-commits(correcting an earlier commit on the branch). - History surgery:
git-advanced-operations— partial staging, splitting a commit already made, and reflog recovery. - Worktrees: when the project follows the
worktreesworkflow,git-worktreesand theworktreetool isolate each task’s commits under<devbot_dir>/worktrees/, cut from the remote default branch, leaving the main checkout untouched.createhard-linksvendor/node_modules(override with--link) and brings over the runtime state the main checkout has (.kube/.certssymlinked,.envcopied);--no-linkskips both.removetears down the compose environment booted for the worktree — containers found from both of compose’s labels, then the volumes and networks those containers were attached to, keeping anything else wearing the project label (--keep-envopts out) — and then deletes the directory. The skill directs builds and tests through a worktree-scoped container so parallel agents never share one. Underbranch-fallback-worktrees,startcreates the task branch in the main checkout whencheckout-statefinds it free, and a worktree is created only when it is busy and the user agrees. - Releases:
git-changelogwrites the release file from the branch’s commits; thegit-tagskill (with thetagtool) creates and pushes the tag, and thegh-releaseskill and command (with thereleasetool) publish the GitHub release. Both tools share the plumbing ingit.sh. - Inspection: the
git-reporttool snapshots the repository state before you commit, review, or plan. - Force-push:
git-force-pushis the only route an agent has to one. It refuses unless the project setsworkspace.allow_force_pushtotrue, refuses the default branch (main/masterby name, any other default read from the resolved push destination), refuses a destination it cannot validate, and always pushes--force-with-leaseleased to the head the caller captured — never a bare--force. The shell guards keep blocking a hand-typed force-push,+<src>:<dst>included, so the tool is the route rather than a loophole. A successful push reports the branch and remote, thegit ls-remoteline the push destination now holds, and the head it names;--silentsuppresses that report and nothing else, so failures still print on stderr. A remote named by URL is validated at the destination git rewrites it to, and refused when apushInsteadOfmakes that destination unknowable; credentials in a URL are redacted from everything it prints.
What git-report reports
- Repository path (pass it positionally or with
--cwdto inspect a sibling repo or linked worktree) - Current branch and default remote branch
- Recent commit history
- Working-tree status (modified, staged, untracked)
- Staged diff (summary + full)
- Commits ahead of
origin/HEAD - Index integrity check (
git fsck)
How agents use it
The git-report tool primes new sessions with the current git state (the explore module’s gather-context skill calls it), and the commit skills run at the end of every task, before the commit is written.
Contents
| Type | Name | Purpose |
|---|---|---|
| Command | commit |
Commit the current changeset |
| Command | gh-release |
Make a GitHub release — tag the current branch, push it, and publish the release after showing you the plan |
| Skill | gh-release |
Use when making or publishing a GitHub release. Triggers on ‘make a release’, ‘create a release’, ‘publish the release’. |
| Skill | git-advanced-operations |
Use when staging part of a file, splitting a made commit, or recovering lost history. Triggers on ‘git add -p’, ‘undo this’, ‘I lost a commit’, ‘reorder commits’. |
| Skill | git-atomic-commits |
Use when splitting accumulated changes into commits. Triggers on ‘commit my changes’, ‘split this up’, ‘make atomic commits’, ‘clean up before the PR’. |
| Skill | git-changelog |
Use when a release or tag is being cut. Triggers on ‘release notes’, ‘the changelog’, ‘sum up what changed’. |
| Skill | git-commits |
Load at session start in every project under git. Use when making a commit or wording its message. |
| Skill | git-conventional-commits |
Use when writing or reviewing a commit message. Triggers on ‘what type is this’, ‘scope’, ‘breaking change’, ‘how should I word this commit’. |
| Skill | git-fixup-commits |
Use when correcting a commit unique to the branch. Triggers on ‘fixup’, ‘squash this into’, ‘autosquash’, ‘amend an earlier commit’. |
| Skill | git-report |
Use when you need the git state before committing, reviewing, or planning. Triggers on ‘git status’, ‘what changed’, ‘current branch’. |
| Skill | git-tag |
Use when creating a git tag or cutting a git-side release. Triggers on ‘create a tag’, ‘tag this release’, ‘cut a tag’. |
| Skill | git-worktrees |
Under the worktrees workflow (the default) or branch-fallback-worktrees: use when you are about to make changes you will commit and are not already inside a linked git worktree — before editing, isolate the work in a worktree under |
| Tool | git-commit |
— |
| Tool | git-force-push |
— |
| Tool | git-report |
— |
| Tool | release |
— |
| Tool | tag |
— |
| Tool | worktree |
Isolate a task’s commits in a linked git worktree under |
Configuration
workflow (string, default worktrees) — selects how a task is carried end to end. worktrees isolates each task in a linked worktree and carries it to a pull request; branch-fallback-worktrees carries it to a pull request from a branch in the main checkout, falling back to a worktree only when the main checkout is busy; trunk works on the default branch and stops before the push. A config not yet migrated still honours its retired worktrees value (true → worktrees, false → trunk). Project config overrides global. See Configuration.
allow_force_push (boolean, default false) — unlocks the git-force-push tool for the project. It
has no effect on the shell guards, which keep blocking a hand-typed force-push, and none on the
default-branch refusal. See Configuration.
See also
- Polyrepo sessions — how this module scopes itself to the owning project
- Explore — gather-context skill
- Configuration — commit and branch settings