Version Control, skill collection

Git workflows

Use this pack when the repository history or working tree needs careful handling. It includes conflict resolution, undo, rebase, branch strategy, commit messages, and history investigation.

6 skillsMIT licensegit-mastery

What to give your agent

A skill supplies a procedure. Give your agent the project evidence and constraints needed to apply it.

  • Git status, the current branch, and the branch or commit being merged.
  • The intent of both changes, including tests added on either branch.
  • Whether the branch is shared, and which uncommitted files belong to ongoing work.

Merge a behavior change with a refactor

One branch moves authorization into middleware. Another adds an ownership check to the old request handler. Taking either side of the conflict wholesale loses part of the intended behavior.

  1. Understand both changes

    Inspect the common ancestor and each branch’s diff. Separate the relocation of code from the new ownership rule. Record uncommitted changes before editing.

  2. Resolve the behavior

    Place the ownership check in the new request path after authentication and before the protected action. Remove the obsolete handler logic only after checking its callers.

  3. Check the combined result

    Run the middleware tests, the new ownership tests, and a request with an authenticated user who does not own the resource. Review the staged diff for unrelated changes.

Example result structure
Preserved: middleware authorization flow
Preserved: resource ownership check
Checks: owner allowed; non-owner denied; anonymous denied
Review: staged diff contains only the intended resolution

How to check the result

  • There are no unresolved conflict markers.
  • Tests cover behavior from both branches.
  • Existing local work remains accounted for in git status.

A failure to watch for

A conflict-free merge can still remove a behavior. Review the combined execution path, even when Git accepts the text.

This is an illustrative exercise. Run the checks against your own project to establish the result.

Skills in this pack

Open a skill to see its activation guidance, source sections, and individual install command. These descriptions come from the linked source files.

6 of 6 skills

Branch Strategy Advisorbranch-strategy-advisor

Use this skill when discussing Git branching strategies. Activate when the user asks about branch naming, GitFlow, trunk-based development, feature branches, release branches, how to organize branches, branch protection, or setting up a branching workflow for their team.

Use it when

  • Setting up a new project's branching workflow
  • Deciding between GitFlow, trunk-based, or GitHub Flow
  • Standardizing branch naming conventions
  • Configuring branch protection rules
  • Scaling branching for larger teams

Inside the source file

  • Strategy Comparison
  • Strategy 1: Trunk-Based Development
  • Strategy 2: GitHub Flow
  • Strategy 3: GitFlow
  • Branch Naming Convention
  • Branch Protection Rules
  • Decision Guide
  • Migration Between Strategies
Read branch-strategy-advisor/SKILL.md on GitHub

Install this skill individually

npx skills add latestaiagents/agent-skills --skill branch-strategy-advisor
Commit Message Craftercommit-message-crafter

Use this skill when writing Git commit messages. Activate when the user asks about commit message format, conventional commits, how to write good commit messages, commit message best practices, or when they're about to commit changes and need help crafting the message.

Use it when

  • Writing a commit message for staged changes
  • Following conventional commits format
  • Standardizing commit messages across a team
  • Writing messages for squash commits or PRs

Inside the source file

  • The Conventional Commits Format
  • Examples
  • Workflow
  • Quick Templates
  • Common Mistakes to Avoid
  • Team Conventions
  • Tools
Read commit-message-crafter/SKILL.md on GitHub

Install this skill individually

npx skills add latestaiagents/agent-skills --skill commit-message-crafter
Git History Detectivegit-history-detective

Use this skill when investigating Git history. Activate when the user wants to find when a bug was introduced, who changed a line of code, track down a regression, use git bisect, search commit history, understand why code was changed, or investigate when and how something broke.

Use it when

  • Finding when a bug was introduced
  • Understanding why code was changed
  • Finding who last modified a line
  • Tracking down a regression
  • Searching for commits by content

Inside the source file

  • Investigation Techniques
  • Investigation Workflow
  • Advanced Techniques
  • Tools Integration
  • Common Patterns
Read git-history-detective/SKILL.md on GitHub

Install this skill individually

npx skills add latestaiagents/agent-skills --skill git-history-detective
Git Undo Wizardgit-undo-wizard

Use this skill when the user needs to undo, revert, or recover from Git mistakes. Activate when they mention: undo commit, revert changes, accidentally committed, wrong branch, recover deleted, reset HEAD, undo push, undo merge, restore file, git reflog, "I messed up", lost commits, or any Git recovery scenario.

Use it when

  • Accidentally committed to wrong branch
  • Need to undo a commit (before or after push)
  • Accidentally deleted a branch or file
  • Need to recover lost commits
  • Want to undo a merge

Inside the source file

  • Scenarios & Solutions
  • The Reflog Safety Net
  • Best Practices
  • Common Mistakes to Avoid
Read git-undo-wizard/SKILL.md on GitHub

Install this skill individually

npx skills add latestaiagents/agent-skills --skill git-undo-wizard
Merge Conflict Surgeonmerge-conflict-surgeon

Use this skill when resolving Git merge conflicts. Activate when the user mentions merge conflicts, conflicting changes, failed merges, "both modified", HEAD markers, conflict markers (<<<<<<<, =======, >>>>>>>), or asks how to resolve conflicts between branches. Also use when git merge or git rebase fails due to conflicts.

Use it when

  • git merge or git rebase fails with conflicts
  • You see conflict markers (<<<<<<<, =======, >>>>>>>) in files
  • git status shows "both modified" files
  • Merging feature branches into main/develop
  • Rebasing a branch onto updated main

Inside the source file

  • Workflow
  • Resolution Patterns
  • Tools
  • Common Mistakes to Avoid
  • Emergency Recovery
Read merge-conflict-surgeon/SKILL.md on GitHub

Install this skill individually

npx skills add latestaiagents/agent-skills --skill merge-conflict-surgeon
Rebase Safelyrebase-safely

Use this skill when rebasing Git branches. Activate when the user mentions rebase, interactive rebase, squash commits, reorder commits, edit commit history, clean up commits before merge, rebase onto main, or fixing up commit history. Also use when rebase fails or causes conflicts.

Use it when

  • Updating feature branch with latest main
  • Cleaning up commit history before PR
  • Squashing multiple commits into one
  • Reordering or editing commits
  • Fixing commit messages

Inside the source file

  • The Golden Rule
  • Basic Rebase Operations
  • Common Scenarios
  • Handling Conflicts
  • Safe Rebase Workflow
  • Rebase vs Merge
  • Autosquash - Quick Fixups
  • Recovering from Bad Rebase
Read rebase-safely/SKILL.md on GitHub

Install this skill individually

npx skills add latestaiagents/agent-skills --skill rebase-safely

Install the skills

With Node.js and npm available, run this in your project’s terminal. The CLI prompts for skills, agent, and installation scope.

npx skills add https://github.com/latestaiagents/agent-skills/tree/main/skills/developer/git-mastery

Choose scope, then verify discovery

Choose project scope for instructions tied to this repository, or global scope when you want them available across projects. Check the selected agent’s installed skill list, then try a representative task from the example above.

For one skill, open its contents entry and use the individual command. Installation support and skill behavior vary by agent.

Skills CLI documentation and supported agents

Install commands follow the repository’s current branch. The inventory on this page is pinned to the source revision below, so a later install may differ.

Source and review status

This inventory is taken from commit a5e492b, committed November 4, 2026. Skill instructions and bundled integrations have not completed a technical review. The worked example is editorial guidance, separate from the source file contents.

Browse this pack’s source

Starter recipes using these skills

Choose a different scope