skills/mav-git-workflow/SKILL.md
Git branching strategy, commit conventions, merge conflict handling, and branch lifecycle. Implements a simplified Gitflow with protected branches and conventional commits.
npx skillsauth add thermiteau/maverick-private mav-git-workflowInstall 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.
A simplified Gitflow strategy for all development work. This skill defines how branches, commits, and merges are managed.
main (production — never touched directly)
└── develop (integration branch — never committed to directly)
├── feat/42-add-export
├── fix/57-login-crash
└── chore/63-update-deps
| Branch | Purpose | Who commits | Protected |
|---|---|---|---|
| main | Production releases | Merge from develop only (human-gated) | Yes |
| develop | Integration branch | Merge from feature/fix branches via PR only | Yes |
| Feature/fix branches | Active development | Claude Code and developers | No |
main or develop. All changes reach these branches via pull request.develop.Format: <type>/<issue-number>-<short-description>
Infer from issue labels, title, or the nature of the work:
| Label or keyword | Branch prefix |
|---|---|
| bug, fix, defect | fix/ |
| feature, enhancement | feat/ |
| docs, documentation | docs/ |
| refactor, tech-debt | refactor/ |
| chore, maintenance, deps | chore/ |
| test, testing | test/ |
| Default (when unclear) | feat/ |
Good: feat/42-add-rubric-export, fix/57-prevent-login-crash
Bad: feature/issue-42-implement-the-new-rubric-export-feature-for-teachers
digraph branch {
"Identify base branch" [shape=box];
"Pull latest" [shape=box];
"Derive branch name" [shape=box];
"Create branch" [shape=box];
"Verify clean state" [shape=diamond];
"Stash or commit first" [shape=box];
"Identify base branch" -> "Pull latest";
"Pull latest" -> "Verify clean state";
"Verify clean state" -> "Derive branch name" [label="clean"];
"Verify clean state" -> "Stash or commit first" [label="uncommitted changes"];
"Stash or commit first" -> "Derive branch name";
"Derive branch name" -> "Create branch";
}
The base branch is typically develop. To confirm, check:
# Check default branch
gh repo view --json defaultBranchRef -q '.defaultBranchRef.name'
# Check if develop exists
git branch -r | grep -q 'origin/develop'
develop exists — branch from developmain exists — branch from maingit checkout $BASE_BRANCH && git pull origin $BASE_BRANCH && git checkout -b $BRANCH_NAME
All commits must follow the Conventional Commits specification.
<type>(<optional scope>): <description> (#<issue-number>)
| Type | When to use |
|---|---|
| feat | New feature or functionality |
| fix | Bug fix |
| docs | Documentation only |
| refactor | Code change that neither fixes a bug nor adds a feature |
| test | Adding or updating tests |
| chore | Build process, dependencies, tooling |
| style | Formatting, whitespace (no logic change) |
| perf | Performance improvement |
| ci | CI/CD configuration changes |
(#42)feat: add rubric export endpoint (#42)
fix: prevent crash when rubric is empty (#57)
test: add integration tests for grading service (#42)
refactor: extract token cost calculation into utility (#63)
chore: update vitest to v3.1 (#71)
For commits that need more context:
feat: add rubric export endpoint (#42)
Adds a new GET /api/assessments/:id/export endpoint that returns
the assessment rubric as a downloadable CSV file. Includes proper
content-type headers and filename disposition.
digraph conflicts {
"Conflict detected?" [shape=diamond];
"Trivial conflict?" [shape=diamond];
"Auto-generated files only?" [shape=diamond];
"Resolve automatically" [shape=box];
"Flag for human intervention" [shape=box];
"Continue working" [shape=box];
"Conflict detected?" -> "Trivial conflict?" [label="yes"];
"Conflict detected?" -> "Continue working" [label="no"];
"Trivial conflict?" -> "Auto-generated files only?" [label="yes"];
"Trivial conflict?" -> "Flag for human intervention" [label="no"];
"Auto-generated files only?" -> "Resolve automatically" [label="yes — lock files, generated code"];
"Auto-generated files only?" -> "Flag for human intervention" [label="no"];
"Resolve automatically" -> "Continue working";
}
Only resolve conflicts in auto-generated files where the resolution is unambiguous:
package-lock.json, pnpm-lock.yaml, yarn.lock) — regenerate with pnpm install / npm installFlag all other conflicts for human review. Report clearly:
# Show conflicting files
git diff --name-only --diff-filter=U
# Show the conflict markers in a specific file
git diff -- path/to/file.ts
Never:
After a pull request is merged, clean up the feature branch.
# Switch back to the base branch
git checkout $BASE_BRANCH && git pull origin $BASE_BRANCH
# Delete the local feature branch
git branch -d $BRANCH_NAME
Use -d (not -D) — this will refuse to delete if the branch has unmerged changes, which is a safety check.
GitHub can be configured to auto-delete branches after PR merge. If not:
git push origin --delete $BRANCH_NAME
For cleaning up stale local branches that have been merged:
# List merged branches (excluding main and develop)
git branch --merged $BASE_BRANCH | grep -vE '^\*|main|develop'
# Delete them
git branch --merged $BASE_BRANCH | grep -vE '^\*|main|develop' | xargs git branch -d
When your feature branch falls behind the base branch:
# Preferred: rebase onto latest base (clean history)
git fetch origin && git rebase origin/$BASE_BRANCH
# Alternative: merge base into feature (preserves history)
git fetch origin && git merge origin/$BASE_BRANCH
Use rebase for branches with only your own commits. Use merge if the branch has been shared or has a complex history. If uncertain, ask the user.
Before any branch operation, verify the working tree is clean:
git status --porcelain
If there are uncommitted changes:
git stash push -m "WIP: description"development
Use when a best-practice skill needs project-specific implementation details and no project skill exists at docs/maverick/skills/<topic>/SKILL.md. Scans the codebase and generates a project-specific skill file.
testing
Create or update technical documentation for a project. Covers architecture, service interactions, data flows, and design decisions. Produces professional markdown with Mermaid diagrams.
development
How to process code review feedback — verify before implementing, push back when wrong, clarify before acting on partial understanding. Applied when receiving review from the code-reviewer agent or human reviewers.
development
Analyze a project's codebase against Maverick standard practices and write a findings report. Checks linting, unit tests, integration tests, documentation, and CI/CD. Run when onboarding an existing project or on demand.