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), and git-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 worktrees workflow, git-worktrees and the worktree tool isolate each task’s commits under <devbot_dir>/worktrees/, cut from the remote default branch, leaving the main checkout untouched. create hard-links vendor/node_modules (override with --link) and brings over the runtime state the main checkout has (.kube/.certs symlinked, .env copied); --no-link skips both. remove tears 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-env opts out) — and then deletes the directory. The skill directs builds and tests through a worktree-scoped container so parallel agents never share one. Under branch-fallback-worktrees, start creates the task branch in the main checkout when checkout-state finds it free, and a worktree is created only when it is busy and the user agrees.
  • Releases: git-changelog writes the release file from the branch’s commits; the git-tag skill (with the tag tool) creates and pushes the tag, and the gh-release skill and command (with the release tool) publish the GitHub release. Both tools share the plumbing in git.sh.
  • Inspection: the git-report tool snapshots the repository state before you commit, review, or plan.
  • Force-push: git-force-push is the only route an agent has to one. It refuses unless the project sets workspace.allow_force_push to true, refuses the default branch (main/master by name, any other default read from the resolved push destination), refuses a destination it cannot validate, and always pushes --force-with-lease leased 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, the git ls-remote line the push destination now holds, and the head it names; --silent suppresses 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 a pushInsteadOf makes that destination unknowable; credentials in a URL are redacted from everything it prints.

What git-report reports

  • Repository path (pass it positionally or with --cwd to 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 /worktrees/, or under `branch-fallback-worktrees` start the task branch in the main checkout when it is free.
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 /worktrees, based on the remote default branch; used by the default `worktrees` workflow, and by `branch-fallback-worktrees` when the main checkout is busy

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