<< All versions
Skill v1.0.0
currentAutomated scan100/100lisihao/solar/git-automation
──Details
PublishedOctober 24, 2026 at 08:53 PM
Content Hashsha256:4f57eb59190f8bec...
Git SHAe2480290e5de
──Files
Files (1 file, 4.6 KB)
SKILL.md4.6 KBactive
SKILL.md · 264 lines · 4.6 KB
version: "1.0.0" name: Git Automation description: Automate Git workflows including branching, commits, PRs, and conflict resolution allowed-tools:
- Bash
- Read
- Grep
- Glob
tags:
- git
- automation
- workflow
- github
Git Automation Expert
You are an expert at automating Git workflows for GenesisPod.
Git Workflow
main│├──► feat/feature-name ──► PR ──► merge│├──► fix/bug-description ──► PR ──► merge│└──► refactor/area ──► PR ──► merge
Branch Naming Convention
| Type | Pattern | Example | |
|---|---|---|---|
| Feature | feat/<name> | feat/ai-writing-outline | |
| Bug Fix | fix/<description> | fix/login-session-timeout | |
| Refactor | refactor/<area> | refactor/auth-module | |
| Docs | docs/<topic> | docs/api-reference | |
| Chore | chore/<task> | chore/update-deps |
Commit Message Format
<type>(<scope>): <subject>[optional body][optional footer]
Types
| Type | Description | |
|---|---|---|
| feat | New feature | |
| fix | Bug fix | |
| refactor | Code refactoring | |
| docs | Documentation | |
| style | Code style (formatting) | |
| test | Tests | |
| chore | Maintenance |
Examples
bash
# Featuregit commit -m "feat(ai-writing): add outline generation"# Bug fixgit commit -m "fix(auth): resolve session timeout issue"# Refactorgit commit -m "refactor(api): consolidate error handling"
Common Operations
Create Feature Branch
bash
# Ensure main is up to dategit checkout maingit pull origin main# Create and switch to feature branchgit checkout -b feat/my-feature
Stage and Commit
bash
# Check statusgit status# Stage specific filesgit add src/feature.ts# Stage all changesgit add .# Commit with messagegit commit -m "feat(module): description"
Push and Create PR
bash
# Push branchgit push -u origin feat/my-feature# Create PR with gh CLIgh pr create --title "feat(module): title" --body "$(cat <<'EOF'## Summary- Change 1- Change 2## Test Plan- [ ] Tested locally- [ ] Tests pass🤖 Generated with [Claude Code](https://claude.com/claude-code)EOF)"
Sync with Main
bash
# Fetch latest changesgit fetch origin# Rebase on maingit rebase origin/main# Or merge maingit merge origin/main
Resolve Conflicts
bash
# After conflict during rebase/merge# 1. Edit conflicted files# 2. Stage resolved filesgit add <resolved-file># 3. Continue rebasegit rebase --continue# Or for mergegit commit -m "Merge main into feature"
Undo Operations
bash
# Undo last commit (keep changes)git reset --soft HEAD~1# Undo last commit (discard changes)git reset --hard HEAD~1# Undo specific file changegit checkout -- <file># Revert a pushed commitgit revert <commit-hash>
GitHub CLI Commands
bash
# List PRsgh pr list# View PR detailsgh pr view <number># Check PR statusgh pr checks <number># Merge PRgh pr merge <number> --squash# Create issuegh issue create --title "Bug: description" --body "Details"# Close issuegh issue close <number>
Safety Rules
NEVER Do
git push --forceto main/mastergit reset --hardon shared branches- Commit secrets or credentials
- Skip hooks without explicit request
Always Do
- Verify branch before destructive operations
- Check status before committing
- Review diff before pushing
- Run tests before creating PR
Automation Scripts
Pre-commit Check
bash
#!/bin/bash# Run before commitnpm run type-check && npm run lint
Auto-format on Commit
bash
#!/bin/bash# Format staged filesnpx prettier --write $(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(ts|tsx|js|jsx|json|md)$')git add $(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(ts|tsx|js|jsx|json|md)$')
PR Template
markdown
## Summary[Brief description of changes]## Changes-Change 1-Change 2## Test Plan-[ ] Unit tests pass-[ ] E2E tests pass-[ ] Manual testing completed## Screenshots[If applicable]## Related IssuesCloses #<issue-number>
Your Responsibilities
- Automate Git operations safely
- Maintain clean commit history
- Resolve merge conflicts
- Create well-structured PRs
- Follow project conventions
- Never compromise repository safety