skills/phase-git/SKILL.md
Phase guidance for /git — context-aware git shorthand rules, smart push/pull logic, commit message generation, branch management, and PR creation workflow.
npx skillsauth add stanislavjiricek/neuroflow phase-gitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Alias scope is final. Each alias has a defined endpoint — never go beyond it, even if more work seems logical:
| Alias | Endpoint | Never do after |
|-------|----------|----------------|
| a | stage | commit, push |
| c | commit | push, fetch, merge |
| ac | commit | fetch, pull, merge, push |
| acp | push | PR creation, branch ops |
| p | push or pull | merge, rebase (unless user chose rebase) |
| b | branch op | commit, push |
Seeing unpushed commits after /git ac is not a reason to push. The user chose ac, not acp.
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.
testing
This skill should be used whenever the user mentions BIDS, Brain Imaging Data Structure, BIDS conversion, BIDS validation, BIDS compliance, organizing neuroimaging data, dataset_description.json, participants.tsv, bids-validator, pybids, MNE-BIDS, or asks how to structure EEG/MEG/fMRI/iEEG/PET/DWI data for sharing or preprocessing. Also invoke when the user asks how to name scan files, what sidecar JSON fields are needed, how to set up derivatives/, or how to run fMRIPrep/MRIQC on their dataset. Invoke proactively during /data, /data-preprocess, and /data-analyze phases whenever the dataset structure is relevant to the task at hand.
tools
Phase guidance for the /meeting command. Covers meeting file structure, recurring templates, attendee resolution from profiles, Google Calendar MCP integration, agenda preparation with project context, and action-item-to-task conversion at all three levels (project, flowie, hive).
data-ai
Worker-critic agentic loop protocol — orchestrator coordinates a worker agent and a critic agent across up to 3 revision cycles to produce a vetted output for any phase.
development
Knowledge base skill — Karpathy-style LLM-maintained wiki at three levels (personal/flowie, project, team/hive). Handles ingest, query, lint, schema, and project-tagging workflows. Invoked by /flowie --wiki-* (personal), /wiki (project), /hive --wiki-* (team).