MyClaw
HomeProductsUse CasesPricingSkillsResourcesCompany
HomeUse CasesPricingSkills
Sign In
Home
ProductsOpenClaw HostingHermes Agent Hosting
Use CasesPricingSkills
ResourcesCompareTutorialLearnBlogUpdatesResourcesCommunity
CompanyAboutSupport
Sign In
MyClaw.ai

Your AI agent, already running.

Product

OpenClaw HostingHermes Agent HostingUse CasesPricingCompareAlibaba Cloud

Resources

BlogUpdatesSkillsModelsSupportCommunityCapybara

Legal

TermsPrivacyCookieGDPRContact

© 2023 Cubo World Inc. All rights reserved.

← Back to Skills
Coding Agents & IDEs
💻

Git

Featured

Equip your AI agent with expert Git discipline — commits, branches, merges, rebases, conflict resolution, and safe recovery workflows.

Ivánv1.0.0
ProductivityOpen SourceAutomationCLIDeveloper Tool
Connecting to VM...
Connecting to VM...
npx clawhub@latest install git
18Stars
8.7kDownloads
123Current Installs
📦
v1.0.0Version
📅
Mar 11, 2026Updated

Platforms

linuxdarwinwin32
View Source(ClawHub)

Git Skill Overview

The Git skill gives your AI agent a comprehensive, opinionated playbook for day-to-day version control. It covers the full Git lifecycle — commits, branching strategies, rebasing, conflict resolution, history inspection, and recovery — while enforcing safe practices like --force-with-lease, meaningful commit messages, and pre-merge hygiene. Install this skill whenever your agent will interact with Git repositories so it applies consistent discipline instead of improvising.

How to Use It

Step 1: Run in your terminal or install this skill on MyClaw

npx clawhub@latest install git
or

Click the Install button at the top of this page for one-click setup

When to Use Git

Best Fit

  • Repository tasks: Any job that touches a Git repo — creating branches, staging changes, committing, pushing, or opening pull requests.
  • Team collaboration: When history safety matters and you need feature-branch flows, hotfix workflows, or PR-ready commit hygiene enforced automatically.
  • Debugging history: When you need to trace regressions with git bisect, recover lost commits via git reflog, or undo changes safely.
  • Conflict resolution: When merges or rebases produce conflicts and the agent needs a structured, verified approach to resolving them.

When Not to Use

  • Non-Git version control: If the project uses Mercurial, SVN, or another VCS, this skill's commands won't apply.
  • Read-only analysis tasks: If the agent only needs to read source code without interacting with Git at all, the skill adds unnecessary overhead.

Key Features

Safe Push & History Rewriting Rules

The skill enforces --force-with-lease over --force to prevent overwriting teammates' work, and prohibits force-pushing to shared branches like main/master. A built-in safety checklist must be satisfied before any destructive operation such as reset --hard or rebase.

Structured Team Workflows

Includes step-by-step flows for Feature Branch and Hotfix scenarios, including when to squash commits, how to sync with git fetch --all --prune, and how to tag releases. Designed to fit both trunk-based and gitflow-style teams.

Conflict Resolution Protocol

After editing conflicted files, the skill verifies no conflict markers remain using grep, confirms the code builds, and offers an escape hatch via git merge --abort when a merge becomes too complex. Rebasing is suggested as an alternative when merges get messy.

History Recovery & Debugging

Covers git reflog for recovering lost commits (up to ~90 days), restoring deleted branches by SHA, and undoing commits without losing work using git reset --soft. Also includes a full git bisect workflow for pinpointing regression-introducing commits.

Conventional Commit Enforcement

The skill mandates the type(scope): description commit message format with a first line under 72 characters, using standard types (feat, fix, docs, refactor, etc.). This keeps history readable and compatible with automated changelog tools.

Common Trap Avoidance

Documents and guards against frequent Git pitfalls: detached HEAD state, case-sensitivity issues between macOS/Windows and Linux CI, submodule cloning errors, stash-pop conflicts, and committing large files or secrets. Use git add -p for granular partial staging.

Use Cases

Automated feature branch lifecycle

An agent scaffolds a new feature, creates a branch from main, commits incrementally with conventional messages, rebases onto the latest main before pushing, squashes fixup commits, and opens a PR-ready branch — all without manual Git intervention.

Hotfix deployment under pressure

When a production bug is found, the agent checks out a hotfix/ branch from main, applies the fix, merges to both main and develop, tags the release, and cleans up the branch — following the documented hotfix flow precisely.

Regression hunting with bisect

The agent runs git bisect to binary-search through commit history, marking commits good or bad based on automated test results, until it identifies the exact commit that introduced a bug.

Conflict resolution during rebase

During a long-running feature rebase, the agent resolves conflicts file by file, verifies no <<</>>> markers remain, confirms the build passes, and continues the rebase — or aborts cleanly if the conflict is too complex.

Connecting to VM...
npx clawhub@latest install git
18Stars
8.7kDownloads
123Current Installs
📦
v1.0.0Version
📅
Mar 11, 2026Updated

Platforms

linuxdarwinwin32
View Source(ClawHub)

FAQ

Reviews

0 reviews

Log in to write a review

No reviews yet. Be the first to share your experience!