agentleFS
DeanThompsonDeanThompson/agent-skills/skills/git-workflow/SKILL.md

git-workflow

Skill1 starsChanged 6 months agoMITView on GitHub

Use when the user wants Git workflow help around committing, rebasing, creating linked worktrees, bootstrapping a worktree environment, or cleaning up branches/worktrees. Covers smart conventional commits, grouping changes into focused commits, safe rebases, linked worktree setup under .worktrees, optional environment reuse through symlinks, branch cleanup, and safe local branch deletion without destructive reset operations.

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use squad-commands, ci-cd-pipelines and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Microsoft AzureSkill

    squad-commands

    Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.

    Also in 5 projects that use this

  • harrissohail6Skill

    ci-cd-pipelines

    CI/CD pipeline design and implementation. Auto-activates when discussing deployment, automation, or pipelines.

    Also in 6 projects that use this

  • Microsoft AzureSkill

    architectural-proposals

    How to write comprehensive architectural proposals that drive alignment before code is written

    Also in 4 projects that use this

  • GitHubSkill

    e2e-template-testing

    End-to-end validation of coordinator and agent template changes

    Also in 3 projects that use this

  • GitHubSkill

    notification-routing

    Route agent notifications to specific channels by type — prevent alert fatigue from single-channel flooding

    Also in 3 projects that use this

  • frostneySkill

    native-nostalgia-stack

    Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.

    Also in 3 projects that use this

  • +5 more from Azure
  • +1 more from github

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. 0 are common, 17 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 165 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill for three common Git tasks:

    line 14
  2. Distinctive:

    Use this when the user asks to commit changes, create a good commit message, or split changes into multiple commits.

    line 23
  3. Distinctive:

    Read references/git-commit.md and follow it.

    line 25
  4. Distinctive:

    Prefer several focused commits over one large mixed commit.

    line 30
  5. Distinctive:

    If hooks modify files or fail, re-check status, re-add files, and retry.

    line 32
  6. Very specific:

    Use this when the user asks to clean up a branch, remove a worktree, return to develop/main, or delete a finished local branch.

    line 36
  7. Distinctive:

    Read references/git-cleanup.md and follow it.

    line 38
  8. Distinctive:

    Stop if there are uncommitted changes.

    line 43
  9. Distinctive:

    Never delete the target branch.

    line 44
  10. Distinctive:

    Only delete local branches.

    line 45
  11. Distinctive:

    Never use destructive reset or checkout operations.

    line 46
  12. Very specific:

    Use this when the user asks to create a linked worktree, start feature work away from main/develop, or bootstrap a worktree environment.

    line 50
  13. Distinctive:

    Read references/git-worktree.md and follow it.

    line 52
  14. Very specific:

    Prefer linked worktrees under the repository root at .worktrees/<branch-slug>.

    line 57
  15. Very specific:

    Prefer creating a feature branch from the requested base branch rather than editing directly on main or develop.

    line 58
  16. Distinctive:

    Never overwrite existing non-symlink files while bootstrapping.

    line 61
  17. Very specific:

    Use this when the user asks to rebase the current branch onto develop/main, sync a feature branch with the latest base branch, or rewrite …

    line 65
  18. Distinctive:

    Read references/git-rebase.md and follow it.

    line 67
  19. Distinctive:

    Stop if there are uncommitted changes unless the user explicitly asked for a stash-based flow.

    line 72
  20. Distinctive:

    Prefer git fetch --prune before rebasing onto the latest remote-tracking target branch.

    line 73
  21. Distinctive:

    Default to safe non-interactive rebase.

    line 74
  22. Distinctive:

    If conflicts occur, report the conflicted files and current rebase state clearly.

    line 75

“Common” is measured: kept by at least 6 in 10 of the 165 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

Git Workflow

Use this skill for three common Git tasks:

  1. Smart commits for current changes
  2. Rebase of the current branch onto a base branch
  3. Linked worktree creation and environment bootstrap
  4. Cleanup of a finished branch or linked worktree

Commit Workflow

Use this when the user asks to commit changes, create a good commit message, or split changes into multiple commits.

Read references/git-commit.md and follow it.

Key expectations:

  • Analyze actual current changes before naming commits.
  • Prefer several focused commits over one large mixed commit.
  • Use Conventional Commits.
  • If hooks modify files or fail, re-check status, re-add files, and retry.

Cleanup Workflow

Use this when the user asks to clean up a branch, remove a worktree, return to develop/main, or delete a finished local branch.

Read references/git-cleanup.md and follow it.

Key expectations:

  • Inspect whether the current directory is a normal worktree or linked worktree.
  • Stop if there are uncommitted changes.
  • Never delete the target branch.
  • Only delete local branches; do not delete remotes.
  • Never use destructive reset or checkout operations.

Worktree Workflow

Use this when the user asks to create a linked worktree, start feature work away from main/develop, or bootstrap a worktree environment.

Read references/git-worktree.md and follow it.

Key expectations:

  • Confirm the repository root, current branch, linked-worktree status, and uncommitted changes before creating or entering a worktree.
  • Prefer linked worktrees under the repository root at .worktrees/<branch-slug>.
  • Prefer creating a feature branch from the requested base branch rather than editing directly on main or develop.
  • Offer environment reuse by symlinking common local-only assets from the main worktree.
  • Respect a no-reuse option when the user wants isolation or the project cannot safely share dependencies.
  • Never overwrite existing non-symlink files while bootstrapping.

Rebase Workflow

Use this when the user asks to rebase the current branch onto develop/main, sync a feature branch with the latest base branch, or rewrite branch history in a simple linear way.

Read references/git-rebase.md and follow it.

Key expectations:

  • Inspect the current branch, target branch, and working tree state before rebasing.
  • Stop if there are uncommitted changes unless the user explicitly asked for a stash-based flow.
  • Prefer git fetch --prune before rebasing onto the latest remote-tracking target branch.
  • Default to safe non-interactive rebase; only use interactive rebase when the user explicitly asks for it.
  • If conflicts occur, report the conflicted files and current rebase state clearly.

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.