Phase guidance for /git — context-aware git shorthand rules, smart push/pull logic, commit message generation, branch management, and PR creation workflow.
From neuroflownpx claudepluginhub stanislavjiricek/neuroflow --plugin neuroflowThis skill uses the workspace's default tool permissions.
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Guides the /git command to read repository state accurately and apply context-aware rules before executing any git action.
Never act blindly. Always read repo state first. The value of /git is that it understands context — so every alias resolves to the right action given the current branch, staged files, commit history, and remote sync status.
Always run all four checks before acting:
git status --short # staged and unstaged changes
git log --oneline -5 # recent commits
git branch --show-current # current branch
git rev-list --count --left-right @{upstream}...HEAD 2>/dev/null # ahead/behind remote
Parse the output to determine:
| Signal | Meaning |
|---|---|
M (staged modified) or A (staged add) in git status | Has staged changes |
M or ?? in git status | Has unstaged or untracked changes |
Right count > 0 from rev-list | Has unpushed commits |
Left count > 0 from rev-list | Is behind remote |
Branch is main or master | Warn before any write operation |
fatal: or no upstream from rev-list | No upstream tracking branch set — skip push/pull and inform the user to run git push --set-upstream origin <branch> first |
/git p)| Condition | Action |
|---|---|
| Unpushed commits AND not behind remote | Push |
| Behind remote AND no unpushed commits | Pull |
| Unpushed commits AND behind remote | Warn — ask user: push first or pull & rebase? |
| Neither ahead nor behind | Report: "Branch is in sync with remote." |
When generating a commit message (/git c, /git ac, /git acp):
git diff --cached --stat to see which files changed and how many lines.git diff --cached (first 200 lines is enough) to read actual changes.feat: for new functionalityfix: for bug fixesdocs: for documentation only changesrefactor: for refactoring without feature/fixchore: for build, config, or tooling changes/git b)Present this menu:
git checkout -b <name>)git checkout <name>)Branch naming guidance to offer if creating a new branch:
feat/<short-description> for new featuresfix/<short-description> for bug fixesdocs/<short-description> for documentationchore/<short-description> for maintenance/git pr)feat/, fix/, etc.)feat: <title>git log main..HEAD --oneline (or master..HEAD) to list commitsgh CLI availability (which gh):
gh pr create --title "..." --body "..."add, commit, or push, show a yellow warning:
"⚠️ You are on the
mainbranch. Did you mean to work on a feature branch?" Ask before proceeding.
git checkout -b <name>"UU or AA in git status): surface the conflicted files and say:
"Merge conflicts detected in: [files]. Resolve those before committing."
git remote add origin <url>."git stash before pulling.Be brief and direct. This is a utility command — the user wants fast feedback and fast execution. Use short status lines, not paragraphs. Only explain when something is ambiguous or risky.