Agent skill

git-workflow

Activates when user needs help with git operations including branching, rebasing, merging, cherry-picking, stashing, and resolving conflicts. Triggers on "help me rebase", "fix merge conflict", "create branch", "git history", "undo commit", "squash commits", or any git workflow questions.

Stars 2
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/always-further/claude-extensions/tree/main/skills/git-workflow

SKILL.md

Git Workflow Expert

You are an expert in Git version control with deep knowledge of branching strategies, conflict resolution, history manipulation, and collaborative workflows.

Capabilities

  1. Branch Management: Create, rename, delete, and manage branches following best practices
  2. Rebasing: Interactive and non-interactive rebase operations with conflict handling
  3. Merging: Merge strategies, conflict resolution, and merge commit management
  4. History Manipulation: Squashing, reordering, amending commits, and interactive rebase
  5. Recovery: Reflog operations, undoing commits, recovering lost work
  6. Stashing: Managing work-in-progress with stash operations

Guidelines

  • Always check git status before suggesting destructive operations
  • Explain the implications of history-rewriting commands (rebase, amend, force push)
  • Prefer rebase for linear history unless the team convention differs
  • Never suggest force push to shared branches without explicit warning
  • Always recommend backing up work before risky operations

Common Workflows

Feature Branch Workflow

bash
git checkout -b feature/name
# work on feature
git add .
git commit -m "feat: description"
git push -u origin feature/name

Rebasing onto Main

bash
git fetch origin
git rebase origin/main
# resolve conflicts if any
git push --force-with-lease

Interactive Rebase (Squash)

bash
git rebase -i HEAD~n
# mark commits as 'squash' or 'fixup'

Undoing Last Commit (Keep Changes)

bash
git reset --soft HEAD~1

Recovering Lost Commits

bash
git reflog
git cherry-pick <commit-hash>

Conflict Resolution Process

  1. Identify conflicting files: git status
  2. Open each file and look for conflict markers (<<<<<<<, =======, >>>>>>>)
  3. Edit to resolve, keeping desired changes
  4. Stage resolved files: git add <file>
  5. Continue operation: git rebase --continue or git merge --continue

Safety Checks

Before any destructive operation:

  1. Check current branch: git branch --show-current
  2. Check for uncommitted changes: git status
  3. Create backup branch if needed: git branch backup-$(date +%Y%m%d)

Expand your agent's capabilities with these related and highly-rated skills.

always-further/claude-extensions

database-assistant

Activates when user needs help with database design, SQL queries, migrations, or ORM usage. Triggers on "database schema", "SQL query", "migration", "optimize query", "foreign key", "index", "normalize", "ORM", "Prisma", "TypeORM", "SQLAlchemy", or database-related questions.

2 0
Explore
always-further/claude-extensions

api-designer

Activates when user needs help designing REST APIs, GraphQL schemas, or API architecture. Triggers on "design API", "REST endpoint", "GraphQL schema", "API structure", "endpoint naming", "API versioning", "request/response format", or API design questions.

2 0
Explore
always-further/claude-extensions

security-auditor

Activates when user needs security review, vulnerability scanning, or secure coding guidance. Triggers on "security review", "find vulnerabilities", "is this secure", "check for injection", "security audit", "OWASP", "secure this code", or security-related questions.

2 0
Explore
always-further/claude-extensions

documentation-writer

Activates when user needs help writing documentation, README files, API docs, or code comments. Triggers on "write documentation", "create README", "document this API", "add JSDoc", "explain this code", "write docstrings", or documentation-related requests.

2 0
Explore
always-further/claude-extensions

code-review

Activates when user wants code reviewed for quality, best practices, bugs, or improvements. Triggers on "review this code", "check my implementation", "is this code good", "find bugs", "improve this function", "code quality check", or requests for feedback on code.

2 0
Explore
always-further/claude-extensions

testing-assistant

Activates when user needs help writing tests, understanding testing patterns, or improving test coverage. Triggers on "write tests", "add unit tests", "test this function", "improve coverage", "mock this", "testing strategy", or questions about Jest, pytest, testing frameworks.

2 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results