git-master — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited git-master (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Messy git history obscures intent, makes debugging harder, and wastes reviewer time. Clean history tells the story of WHY changes were made, not just WHAT changed.
Core principle: Every commit should be a single, complete, logical change that can be understood, reverted, or cherry-picked independently.
Violating the letter of this process is violating the spirit of clean version control.
ONE LOGICAL CHANGE PER COMMIT. NO EXCEPTIONS.If a commit does two things, it should be two commits. If a commit is incomplete, it should not exist yet.
No exceptions:
Use for ANY git operation beyond trivial:
Use this ESPECIALLY when:
Don't skip when:
git bisect)BEFORE making any commit, understand the repo's conventions:
git log --oneline -20| Pattern | Example | Convention |
|---|---|---|
| Conventional Commits | feat(auth): add OAuth2 flow | type(scope): description |
| Imperative mood | Add user validation | Verb-first, present tense |
| Ticket prefix | [PROJ-123] Fix login bug | [TICKET] description |
| Emoji prefix | :bug: Fix null pointer | Emoji + description |
| Freeform | Fixed the login thing | No consistent pattern |
Completion criteria:
style_detected — Commit message pattern identifiedconvention_noted — Will follow detected conventionEvery commit must be atomic — one logical change, complete and self-contained.
# Stage specific files, not everything
git add src/auth/login.ts src/auth/login.test.ts
# For partial file staging
git add -p src/utils/helpers.tsNever use `git add .` or `git add -A` unless you have verified every change belongs together.
git diff --cached # Review what you're about to commit
git diff # Check what's NOT stagedStructure:
<type>(<scope>): <what changed> (max 72 chars)
<why this change was needed>
<any important context>
Refs: #issue-number (if applicable)Good vs Bad:
| Bad | Good |
|---|---|
fix stuff | fix(auth): prevent session timeout on token refresh |
WIP | feat(cart): add quantity validation for checkout |
updates | refactor(api): extract retry logic into shared middleware |
fix tests | test(auth): cover edge case for expired JWT tokens |
Completion criteria:
changes_staged_selectively — No unrelated changes stagedmessage_follows_convention — Matches repo's detected stylecommit_is_atomic — Single logical changeUse rebase to maintain a clean, linear history.
git fetch origin
git rebase origin/main git rebase -i HEAD~N # N = number of commits to reviewAction guide:
| Action | When to Use |
|---|---|
pick | Keep commit as-is |
reword | Fix commit message only |
squash | Merge into previous, combine messages |
fixup | Merge into previous, discard message |
drop | Remove commit entirely |
AI Agent Note: Interactive commands (rebase -i,add -p) require terminal interaction. AI agents without interactive input support should use non-interactive alternatives (e.g.,git rebase --onto,git add <specific-files>) or prepare the rebase todo list programmatically.
git rebase --abort # Cancel in-progress rebase
git reflog # Find pre-rebase state
git reset --hard HEAD@{N} # Restore (DESTRUCTIVE — uncommitted changes lost)Completion criteria:
history_is_linear — No unnecessary merge commitscommits_are_clean — WIP commits squashedSafely move individual commits between branches.
git log --oneline source-branch git cherry-pick <commit-hash>
# For multiple commits
git cherry-pick <hash1> <hash2> <hash3>
# For a range
git cherry-pick <older-hash>..<newer-hash> # View conflicting files
git status
# Resolve conflicts, then
git add <resolved-files>
git cherry-pick --continue
# Or abort if too complex
git cherry-pick --abortCompletion criteria:
commit_identified — Correct commit(s) selectedconflicts_resolved — All conflicts handledtests_pass — Target branch is greenFix mistakes without breaking history for others.
# Add forgotten changes
git add <forgotten-file>
git commit --amend
# Fix message only
git commit --amend -m "corrected message"Only amend unpushed commits. Amending pushed commits requires force-push.
# Create a fixup commit
git commit --fixup=<target-hash>
# Auto-squash during rebase
git rebase -i --autosquash HEAD~N # View recent HEAD movements
git reflog
# Restore accidentally deleted commit
git cherry-pick <reflog-hash>
# Restore to a previous state (DESTRUCTIVE — all uncommitted changes are lost)
git reset --hard HEAD@{N}git reflog shows the state you want to restoregit branch backup-before-cleanupCompletion criteria:
history_corrected — Mistakes fixedno_shared_history_rewritten — Shared branches untouchedbackup_created — Safety branch exists for risky operationsResolve merge conflicts systematically, not by guessing.
# See which files conflict
git status
# See what both sides changed
git diff --merge
git log --merge --oneline| Situation | Strategy |
|---|---|
| One side is clearly correct | Take that side |
| Both changes needed | Combine manually |
| Changes are incompatible | Consult the other author |
| Complex logic conflict | Write a new implementation that satisfies both |
git add <resolved-files>
git commit # or git rebase --continue / git merge --continueCompletion criteria:
all_conflicts_resolved — No remaining conflict markersboth_intents_preserved — No changes silently droppedtests_pass — Resolution doesn't break anythingBefore completing any git operation:
git add . used without reviewing all changes<<<<<<<, =======, >>>>>>>)| Thought | Reality |
|---|---|
| "I'll clean up the history later" | Later never comes. Clean it now. |
| "Just one big commit is fine" | Big commits are impossible to review, revert, or bisect. |
| "Nobody reads commit messages" | git blame and git bisect users do. Future-you does. |
| "Force push is fine, I'm the only one on this branch" | Verify first. CI, bots, and reviewers may have fetched. |
| "The merge conflict is obvious, just take mine" | Obvious conflicts hide subtle logic bugs. Read both sides. |
| "I'll squash on merge anyway" | Squash loses the story. Clean history beats squashed history. |
| "Rebase is scary, I'll just merge" | Merge commits obscure linear history. Learn rebase. |
| "This commit message is good enough" | Future readers have zero context. Be specific. |
ALL of these mean: STOP. Follow the relevant phase.
| Skill | Relationship |
|---|---|
refactoring | Refactoring produces commits — use git-master for commit hygiene |
test-driven-development | TDD cycle maps to atomic commits: one test + impl per commit |
pr-all-in-one | PR preparation requires clean history — git-master feeds into it |
deployment-checklist | Deploy from clean branches with verified history |
| Agent | When to Involve |
|---|---|
| Code Reviewer | When commit organization affects review quality |
| DevOps Engineer | When branch strategy impacts CI/CD pipeline |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.