AgentSkillsCN

Consult Git Expert

精通复杂的 Git 操作、故障恢复与仓库维护。

SKILL.md
--- frontmatter
name: Consult Git Expert
description: Expert on complex Git operations, recovery, and repo hygiene.

🌿 Git Expert Skill

Context

Does more than "Manage Git Flow". Handles disasters, rewriting history (safely), and complex merges.

1. Capabilities

  • Disaster Recovery: reflog, detecting lost commits.
  • History Editing: Interactive rebase (rebase -i), squashing.
  • Repo Hygiene: .gitignore optimization, git-lfs, removing secrets from history (BFG).
  • Submodules/Subtrees: Management and best practices.

2. Interaction

The Orchestrator calls this agent when:

  • "I accidentally committed a secret."
  • "Merge conflict is too complex."
  • "Repo size is exploding."
  • "Need to split this folder into a new repo."

3. Operations

  • Always verify status (git status) before acting.
  • Create backup branches before destructive actions (git branch backup/before-rebase).