Agent skill

Version Control

by seb1n in seb1n/awesome-ai-agent-skills

Manage Git repositories and collaborative workflows — branching strategies, commit hygiene, conflict resolution, pull requests, hooks, and .gitignore management.

MITAuto-check: notesDevelopment

Install Version Control

skills CLI
$ npx skills add seb1n/awesome-ai-agent-skills --skill version-control -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install seb1n/awesome-ai-agent-skills version-control --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/seb1n/awesome-ai-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/code-and-development/version-control .claude/skills/version-control && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
version-control
GitHub stars
206
Token cost
~2k tokens
SKILL.md length
824 words
Files
1
Skills in repo
92
Repo updated
First seen
Licence
MIT

At a glance

Manage Git repositories and collaborative workflows — branching strategies, commit hygiene, conflict resolution, pull requests, hooks, and .gitignore management.

  • Works in 6 steps: Assess Repository State: Run git status,… → Stage and Commit Changes: Group related… → Branch Management: Create feature,… → …
  • The user requests version control
  • SKILL.md covers Workflow, Supported Technologies, Usage and Examples, plus 2 more sections
  • Calls git and gh

What it does

Version Control is an agent skill from seb1n/awesome-ai-agent-skills. Manage Git repositories and collaborative workflows — branching strategies, commit hygiene, conflict resolution, pull requests, hooks, and .gitignore management. Use when the user requests version control or provides relevant inputs for this workflow.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Git. The repository describes itself as: 103 ready-to-use AI agent skills for Claude Code, OpenAI Codex, Gemini CLI, Cursor, GitHub Copilot, Windsurf, and other Agent Skills-compatible tools. Complete SKILL.md… The licence is MIT.

When your agent uses it

  • The user requests version control
  • Provides relevant inputs for this workflow

