agentleFS
mrzhangguoguomrzhangguoguo/oh-my-workbuddy/skills/git-master/SKILL.md

git-master

Skill2 starsChanged 5 months agoMITView on GitHub

Git expert for atomic commits, interactive rebasing, branch management, and history cleanup. Trigger "git rebase", "atomic commits", "clean git history", "squash commits", "branch strategy".

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Branch management: create/rename/delete, branch-point detection, divergence check.

    line 32
  2. Distinctive:

    Style detection: read the repo's existing commit history to match its convention before writing new commits.

    line 34
  3. Distinctive:

    Assess the working tree: Run read-only checks first:

    line 39
  4. Very specific:

    Prefer --autosquash when queuing fixups.

    line 54
  5. Distinctive:

    Write messages that match the detected style.

    line 57
  6. Distinctive:

    Verify: After the operation:

    line 60
  7. Distinctive:

    Never rewrite history that has already been pushed to a shared branch without explicit user confirmation.

    line 70
  8. Distinctive:

    Always check git status and git log before mutating.

    line 72
  9. Distinctive:

    If unsure about intent, ask the user rather than guessing.

    line 75
  10. Very specific:

    When the git task is part of a larger flow (e.g.

    line 79

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ported from oh-my-codex git-master. OMX runtime conventions ($macro invocation, omx CLI, .omx/ state directory) are replaced with WorkBuddy idioms (Skill tool, Agent tool, task list, .workbuddy/memory).

Git Master

Git operations expert. Use this skill whenever the user needs precise, safe git work: atomic commits, interactive rebasing, branch management, history cleanup, or style-consistent commit messages.

Usage

Invoke the git-master skill and describe the git task, e.g.: "rebase my feature branch onto main", "squash these 5 commits", "write a conventional commit for these changes".

Capabilities

  • Atomic commits with conventional-commit format (feat:, fix:, refactor:, docs:, test:, chore:).
  • Interactive rebasing (rebase -i) for reordering, squashing, fixing up.
  • Branch management: create/rename/delete, branch-point detection, divergence check.
  • History cleanup: prune stray commits, rewrite messages, split/join commits.
  • Style detection: read the repo's existing commit history to match its convention before writing new commits.

Workflow

  1. Assess the working tree. Run read-only checks first:
    git status
    git log --oneline -10
    git diff --stat
    Detect the repo's commit style from recent history before composing messages.
  2. Plan the operation. For anything destructive (rebase, reset, branch delete, amend of already-pushed commits), use the task list (TaskCreate) to outline steps, and surface a short plan to the user. If the operation rewrites shared/pushed history, ask for explicit confirmation before proceeding (use AskUserQuestion for a clean yes/no).
  3. Execute safely.
    • Prefer --autosquash when queuing fixups.
    • For atomic commits, stage narrowly: git add -p or stage specific paths rather than git add -A.
    • Write messages that match the detected style; default to Conventional Commits when the repo has no clear convention.
  4. Verify. After the operation:
    git status
    git log --oneline -5
    Confirm the tree matches intent and there are no leftover staged/unstaged changes unless expected.

Safety rules

  • Never rewrite history that has already been pushed to a shared branch without explicit user confirmation.
  • Always check git status and git log before mutating.
  • For large/risky history rewrites, suggest creating a backup branch first (git branch backup/<name>).
  • If unsure about intent, ask the user rather than guessing.

Handoff

When the git task is part of a larger flow (e.g. a ralph/ultrawork loop or a PR prep), record the resulting commit range and branch state in the task list and/or append a short note to .workbuddy/memory/YYYY-MM-DD.md so downstream steps can pick up where this left off.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.