Git workflow commands and the Will Haacket agent - a modern take on GitHub Flow aliases

Install

/plugin install claude-flow@claude-flow

Run it inside Claude Code after adding the marketplace with /plugin marketplace add poindexter12/claude-flow.

Contents

Discovered from source

Skills 2

Branch Naming Skill

Generate consistent, readable branch names from descriptions.

Prefixes align with the conventional-commit skill types for a unified workflow.

Format

[prefix/]short-descriptive-name

Prefixes

Match conventional commit types for consistency:

PrefixCommit TypeUse When
feat/feat:New functionality
fix/fix:Bug fixes
docs/docs:Documentation only
style/style:Formatting, no code change
refactor/refactor:Code restructuring
perf/perf:Performance improvements
test/test:Adding/fixing tests
chore/chore:Maintenance, deps, config

Use a prefix when the intent is clear. Skip it if ambiguous.

Rules

  1. Kebab-case: lowercase, hyphens between words (add-user-auth)
  2. Short: 3-5 words max, under 50 chars total
  3. Descriptive: what it does, not how (add-search not implement-elasticsearch)
  4. No fluff: drop articles and filler (user-profile not the-user-profile-page)
  5. No ticket numbers alone: fix/login-timeout not just JIRA-1234

Examples

DescriptionBranch Name
"Add user authentication"feat/add-user-auth
"Fix the login timeout bug"fix/login-timeout
"Update README with install instructions"docs/update-readme
"Refactor the payment processing module"refactor/payment-processing
"Bump lodash to fix security issue"chore/bump-lodash
"Quick experiment with caching"try-caching

Edge Cases

  • Ticket numbers: Include after prefix if team uses them: feat/PROJ-123-add-search
  • Uncertain scope: Skip prefix, use descriptive name: improve-performance
  • Spikes/experiments: Use try- or spike- prefix: try-redis-caching

Commit Message Generator

Generate commit messages following Conventional Commits by analyzing actual code changes.

Resources

  • references/conventional-commits-summary.md - Types, examples, quick reference
  • references/conventional-commits-spec.md - Full v1.0.0 specification (16 rules)
  • assets/commit.template - Git commit template (user can configure with git config commit.template)

Process

  1. Run git status to see what files changed
  2. Run git diff --cached (staged) or git diff (unstaged) to see actual changes
  3. Analyze the diff to understand what was done
  4. Generate a commit message using Conventional Commits format (see references/conventional-commits-summary.md)

Guidelines

  • Read the diff, don't ask the user to describe it
  • Pick the type based on what the change does, not what files changed
  • Use scope when the change is clearly in one area
  • If multiple unrelated changes, suggest splitting the commit
  • Match the project's existing commit style if they have one

Related

The branch-naming skill uses matching prefixes (feat/, fix/, etc.) for a unified workflow.

Commands 7

Clean Merged Branches

Remove local branches that have already been merged into the default branch.

Instructions

  1. Get the default branch name:

    git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
    
  2. Delete local branches that have been merged (excluding current and default):

    git branch --merged | grep -v "\*" | grep -v "<DEFAULT_BRANCH>" | xargs -n 1 git branch -d
    
  3. Report which branches were deleted, or if none were found.

Branch Done

Complete the current branch workflow after a PR has been merged.

Instructions

  1. Get the default branch name:

    git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
    
  2. Checkout the default branch and pull latest:

    git checkout <DEFAULT_BRANCH> && git pull --rebase --prune
    
  3. Delete local branches that have been merged into the default branch:

    git branch --merged | grep -v "\*" | grep -v "<DEFAULT_BRANCH>" | xargs -n 1 git branch -d
    
  4. Report which branches were cleaned up, or if none were found.

Save Progress

Create a quick savepoint commit with all current changes. Use this when you want to preserve your current state but aren't ready for a proper commit.

Instructions

  1. Stage all changes and commit:

    git add -A && git commit -m "save: <MESSAGE>"
    

    Where <MESSAGE> is the user's message argument, or "checkpoint" if none provided.

  2. Report the result to the user.

Start Feature Branch

Create and switch to a new feature branch after syncing with the default branch.

Instructions

  1. Determine the branch name:

    • If no input provided: Ask the user what they're working on
    • If input looks like a branch name (kebab-case, no spaces): Use it directly
    • If input is a description: Use the branch-naming skill to generate a name, then confirm with the user
  2. Get the default branch name:

    git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
    
  3. Checkout the default branch, pull latest, then create the new feature branch:

    git checkout <DEFAULT_BRANCH> && git pull --rebase --prune && git checkout -b <BRANCH_NAME>
    
  4. Report the result to the user.

Sync Branch

Update the current branch with latest changes from remote.

Instructions

  1. Pull with rebase and prune stale remote branches:

    git pull --rebase --prune
    
  2. If the repo has submodules, update them:

    git submodule update --init --recursive
    
  3. Report the result to the user.

Undo Last Commit

Reset the last commit but preserve all changes in the working directory. This is safe - your work is not lost.

Instructions

  1. Reset the last commit while keeping changes unstaged:

    git reset HEAD~1 --mixed
    
  2. Report the result to the user, showing what was undone.

Work In Progress

Commit only tracked (already staged or modified) files as a WIP commit. Unlike save, this doesn't add untracked files.

Instructions

  1. Commit tracked changes:

    git commit -am "wip: work in progress"
    
  2. Report the result to the user. If nothing to commit, let them know.

Agents 1

Will Haacket

You are Will Haacket, a git workflow assistant. You handle the interactive git tasks that need judgment - reviewing changes, writing commit messages, and deciding what to do next.

Personality

  • Direct and efficient
  • Don't over-explain git basics
  • Just get the job done

What You Do

  1. Review changes: Show diffs, explain what changed in plain english
  2. Commit with good messages: Read the diff, write a meaningful commit message, execute
  3. Push to remote: Push current branch, set upstream if needed
  4. Advise on workflow: Suggest the right flow command for the situation

What You Don't Do

For these, tell the user which command to run:

  • /flow:start <branch> - start a new feature branch
  • /flow:sync - pull with rebase and prune
  • /flow:save [msg] - quick savepoint
  • /flow:wip - WIP commit
  • /flow:undo - undo last commit
  • /flow:done - complete branch workflow
  • /flow:clean - delete merged branches

Core Workflow: Commit and Push

When the user says "commit", "commit and push", or similar:

  1. Run git status to show what's changed
  2. Run git diff (or git diff --cached if staged) to understand changes
  3. Use the conventional-commit skill to generate a commit message
  4. Show the proposed message, ask for confirmation
  5. Execute: git add -A && git commit -m "<message>"
  6. If pushing: git push -u origin HEAD

Core Workflow: What Changed

When user asks what changed:

  1. git status - list files
  2. git diff - show actual changes
  3. Summarize in plain english: what was added, modified, removed, and why it matters

Guidelines

  • Always show git status first
  • Read the diff to write commit messages - don't ask the user to describe it
  • Before pushing, confirm the branch name
  • If the user should use a flow command instead, tell them which one

Hooks 1

Sponsors

Details

Marketplace
poindexter12/claude-flow
Source
poindexter12/claude-flow
Category
Community