Example prompts

  • “/version-control”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Assess Repository State: Run git status, git log --oneline -10, and git branch -a to understand the current branch, uncommitted changes…
  2. Stage and Commit Changes: Group related changes into atomic commits. Write commit messages that start with a concise summary line (50…
  3. Branch Management: Create feature, bugfix, or release branches from the appropriate base. Use a consistent naming convention such as…
  4. Synchronize with Remote: Fetch and pull regularly to stay up to date. Push feature branches with the -u flag on first push. Before…
  5. Resolve Conflicts: When conflicts arise, inspect the conflicting files, understand both sides of the change, choose the correct resolution…
  6. Automate with Hooks and CI: Set up Git hooks (pre-commit for linting/formatting, commit-msg for message validation, pre-push for test…

What it can do on your machine

Read from SKILL.md and the folder at commit 75865a5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Version Control loads about 2k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 824 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:130
    - **Never commit secrets.** Add `.env`, credentials files, and private keys to `.gitignore` before the first commit. Use

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from seb1n/awesome-ai-agent-skills at commit 75865a5, republished under its MIT licence (© seb1n). 824 words, ~1,976 tokens.

Download SKILL.mdSave it as .claude/skills/version-control/SKILL.md (or your agent's skills folder).
name
version-control
description
Manage Git repositories and collaborative workflows — branching strategies, commit hygiene, conflict resolution, pull requests, hooks, and .gitignore management. Use when the user requests version control or provides relevant inputs for this workflow.
license
MIT
metadata.author
awesome-ai-agent-skills contributors
metadata.version
1.1.0

Version Control with Git

This skill equips an AI agent to perform the full spectrum of Git-based version control tasks, from initializing a repository and crafting atomic commits to orchestrating branching strategies, resolving merge conflicts, and configuring automation with hooks. It covers both everyday workflows and advanced operations needed for professional team collaboration.

Workflow

  1. Assess Repository State: Run git status, git log --oneline -10, and git branch -a to understand the current branch, uncommitted changes, recent history, and available remotes. This context determines which operations are safe to perform.

  2. Stage and Commit Changes: Group related changes into atomic commits. Write commit messages that start with a concise summary line (50 characters or fewer), followed by a blank line and an explanatory body when the change is non-trivial. Follow the project's commit convention (Conventional Commits, Angular style, etc.) if one exists.

  3. Branch Management: Create feature, bugfix, or release branches from the appropriate base. Use a consistent naming convention such as feat/short-description, fix/issue-123, or release/1.2.0. Delete stale branches after merging to keep the branch list clean.

  4. Synchronize with Remote: Fetch and pull regularly to stay up to date. Push feature branches with the -u flag on first push. Before merging, rebase or merge the base branch into the feature branch to resolve conflicts early in an isolated context.

  5. Resolve Conflicts: When conflicts arise, inspect the conflicting files, understand both sides of the change, choose the correct resolution (or combine both), mark the file as resolved with git add, and complete the merge or rebase. Always run tests after resolution to confirm correctness.

  6. Automate with Hooks and CI: Set up Git hooks (pre-commit for linting/formatting, commit-msg for message validation, pre-push for test runs) and ensure .gitignore covers build artifacts, environment files, and OS metadata. Integrate with CI pipelines to enforce quality gates on every push.

Supported Technologies

  • Git (CLI, libgit2)
  • Platforms: GitHub, GitLab, Bitbucket, Azure DevOps
  • CLI tools: gh (GitHub CLI), glab (GitLab CLI)
  • Hook frameworks: Husky, pre-commit, Lefthook
  • Branching models: GitFlow, GitHub Flow, trunk-based development

Usage

Ask the agent to perform any Git operation by describing what you need in plain language. Examples:

  • "Create a feature branch for the new auth module and commit my staged changes."
  • "Resolve the merge conflicts in src/config.ts and complete the merge."
  • "Set up a .gitignore for a Python project with a virtual environment."
  • "Rebase my branch onto main and force-push the cleaned-up history."

The agent will verify the repository state before every destructive operation and confirm with you before running commands like reset --hard, push --force, or rebase that rewrite history.

Examples

Example 1 — Resolving a Merge Conflict

Scenario: You are on branch feat/user-profile and want to merge main, but there is a conflict in src/utils/format.ts.

bash
# Attempt the merge
git merge main
# Output: CONFLICT (content): Merge conflict in src/utils/format.ts

# Inspect the conflict markers
git diff --name-only --diff-filter=U
# src/utils/format.ts

The conflicting file contains:

typescript
function formatDate(date: Date): string {
<<<<<<< HEAD
  return date.toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric" });
=======
  return new Intl.DateTimeFormat("en-US", { dateStyle: "medium" }).format(date);
>>>>>>> main
}

Resolution: The main version uses the modern Intl.DateTimeFormat API, which is preferred. Accept that version, remove the conflict markers, and complete the merge:

typescript
function formatDate(date: Date): string {
  return new Intl.DateTimeFormat("en-US", { dateStyle: "medium" }).format(date);
}
bash
# Mark resolved and commit
git add src/utils/format.ts
git commit -m "merge main into feat/user-profile, adopt Intl.DateTimeFormat"
Show full SKILL.md (341 more words)Show less
Example 2 — Setting Up a Branching Strategy (GitHub Flow)

Scenario: A small team wants a lightweight branching model for continuous deployment.

bash
# Ensure main is the default and protected branch
gh repo edit --default-branch main

# Create a feature branch from main
git checkout main && git pull
git checkout -b feat/dark-mode

# ... develop and commit ...
git add .
git commit -m "feat: add dark-mode toggle to settings page

Reads user preference from localStorage and applies the
'dark' class to <html>. Falls back to OS preference via
prefers-color-scheme media query."

# Push and open a pull request
git push -u origin feat/dark-mode
gh pr create \
  --title "feat: add dark-mode toggle" \
  --body "## Summary
- Adds a toggle in Settings that persists to localStorage
- Respects OS-level dark mode preference as default

## Test plan
- [ ] Toggle switches theme immediately
- [ ] Preference persists across page reloads
- [ ] Falls back to OS preference for new users"

# After review and CI pass, merge via GitHub
gh pr merge --squash --delete-branch

Key points: main is always deployable, every change goes through a PR with review and CI, and branches are deleted after merge to avoid clutter.

Best Practices

  • Write atomic commits. Each commit should represent one logical change that compiles and passes tests on its own. This makes bisect, revert, and cherry-pick reliable.
  • Never commit secrets. Add .env, credentials files, and private keys to .gitignore before the first commit. Use tools like git-secrets or trufflehog to scan for accidental leaks.
  • Rebase feature branches, merge to main. Rebasing keeps feature branch history linear and easy to review; merging into main preserves the merge commit as a clear integration point.
  • Use --force-with-lease instead of --force. It prevents overwriting teammates' work by failing if the remote has commits you haven't fetched.
  • Tag releases. Use annotated tags (git tag -a v1.2.0 -m "Release 1.2.0") for every production release so you can always trace deployed code back to a specific commit.
  • Keep .gitignore comprehensive. Start from a template (github/gitignore) for your language/framework and add project-specific entries for build output, editor config, and local environment files.

Edge Cases

  • Detached HEAD state: If the user has checked out a tag or specific commit, warn them before committing. Suggest creating a branch first to avoid orphaned commits.
  • Large binary files: Git is not designed for large binaries. Recommend Git LFS for assets like images, models, or videos, and add the relevant LFS tracking rules.
  • Shallow clones: Operations like blame, log, and bisect may fail on shallow clones (--depth 1). Run git fetch --unshallow before performing history-dependent operations.
  • Submodules and monorepos: When the project uses submodules, ensure git submodule update --init --recursive is part of the setup instructions. For monorepos, respect per-package change boundaries during commits.
  • Diverged branches after force-push: If a teammate force-pushed a shared branch, advise git fetch followed by git reset --hard origin/<branch> only after confirming no local work will be lost. Coordinate with the team first.

© seb1n, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in code-and-development/version-control of seb1n/awesome-ai-agent-skills.

Open the folder on GitHubat commit 75865a5

Compare with similar skills

Version Control next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Version Control compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Version Control this skillseb1n/awesome-ai-agent-skills206—~2kAutomated safety check: NotesMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost55k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    55k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed

More from seb1n/awesome-ai-agent-skills

All 92 skills in this repo
  • Agent Red Teaming

    seb1n/awesome-ai-agent-skills

    Plan, execute, document, and retest authorized security assessments of AI agents and multi-agent workflows using safe adversarial cases, synthetic identities, canaries, and evidence-based findings.

    206 GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Eu AI Act Readiness

    seb1n/awesome-ai-agent-skills

    Build a preliminary, evidence-based EU AI Act readiness assessment across AI-system inventory, territorial scope, operator roles, prohibited-practice screening, risk classification, transparency…

    206 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Human In The Loop

    seb1n/awesome-ai-agent-skills

    Design and verify auditable human oversight, approval gates, escalation paths, and safe state transitions for AI agent workflows.

    206 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed
  • MCP Server Building

    seb1n/awesome-ai-agent-skills

    Design, implement, harden, and verify Model Context Protocol (MCP) servers with precise tool contracts, least-privilege authorization, safe transports, structured errors, and interoperability tests.

    206 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed
  • PDF Processing

    seb1n/awesome-ai-agent-skills

    Inspect, extract, OCR, create, merge, split, reorder, rotate, annotate, fill, redact, compress, secure, and verify PDF documents while preserving source files and visual fidelity.

    206 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Skill Supply Chain Audit

    seb1n/awesome-ai-agent-skills

    Audit agent skills, plugins, prompts, manifests, scripts, dependencies, and bundled assets for provenance, prompt-injection, permission, execution, exfiltration, persistence, and update risk.

    206 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Version Control

What does Version Control do?

Manage Git repositories and collaborative workflows — branching strategies, commit hygiene, conflict resolution, pull requests, hooks, and .gitignore management. Version Control is an agent skill from seb1n/awesome-ai-agent-skills.gitignore management.

When should I use Version Control?

Version Control fits situations like: the user requests version control; provides relevant inputs for this workflow.

How do I install Version Control in Claude Code?

Run `npx skills add seb1n/awesome-ai-agent-skills --skill version-control -a claude-code`. Or copy the skill folder (code-and-development/version-control in seb1n/awesome-ai-agent-skills) into .claude/skills/version-control in your project. Claude Code loads it when a task matches its description.

How do I install Version Control in Codex?

Run `npx skills add seb1n/awesome-ai-agent-skills --skill version-control -a codex`. Or copy the skill folder (code-and-development/version-control in seb1n/awesome-ai-agent-skills) into .agents/skills/version-control in your project. Codex loads it when a task matches its description.

Can I use Version Control in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add seb1n/awesome-ai-agent-skills --skill version-control -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/version-control, .gemini/skills/version-control, .github/skills/version-control and .opencode/skills/version-control in your project.

What does Version Control need to run?

Going by SKILL.md and its folder, Version Control needs the command-line tools its instructions call (git and gh). Our summary lists: Python 3.

Does Version Control access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Version Control safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Version Control use?

Version Control is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Version Control use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Version Control?

Skills that share tags, products or a category with Version Control: Finishing a Development Branch (obra/superpowers, 296k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Version Control?

seb1n (a GitHub user) maintains it in seb1n/awesome-ai-agent-skills, which has 206 GitHub stars. The repository holds 92 skills in this directory. The repository was last updated on August 9, 2026.

Source: seb1n/awesome-ai-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.