[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AJT7MWPC2W7KJFZFESAZXR":3,"skill-same:01M7AJT7MWPC2W7KJFZFESAZXR":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":30,"commitSha":31,"skillDirectory":5,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7AJT7MWPC2W7KJFZFESAZXR","claude-git-branching",null,"Expert Git workflow management for Claude Code sessions with branch naming conventions, push retry logic, conflict resolution, and PR automation specifically designed for AI-assisted development workflows.","davidanthonyn\u002Fagent-skills","davidanthonyn","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F55152980?v=4","01M7AJ4MY8S5C2RJCGX6626J0G","01M7AJ4MZB7EC7CAP27ANCSE7N",1,"MIT","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fclaude-git-branching\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: claude-git-branching\ndescription: Expert Git workflow management for Claude Code sessions with branch naming conventions, push retry logic, conflict resolution, and PR automation specifically designed for AI-assisted development workflows.\nlicense: MIT\ntags: [git, workflow, branching, claude-code, version-control, automation]\n---\n\n# Claude Git Branching\n\nMaster Git workflows optimized for Claude Code development sessions with intelligent branching, retry logic, and automated PR creation.\n\n## Overview\n\nThis skill provides battle-tested Git workflows specifically designed for Claude Code sessions, including:\n- Claude-specific branch naming conventions\n- Automatic push retry with exponential backoff\n- Multi-repository coordination\n- Conflict-free collaboration patterns\n- Automated PR creation and management\n\n## When to Use\n\nUse this skill when:\n- Starting a new Claude Code development session\n- Managing multiple feature branches across sessions\n- Dealing with intermittent network issues during push\n- Creating PRs from Claude-generated code\n- Coordinating work across multiple repositories\n- Following team Git conventions for AI-assisted development\n- Handling merge conflicts in long-running sessions\n\n## Branch Naming Conventions\n\n### Claude Code Standard Format\n\n```bash\n# Standard format\nclaude\u002F[feature-name]-[session-id]\n\n# Examples\nclaude\u002Fharvest-claude-skills-01MtCwKhDQhWyZCgwfkhdVG5\nclaude\u002Ffix-auth-bug-01NAB2cDE3FgHiJ4KlM5NoPq\nclaude\u002Fadd-api-endpoints-01PQRsT6UvWxY7ZaBcD8EfGh\n```\n\n**Format requirements:**\n- **Prefix**: Must start with `claude\u002F`\n- **Feature name**: Kebab-case description of work\n- **Session ID**: Unique identifier for the session\n- **Maximum length**: 100 characters recommended\n\n**Why this format?**\n- ✅ Clear AI-assisted development marker\n- ✅ Prevents conflicts with human developer branches\n- ✅ Traceable to specific session\n- ✅ Easy to filter and manage\n- ✅ Works with GitHub access controls (required for push)\n\n### Alternative Formats\n\n```bash\n# Team-based\nclaude\u002F[team]\u002F[feature]-[session-id]\nclaude\u002Fbackend\u002Fapi-optimization-01ABC\n\n# Priority-based\nclaude\u002F[priority]\u002F[feature]-[session-id]\nclaude\u002Furgent\u002Fsecurity-patch-01DEF\n\n# Issue-based\nclaude\u002Fissue-[number]-[session-id]\nclaude\u002Fissue-1234-01GHI\n```\n\n## Branch Creation Workflow\n\n### Step 1: Check Current State\n\n```bash\n# Verify current branch\ngit branch --show-current\n\n# Check status\ngit status\n\n# View recent branches\ngit branch -a | grep \"claude\u002F\" | head -10\n```\n\n### Step 2: Create Feature Branch\n\n```bash\n# From main\u002Fmaster\ngit checkout main\ngit pull origin main\n\n# Create Claude branch\nFEATURE=\"add-user-authentication\"\nSESSION_ID=\"01MtCwKhDQhWyZCgwfkhdVG5\"\nBRANCH=\"claude\u002F${FEATURE}-${SESSION_ID}\"\n\ngit checkout -b \"$BRANCH\"\necho \"Created branch: $BRANCH\"\n```\n\n### Step 3: Verify Branch Name\n\n```bash\n# Ensure proper format\nCURRENT_BRANCH=$(git branch --show-current)\n\nif [[ ! \"$CURRENT_BRANCH\" =~ ^claude\u002F.+-[0-9A-Za-z]{20,}$ ]]; then\n    echo \"⚠️  Warning: Branch name doesn't match Claude format\"\n    echo \"Expected: claude\u002F[feature-name]-[session-id]\"\n    echo \"Got: $CURRENT_BRANCH\"\nfi\n```\n\n## Push with Retry Logic\n\n### Standard Push Pattern\n\n```bash\n#!\u002Fbin\u002Fbash\n# push-with-retry.sh - Push with exponential backoff\n\nBRANCH=$(git branch --show-current)\nMAX_RETRIES=4\nRETRY_COUNT=0\nDELAYS=(2 4 8 16)  # Exponential backoff in seconds\n\necho \"Pushing branch: $BRANCH\"\n\nwhile [ $RETRY_COUNT -lt $MAX_RETRIES ]; do\n    if git push -u origin \"$BRANCH\"; then\n        echo \"✓ Successfully pushed to origin\u002F$BRANCH\"\n        exit 0\n    else\n        EXIT_CODE=$?\n        RETRY_COUNT=$((RETRY_COUNT + 1))\n\n        # Check if it's a 403 error (branch name issue)\n        if git push -u origin \"$BRANCH\" 2>&1 | grep -q \"403\"; then\n            echo \"✗ Push failed with 403 - Check branch naming convention\"\n            echo \"Branch must start with 'claude\u002F' and end with session ID\"\n            exit 1\n        fi\n\n        if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then\n            DELAY=${DELAYS[$RETRY_COUNT-1]}\n            echo \"⚠️  Push failed (attempt $RETRY_COUNT\u002F$MAX_RETRIES)\"\n            echo \"Retrying in ${DELAY}s...\"\n            sleep $DELAY\n        fi\n    fi\ndone\n\necho \"✗ Push failed after $MAX_RETRIES attempts\"\nexit 1\n```\n\n**Usage:**\n```bash\nchmod +x push-with-retry.sh\n.\u002Fpush-with-retry.sh\n```\n\n### Inline Retry Pattern\n\n```bash\n# Quick inline version\nfor i in {1..4}; do\n    if git push -u origin $(git branch --show-current); then\n        echo \"✓ Pushed successfully\"\n        break\n    else\n        [ $i -lt 4 ] && echo \"Retry $i\u002F4...\" && sleep $((2**i))\n    fi\ndone\n```\n\n## Commit Best Practices\n\n### Atomic Commits\n\n```bash\n# Make focused, atomic commits\ngit add src\u002Fauth\u002Flogin.ts\ngit commit -m \"feat: Add JWT-based login authentication\"\n\ngit add src\u002Fauth\u002Fmiddleware.ts\ngit commit -m \"feat: Add auth middleware for protected routes\"\n\ngit add tests\u002Fauth.test.ts\ngit commit -m \"test: Add authentication test suite\"\n```\n\n### Commit Message Format\n\n```bash\n# Format: \u003Ctype>: \u003Cdescription>\n# Types: feat, fix, docs, refactor, test, chore, style, perf\n\ngit commit -m \"$(cat \u003C\u003C'EOF'\nfeat: Add user authentication system\n\n- Implement JWT-based authentication\n- Add login\u002Flogout endpoints\n- Create auth middleware\n- Add session management\n\nCloses #123\nEOF\n)\"\n```\n\n### Conventional Commits\n\n```bash\n# Feature\ngit commit -m \"feat(auth): Add JWT authentication\"\n\n# Bug fix\ngit commit -m \"fix(api): Handle null user in middleware\"\n\n# Documentation\ngit commit -m \"docs(readme): Update authentication setup\"\n\n# Refactoring\ngit commit -m \"refactor(auth): Extract token validation logic\"\n\n# Breaking change\ngit commit -m \"feat(api)!: Change auth response format\n\nBREAKING CHANGE: Auth response now returns user object instead of ID\"\n```\n\n## Pull Request Creation\n\n### Automated PR Creation\n\n```bash\n#!\u002Fbin\u002Fbash\n# create-pr.sh - Create PR with gh CLI\n\nBRANCH=$(git branch --show-current)\nBASE_BRANCH=\"${1:-main}\"\n\n# Ensure we're on a Claude branch\nif [[ ! \"$BRANCH\" =~ ^claude\u002F ]]; then\n    echo \"⚠️  Warning: Not on a Claude branch\"\n    read -p \"Continue anyway? (y\u002Fn) \" -n 1 -r\n    echo\n    [[ ! $REPLY =~ ^[Yy]$ ]] && exit 1\nfi\n\n# Get commit history since divergence\nCOMMITS=$(git log ${BASE_BRANCH}...HEAD --oneline)\nDIFF_STAT=$(git diff ${BASE_BRANCH}...HEAD --stat)\n\n# Analyze changes\nFILES_CHANGED=$(git diff ${BASE_BRANCH}...HEAD --name-only | wc -l)\nLINES_ADDED=$(git diff ${BASE_BRANCH}...HEAD --numstat | awk '{sum+=$1} END {print sum}')\nLINES_REMOVED=$(git diff ${BASE_BRANCH}...HEAD --numstat | awk '{sum+=$2} END {print sum}')\n\necho \"=== PR Summary ===\"\necho \"Branch: $BRANCH\"\necho \"Base: $BASE_BRANCH\"\necho \"Files changed: $FILES_CHANGED\"\necho \"Lines added: $LINES_ADDED\"\necho \"Lines removed: $LINES_REMOVED\"\necho \"\"\n\n# Extract feature description from branch name\nFEATURE=$(echo \"$BRANCH\" | sed 's\u002Fclaude\\\u002F\\(.*\\)-[0-9A-Za-z]\\{20,\\}\u002F\\1\u002F' | tr '-' ' ')\nTITLE=\"feat: ${FEATURE^}\"\n\n# Create PR body\nPR_BODY=\"$(cat \u003C\u003CEOF\n## Summary\n\nThis PR implements ${FEATURE}.\n\n### Changes\n$(git log ${BASE_BRANCH}...HEAD --pretty=format:\"- %s\" | head -10)\n\n### Stats\n- **Files changed**: $FILES_CHANGED\n- **Lines added**: $LINES_ADDED\n- **Lines removed**: $LINES_REMOVED\n\n### Test Plan\n- [ ] Code builds successfully\n- [ ] Tests pass\n- [ ] Manual testing completed\n- [ ] Documentation updated\n\n### Checklist\n- [ ] Code follows project conventions\n- [ ] No console errors or warnings\n- [ ] Security considerations reviewed\n- [ ] Performance impact assessed\n\n---\n*Generated by Claude Code session*\nEOF\n)\"\n\n# Push if needed\necho \"Ensuring branch is pushed...\"\ngit push -u origin \"$BRANCH\" 2>&1 | grep -v \"up-to-date\" || true\n\n# Create PR\necho \"\"\necho \"Creating pull request...\"\ngh pr create \\\n    --base \"$BASE_BRANCH\" \\\n    --head \"$BRANCH\" \\\n    --title \"$TITLE\" \\\n    --body \"$PR_BODY\"\n\nif [ $? -eq 0 ]; then\n    echo \"✓ PR created successfully\"\n    gh pr view --web\nelse\n    echo \"✗ Failed to create PR\"\n    exit 1\nfi\n```\n\n### PR Templates\n\n```markdown\n\u003C!-- .github\u002FPULL_REQUEST_TEMPLATE.md -->\n\n## Description\n\u003C!-- Describe your changes in detail -->\n\n## Type of Change\n- [ ] 🎯 New feature\n- [ ] 🐛 Bug fix\n- [ ] 📚 Documentation update\n- [ ] ♻️ Refactoring\n- [ ] ⚡ Performance improvement\n- [ ] ✅ Test addition\u002Fupdate\n\n## Claude Code Session\n- **Branch**: `[branch-name]`\n- **Session ID**: `[session-id]`\n- **Duration**: `[time spent]`\n\n## Changes Made\n- Change 1\n- Change 2\n- Change 3\n\n## Testing\n- [ ] Unit tests added\u002Fupdated\n- [ ] Integration tests pass\n- [ ] Manual testing completed\n- [ ] No regressions identified\n\n## Checklist\n- [ ] Code follows project style guide\n- [ ] Self-review completed\n- [ ] Comments added for complex logic\n- [ ] Documentation updated\n- [ ] No new warnings introduced\n\n## Screenshots (if applicable)\n\u003C!-- Add screenshots for UI changes -->\n\n## Related Issues\n\u003C!-- Link related issues: Fixes #123, Relates to #456 -->\n```\n\n## Multi-Repository Management\n\n### Coordinating Across Repos\n\n```bash\n#!\u002Fbin\u002Fbash\n# sync-multi-repo.sh - Sync work across multiple repositories\n\nREPOS=(\n    \"\u002Fpath\u002Fto\u002Ffrontend\"\n    \"\u002Fpath\u002Fto\u002Fbackend\"\n    \"\u002Fpath\u002Fto\u002Fshared-lib\"\n)\n\nBRANCH_PREFIX=\"claude\u002Fsync-auth-update\"\nSESSION_ID=\"01MtCwKhDQhWyZCgwfkhdVG5\"\n\nfor REPO in \"${REPOS[@]}\"; do\n    echo \"=== Processing: $REPO ===\"\n    cd \"$REPO\" || continue\n\n    REPO_NAME=$(basename \"$REPO\")\n    BRANCH=\"${BRANCH_PREFIX}-${REPO_NAME}-${SESSION_ID}\"\n\n    # Create branch\n    git checkout -b \"$BRANCH\" 2>\u002Fdev\u002Fnull || git checkout \"$BRANCH\"\n\n    echo \"Ready for changes in: $BRANCH\"\n    echo \"\"\ndone\n```\n\n### Batch Commit and Push\n\n```bash\n#!\u002Fbin\u002Fbash\n# commit-multi-repo.sh - Commit across multiple repos\n\nREPOS=(\"frontend\" \"backend\" \"shared-lib\")\nCOMMIT_MSG=\"$1\"\n\nif [ -z \"$COMMIT_MSG\" ]; then\n    echo \"Usage: $0 \u003Ccommit-message>\"\n    exit 1\nfi\n\nfor REPO in \"${REPOS[@]}\"; do\n    echo \"=== $REPO ===\"\n    cd \"$REPO\" || continue\n\n    # Check if there are changes\n    if [ -n \"$(git status --porcelain)\" ]; then\n        git add .\n        git commit -m \"$COMMIT_MSG\"\n\n        # Push with retry\n        for i in {1..4}; do\n            if git push -u origin $(git branch --show-current); then\n                echo \"✓ Pushed $REPO\"\n                break\n            else\n                [ $i -lt 4 ] && sleep $((2**i))\n            fi\n        done\n    else\n        echo \"No changes in $REPO\"\n    fi\n\n    cd - > \u002Fdev\u002Fnull\n    echo \"\"\ndone\n```\n\n## Conflict Resolution\n\n### Pre-merge Conflict Detection\n\n```bash\n# Before merging, check for conflicts\ngit fetch origin main\ngit merge-base origin\u002Fmain HEAD\ngit diff origin\u002Fmain...HEAD --name-only\n\n# Test merge without committing\ngit merge --no-commit --no-ff origin\u002Fmain\n\n# If conflicts, abort and review\ngit merge --abort\n```\n\n### Conflict Resolution Workflow\n\n```bash\n#!\u002Fbin\u002Fbash\n# resolve-conflicts.sh\n\n# Update main\ngit fetch origin main\n\n# Attempt merge\nif git merge origin\u002Fmain; then\n    echo \"✓ Merged cleanly\"\nelse\n    echo \"⚠️  Conflicts detected\"\n\n    # Show conflicts\n    git diff --name-only --diff-filter=U\n\n    # For each conflict\n    git status | grep \"both modified\" | awk '{print $3}' | while read file; do\n        echo \"\"\n        echo \"=== Conflict in: $file ===\"\n\n        # Show conflict markers\n        grep -n \"\u003C\u003C\u003C\u003C\u003C\u003C\u003C HEAD\" \"$file\"\n\n        # Options\n        echo \"1) Keep ours (current branch)\"\n        echo \"2) Keep theirs (main)\"\n        echo \"3) Manual edit\"\n\n        read -p \"Choose (1-3): \" choice\n\n        case $choice in\n            1) git checkout --ours \"$file\" && git add \"$file\" ;;\n            2) git checkout --theirs \"$file\" && git add \"$file\" ;;\n            3) ${EDITOR:-vim} \"$file\" ;;\n        esac\n    done\n\n    # Complete merge\n    git commit -m \"Merge branch 'main' and resolve conflicts\"\nfi\n```\n\n### Rebase for Clean History\n\n```bash\n# Interactive rebase to clean up commits\ngit fetch origin main\ngit rebase -i origin\u002Fmain\n\n# Squash related commits\n# pick abc1234 feat: Add auth\n# squash def5678 fix: Auth typo\n# squash ghi9012 refactor: Auth cleanup\n\n# Force push (only on feature branches!)\ngit push --force-with-lease origin $(git branch --show-current)\n```\n\n## Branch Management\n\n### List Claude Branches\n\n```bash\n# Local Claude branches\ngit branch | grep \"claude\u002F\"\n\n# Remote Claude branches\ngit branch -r | grep \"claude\u002F\"\n\n# With last commit date\ngit for-each-ref --sort=-committerdate refs\u002Fheads\u002Fclaude\u002F \\\n    --format='%(committerdate:short) %(refname:short) %(subject)'\n```\n\n### Clean Up Old Branches\n\n```bash\n#!\u002Fbin\u002Fbash\n# cleanup-claude-branches.sh - Remove merged Claude branches\n\n# Delete local branches that are merged\ngit branch --merged main | grep \"claude\u002F\" | while read branch; do\n    echo \"Deleting merged branch: $branch\"\n    git branch -d \"$branch\"\ndone\n\n# Delete remote branches (be careful!)\nread -p \"Delete remote merged branches? (y\u002Fn) \" -n 1 -r\necho\nif [[ $REPLY =~ ^[Yy]$ ]]; then\n    git branch -r --merged main | grep \"claude\u002F\" | sed 's\u002Forigin\\\u002F\u002F\u002F' | while read branch; do\n        echo \"Deleting remote branch: $branch\"\n        git push origin --delete \"$branch\"\n    done\nfi\n```\n\n### Archive Completed Work\n\n```bash\n# Tag before deleting\ngit tag archive\u002Fclaude-2025-11-18 claude\u002Ffeature-name-session123\ngit push origin archive\u002Fclaude-2025-11-18\ngit branch -d claude\u002Ffeature-name-session123\n```\n\n## Git Configuration for Claude Sessions\n\n### Recommended Settings\n\n```bash\n# Set credentials helper\ngit config --local credential.helper store\n\n# Set push default\ngit config --local push.default current\n\n# Auto-setup remote tracking\ngit config --local push.autoSetupRemote true\n\n# Rebase by default when pulling\ngit config --local pull.rebase true\n\n# Show branch in prompt\ngit config --local oh-my-zsh.hide-status 0\n```\n\n### Session-specific Configuration\n\n```bash\n# Create .git\u002Fconfig settings for Claude sessions\ncat >> .git\u002Fconfig \u003C\u003C EOF\n\n[branch \"claude\u002F*\"]\n    # Auto-setup upstream\n    autoSetupMerge = always\n\n[remote \"origin\"]\n    # Fetch all claude branches\n    fetch = +refs\u002Fheads\u002Fclaude\u002F*:refs\u002Fremotes\u002Forigin\u002Fclaude\u002F*\nEOF\n```\n\n## Troubleshooting\n\n### Issue 1: 403 Error on Push\n\n**Symptoms:**\n```\nerror: failed to push some refs to 'https:\u002F\u002Fgithub.com\u002Fuser\u002Frepo.git'\n! [remote rejected] claude\u002Ffeature-abc123 (permission denied)\n```\n\n**Cause:**\nBranch name doesn't match required `claude\u002F*-[session-id]` format\n\n**Solution:**\n```bash\n# Check current branch name\nCURRENT=$(git branch --show-current)\necho \"Current: $CURRENT\"\n\n# Rename if needed\nSESSION_ID=\"01MtCwKhDQhWyZCgwfkhdVG5\"\nNEW_BRANCH=\"claude\u002Ffeature-name-${SESSION_ID}\"\ngit branch -m \"$CURRENT\" \"$NEW_BRANCH\"\n\n# Push with new name\ngit push -u origin \"$NEW_BRANCH\"\n```\n\n### Issue 2: Network Timeout During Push\n\n**Symptoms:**\n```\nfatal: the remote end hung up unexpectedly\nerror: failed to push some refs\n```\n\n**Cause:**\nIntermittent network issues\n\n**Solution:**\nUse retry logic (see \"Push with Retry Logic\" section)\n\n### Issue 3: Divergent Branches\n\n**Symptoms:**\n```\nhint: You have divergent branches and need to specify how to reconcile them.\n```\n\n**Cause:**\nLocal and remote branches have different histories\n\n**Solution:**\n```bash\n# Option 1: Rebase (cleaner history)\ngit pull --rebase origin $(git branch --show-current)\n\n# Option 2: Merge (preserves all history)\ngit pull --no-rebase origin $(git branch --show-current)\n\n# Option 3: Reset to remote (discard local changes)\ngit reset --hard origin\u002F$(git branch --show-current)\n```\n\n## Best Practices\n\n### ✅ DO\n\n1. **Always use claude\u002F prefix** for session branches\n2. **Include session ID** in branch name\n3. **Push with retry logic** for network resilience\n4. **Create atomic commits** with clear messages\n5. **Rebase before PR** to clean up history\n6. **Test before pushing** to avoid broken builds\n7. **Use conventional commits** for clear history\n8. **Clean up merged branches** regularly\n\n### ❌ DON'T\n\n1. **Don't commit secrets** or credentials\n2. **Don't force push** to main\u002Fmaster\n3. **Don't create generic branch names** without session ID\n4. **Don't skip commit messages** or use placeholders\n5. **Don't leave unresolved conflicts** in commits\n6. **Don't commit large binary files** without LFS\n7. **Don't bypass CI checks** without good reason\n8. **Don't mix unrelated changes** in single commit\n\n## Quick Reference\n\n### Common Commands\n\n```bash\n# Create Claude branch\ngit checkout -b claude\u002Ffeature-name-$(date +%s)\n\n# Push with retry\nfor i in {1..4}; do git push -u origin $(git branch --show-current) && break || sleep $((2**i)); done\n\n# Create PR\ngh pr create --title \"feat: Description\" --body \"Details here\"\n\n# Clean merged branches\ngit branch --merged main | grep \"claude\u002F\" | xargs git branch -d\n\n# Show branch stats\ngit log main..HEAD --oneline --stat\n\n# Squash last 3 commits\ngit rebase -i HEAD~3\n```\n\n### Workflow Cheat Sheet\n\n1. **Start**: `git checkout -b claude\u002F[feature]-[session-id]`\n2. **Work**: Make changes, commit atomically\n3. **Push**: `git push -u origin $(git branch --show-current)` (with retry)\n4. **PR**: `gh pr create` or use GitHub UI\n5. **Merge**: Squash and merge through GitHub\n6. **Clean**: `git branch -d claude\u002F[feature]-[session-id]`\n\n---\n\n**Version**: 1.0.0\n**Author**: Harvested from your_claude_skills repository\n**Last Updated**: 2025-11-18\n**License**: MIT\n\n## Integration with Claude Code\n\nThis skill integrates seamlessly with Claude Code workflows:\n\n- Automatically suggests branch names during session start\n- Provides retry logic for unreliable networks\n- Generates PR descriptions from commit history\n- Handles multi-repo coordination\n- Manages cleanup of old branches\n\nUse this skill at the start of every Claude Code session for optimal Git workflow management! 🚀\n","# Claude Git Branching\n\nMaster Git workflows optimized for Claude Code development sessions with intelligent branching, retry logic, and automated PR creation.\n\n## Overview\n\nThis skill provides battle-tested Git workflows specifically designed for Claude Code sessions, including:\n- Claude-specific branch naming conventions\n- Automatic push retry with exponential backoff\n- Multi-repository coordination\n- Conflict-free collaboration patterns\n- Automated PR creation and management\n\n## When to Use\n\nUse this skill when:\n- Starting a new Claude Code development session\n- Managing multiple feature branches across sessions\n- Dealing with intermittent network issues during push\n- Creating PRs from Claude-generated code\n- Coordinating work across multiple repositories\n- Following team Git conventions for AI-assisted development\n- Handling merge conflicts in long-running sessions\n\n## Branch Naming Conventions\n\n### Claude Code Standard Format\n\n```bash\n# Standard format\nclaude\u002F[feature-name]-[session-id]\n\n# Examples\nclaude\u002Fharvest-claude-skills-01MtCwKhDQhWyZCgwfkhdVG5\nclaude\u002Ffix-auth-bug-01NAB2cDE3FgHiJ4KlM5NoPq\nclaude\u002Fadd-api-endpoints-01PQRsT6UvWxY7ZaBcD8EfGh\n```\n\n**Format requirements:**\n- **Prefix**: Must start with `claude\u002F`\n- **Feature name**: Kebab-case description of work\n- **Session ID**: Unique identifier for the session\n- **Maximum length**: 100 characters recommended\n\n**Why this format?**\n- ✅ Clear AI-assisted development marker\n- ✅ Prevents conflicts with human developer branches\n- ✅ Traceable to specific session\n- ✅ Easy to filter and manage\n- ✅ Works with GitHub access controls (required for push)\n\n### Alternative Formats\n\n```bash\n# Team-based\nclaude\u002F[team]\u002F[feature]-[session-id]\nclaude\u002Fbackend\u002Fapi-optimization-01ABC\n\n# Priority-based\nclaude\u002F[priority]\u002F[feature]-[session-id]\nclaude\u002Furgent\u002Fsecurity-patch-01DEF\n\n# Issue-based\nclaude\u002Fissue-[number]-[session-id]\nclaude\u002Fissue-1234-01GHI\n```\n\n## Branch Creation Workflow\n\n### Step 1: Check Current State\n\n```bash\n# Verify current branch\ngit branch --show-current\n\n# Check status\ngit status\n\n# View recent branches\ngit branch -a | grep \"claude\u002F\" | head -10\n```\n\n### Step 2: Create Feature Branch\n\n```bash\n# From main\u002Fmaster\ngit checkout main\ngit pull origin main\n\n# Create Claude branch\nFEATURE=\"add-user-authentication\"\nSESSION_ID=\"01MtCwKhDQhWyZCgwfkhdVG5\"\nBRANCH=\"claude\u002F${FEATURE}-${SESSION_ID}\"\n\ngit checkout -b \"$BRANCH\"\necho \"Created branch: $BRANCH\"\n```\n\n### Step 3: Verify Branch Name\n\n```bash\n# Ensure proper format\nCURRENT_BRANCH=$(git branch --show-current)\n\nif [[ ! \"$CURRENT_BRANCH\" =~ ^claude\u002F.+-[0-9A-Za-z]{20,}$ ]]; then\n    echo \"⚠️  Warning: Branch name doesn't match Claude format\"\n    echo \"Expected: claude\u002F[feature-name]-[session-id]\"\n    echo \"Got: $CURRENT_BRANCH\"\nfi\n```\n\n## Push with Retry Logic\n\n### Standard Push Pattern\n\n```bash\n#!\u002Fbin\u002Fbash\n# push-with-retry.sh - Push with exponential backoff\n\nBRANCH=$(git branch --show-current)\nMAX_RETRIES=4\nRETRY_COUNT=0\nDELAYS=(2 4 8 16)  # Exponential backoff in seconds\n\necho \"Pushing branch: $BRANCH\"\n\nwhile [ $RETRY_COUNT -lt $MAX_RETRIES ]; do\n    if git push -u origin \"$BRANCH\"; then\n        echo \"✓ Successfully pushed to origin\u002F$BRANCH\"\n        exit 0\n    else\n        EXIT_CODE=$?\n        RETRY_COUNT=$((RETRY_COUNT + 1))\n\n        # Check if it's a 403 error (branch name issue)\n        if git push -u origin \"$BRANCH\" 2>&1 | grep -q \"403\"; then\n            echo \"✗ Push failed with 403 - Check branch naming convention\"\n            echo \"Branch must start with 'claude\u002F' and end with session ID\"\n            exit 1\n        fi\n\n        if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then\n            DELAY=${DELAYS[$RETRY_COUNT-1]}\n            echo \"⚠️  Push failed (attempt $RETRY_COUNT\u002F$MAX_RETRIES)\"\n            echo \"Retrying in ${DELAY}s...\"\n            sleep $DELAY\n        fi\n    fi\ndone\n\necho \"✗ Push failed after $MAX_RETRIES attempts\"\nexit 1\n```\n\n**Usage:**\n```bash\nchmod +x push-with-retry.sh\n.\u002Fpush-with-retry.sh\n```\n\n### Inline Retry Pattern\n\n```bash\n# Quick inline version\nfor i in {1..4}; do\n    if git push -u origin $(git branch --show-current); then\n        echo \"✓ Pushed successfully\"\n        break\n    else\n        [ $i -lt 4 ] && echo \"Retry $i\u002F4...\" && sleep $((2**i))\n    fi\ndone\n```\n\n## Commit Best Practices\n\n### Atomic Commits\n\n```bash\n# Make focused, atomic commits\ngit add src\u002Fauth\u002Flogin.ts\ngit commit -m \"feat: Add JWT-based login authentication\"\n\ngit add src\u002Fauth\u002Fmiddleware.ts\ngit commit -m \"feat: Add auth middleware for protected routes\"\n\ngit add tests\u002Fauth.test.ts\ngit commit -m \"test: Add authentication test suite\"\n```\n\n### Commit Message Format\n\n```bash\n# Format: \u003Ctype>: \u003Cdescription>\n# Types: feat, fix, docs, refactor, test, chore, style, perf\n\ngit commit -m \"$(cat \u003C\u003C'EOF'\nfeat: Add user authentication system\n\n- Implement JWT-based authentication\n- Add login\u002Flogout endpoints\n- Create auth middleware\n- Add session management\n\nCloses #123\nEOF\n)\"\n```\n\n### Conventional Commits\n\n```bash\n# Feature\ngit commit -m \"feat(auth): Add JWT authentication\"\n\n# Bug fix\ngit commit -m \"fix(api): Handle null user in middleware\"\n\n# Documentation\ngit commit -m \"docs(readme): Update authentication setup\"\n\n# Refactoring\ngit commit -m \"refactor(auth): Extract token validation logic\"\n\n# Breaking change\ngit commit -m \"feat(api)!: Change auth response format\n\nBREAKING CHANGE: Auth response now returns user object instead of ID\"\n```\n\n## Pull Request Creation\n\n### Automated PR Creation\n\n```bash\n#!\u002Fbin\u002Fbash\n# create-pr.sh - Create PR with gh CLI\n\nBRANCH=$(git branch --show-current)\nBASE_BRANCH=\"${1:-main}\"\n\n# Ensure we're on a Claude branch\nif [[ ! \"$BRANCH\" =~ ^claude\u002F ]]; then\n    echo \"⚠️  Warning: Not on a Claude branch\"\n    read -p \"Continue anyway? (y\u002Fn) \" -n 1 -r\n    echo\n    [[ ! $REPLY =~ ^[Yy]$ ]] && exit 1\nfi\n\n# Get commit history since divergence\nCOMMITS=$(git log ${BASE_BRANCH}...HEAD --oneline)\nDIFF_STAT=$(git diff ${BASE_BRANCH}...HEAD --stat)\n\n# Analyze changes\nFILES_CHANGED=$(git diff ${BASE_BRANCH}...HEAD --name-only | wc -l)\nLINES_ADDED=$(git diff ${BASE_BRANCH}...HEAD --numstat | awk '{sum+=$1} END {print sum}')\nLINES_REMOVED=$(git diff ${BASE_BRANCH}...HEAD --numstat | awk '{sum+=$2} END {print sum}')\n\necho \"=== PR Summary ===\"\necho \"Branch: $BRANCH\"\necho \"Base: $BASE_BRANCH\"\necho \"Files changed: $FILES_CHANGED\"\necho \"Lines added: $LINES_ADDED\"\necho \"Lines removed: $LINES_REMOVED\"\necho \"\"\n\n# Extract feature description from branch name\nFEATURE=$(echo \"$BRANCH\" | sed 's\u002Fclaude\\\u002F\\(.*\\)-[0-9A-Za-z]\\{20,\\}\u002F\\1\u002F' | tr '-' ' ')\nTITLE=\"feat: ${FEATURE^}\"\n\n# Create PR body\nPR_BODY=\"$(cat \u003C\u003CEOF\n## Summary\n\nThis PR implements ${FEATURE}.\n\n### Changes\n$(git log ${BASE_BRANCH}...HEAD --pretty=format:\"- %s\" | head -10)\n\n### Stats\n- **Files changed**: $FILES_CHANGED\n- **Lines added**: $LINES_ADDED\n- **Lines removed**: $LINES_REMOVED\n\n### Test Plan\n- [ ] Code builds successfully\n- [ ] Tests pass\n- [ ] Manual testing completed\n- [ ] Documentation updated\n\n### Checklist\n- [ ] Code follows project conventions\n- [ ] No console errors or warnings\n- [ ] Security considerations reviewed\n- [ ] Performance impact assessed\n\n---\n*Generated by Claude Code session*\nEOF\n)\"\n\n# Push if needed\necho \"Ensuring branch is pushed...\"\ngit push -u origin \"$BRANCH\" 2>&1 | grep -v \"up-to-date\" || true\n\n# Create PR\necho \"\"\necho \"Creating pull request...\"\ngh pr create \\\n    --base \"$BASE_BRANCH\" \\\n    --head \"$BRANCH\" \\\n    --title \"$TITLE\" \\\n    --body \"$PR_BODY\"\n\nif [ $? -eq 0 ]; then\n    echo \"✓ PR created successfully\"\n    gh pr view --web\nelse\n    echo \"✗ Failed to create PR\"\n    exit 1\nfi\n```\n\n### PR Templates\n\n```markdown\n\u003C!-- .github\u002FPULL_REQUEST_TEMPLATE.md -->\n\n## Description\n\u003C!-- Describe your changes in detail -->\n\n## Type of Change\n- [ ] 🎯 New feature\n- [ ] 🐛 Bug fix\n- [ ] 📚 Documentation update\n- [ ] ♻️ Refactoring\n- [ ] ⚡ Performance improvement\n- [ ] ✅ Test addition\u002Fupdate\n\n## Claude Code Session\n- **Branch**: `[branch-name]`\n- **Session ID**: `[session-id]`\n- **Duration**: `[time spent]`\n\n## Changes Made\n- Change 1\n- Change 2\n- Change 3\n\n## Testing\n- [ ] Unit tests added\u002Fupdated\n- [ ] Integration tests pass\n- [ ] Manual testing completed\n- [ ] No regressions identified\n\n## Checklist\n- [ ] Code follows project style guide\n- [ ] Self-review completed\n- [ ] Comments added for complex logic\n- [ ] Documentation updated\n- [ ] No new warnings introduced\n\n## Screenshots (if applicable)\n\u003C!-- Add screenshots for UI changes -->\n\n## Related Issues\n\u003C!-- Link related issues: Fixes #123, Relates to #456 -->\n```\n\n## Multi-Repository Management\n\n### Coordinating Across Repos\n\n```bash\n#!\u002Fbin\u002Fbash\n# sync-multi-repo.sh - Sync work across multiple repositories\n\nREPOS=(\n    \"\u002Fpath\u002Fto\u002Ffrontend\"\n    \"\u002Fpath\u002Fto\u002Fbackend\"\n    \"\u002Fpath\u002Fto\u002Fshared-lib\"\n)\n\nBRANCH_PREFIX=\"claude\u002Fsync-auth-update\"\nSESSION_ID=\"01MtCwKhDQhWyZCgwfkhdVG5\"\n\nfor REPO in \"${REPOS[@]}\"; do\n    echo \"=== Processing: $REPO ===\"\n    cd \"$REPO\" || continue\n\n    REPO_NAME=$(basename \"$REPO\")\n    BRANCH=\"${BRANCH_PREFIX}-${REPO_NAME}-${SESSION_ID}\"\n\n    # Create branch\n    git checkout -b \"$BRANCH\" 2>\u002Fdev\u002Fnull || git checkout \"$BRANCH\"\n\n    echo \"Ready for changes in: $BRANCH\"\n    echo \"\"\ndone\n```\n\n### Batch Commit and Push\n\n```bash\n#!\u002Fbin\u002Fbash\n# commit-multi-repo.sh - Commit across multiple repos\n\nREPOS=(\"frontend\" \"backend\" \"shared-lib\")\nCOMMIT_MSG=\"$1\"\n\nif [ -z \"$COMMIT_MSG\" ]; then\n    echo \"Usage: $0 \u003Ccommit-message>\"\n    exit 1\nfi\n\nfor REPO in \"${REPOS[@]}\"; do\n    echo \"=== $REPO ===\"\n    cd \"$REPO\" || continue\n\n    # Check if there are changes\n    if [ -n \"$(git status --porcelain)\" ]; then\n        git add .\n        git commit -m \"$COMMIT_MSG\"\n\n        # Push with retry\n        for i in {1..4}; do\n            if git push -u origin $(git branch --show-current); then\n                echo \"✓ Pushed $REPO\"\n                break\n            else\n                [ $i -lt 4 ] && sleep $((2**i))\n            fi\n        done\n    else\n        echo \"No changes in $REPO\"\n    fi\n\n    cd - > \u002Fdev\u002Fnull\n    echo \"\"\ndone\n```\n\n## Conflict Resolution\n\n### Pre-merge Conflict Detection\n\n```bash\n# Before merging, check for conflicts\ngit fetch origin main\ngit merge-base origin\u002Fmain HEAD\ngit diff origin\u002Fmain...HEAD --name-only\n\n# Test merge without committing\ngit merge --no-commit --no-ff origin\u002Fmain\n\n# If conflicts, abort and review\ngit merge --abort\n```\n\n### Conflict Resolution Workflow\n\n```bash\n#!\u002Fbin\u002Fbash\n# resolve-conflicts.sh\n\n# Update main\ngit fetch origin main\n\n# Attempt merge\nif git merge origin\u002Fmain; then\n    echo \"✓ Merged cleanly\"\nelse\n    echo \"⚠️  Conflicts detected\"\n\n    # Show conflicts\n    git diff --name-only --diff-filter=U\n\n    # For each conflict\n    git status | grep \"both modified\" | awk '{print $3}' | while read file; do\n        echo \"\"\n        echo \"=== Conflict in: $file ===\"\n\n        # Show conflict markers\n        grep -n \"\u003C\u003C\u003C\u003C\u003C\u003C\u003C HEAD\" \"$file\"\n\n        # Options\n        echo \"1) Keep ours (current branch)\"\n        echo \"2) Keep theirs (main)\"\n        echo \"3) Manual edit\"\n\n        read -p \"Choose (1-3): \" choice\n\n        case $choice in\n            1) git checkout --ours \"$file\" && git add \"$file\" ;;\n            2) git checkout --theirs \"$file\" && git add \"$file\" ;;\n            3) ${EDITOR:-vim} \"$file\" ;;\n        esac\n    done\n\n    # Complete merge\n    git commit -m \"Merge branch 'main' and resolve conflicts\"\nfi\n```\n\n### Rebase for Clean History\n\n```bash\n# Interactive rebase to clean up commits\ngit fetch origin main\ngit rebase -i origin\u002Fmain\n\n# Squash related commits\n# pick abc1234 feat: Add auth\n# squash def5678 fix: Auth typo\n# squash ghi9012 refactor: Auth cleanup\n\n# Force push (only on feature branches!)\ngit push --force-with-lease origin $(git branch --show-current)\n```\n\n## Branch Management\n\n### List Claude Branches\n\n```bash\n# Local Claude branches\ngit branch | grep \"claude\u002F\"\n\n# Remote Claude branches\ngit branch -r | grep \"claude\u002F\"\n\n# With last commit date\ngit for-each-ref --sort=-committerdate refs\u002Fheads\u002Fclaude\u002F \\\n    --format='%(committerdate:short) %(refname:short) %(subject)'\n```\n\n### Clean Up Old Branches\n\n```bash\n#!\u002Fbin\u002Fbash\n# cleanup-claude-branches.sh - Remove merged Claude branches\n\n# Delete local branches that are merged\ngit branch --merged main | grep \"claude\u002F\" | while read branch; do\n    echo \"Deleting merged branch: $branch\"\n    git branch -d \"$branch\"\ndone\n\n# Delete remote branches (be careful!)\nread -p \"Delete remote merged branches? (y\u002Fn) \" -n 1 -r\necho\nif [[ $REPLY =~ ^[Yy]$ ]]; then\n    git branch -r --merged main | grep \"claude\u002F\" | sed 's\u002Forigin\\\u002F\u002F\u002F' | while read branch; do\n        echo \"Deleting remote branch: $branch\"\n        git push origin --delete \"$branch\"\n    done\nfi\n```\n\n### Archive Completed Work\n\n```bash\n# Tag before deleting\ngit tag archive\u002Fclaude-2025-11-18 claude\u002Ffeature-name-session123\ngit push origin archive\u002Fclaude-2025-11-18\ngit branch -d claude\u002Ffeature-name-session123\n```\n\n## Git Configuration for Claude Sessions\n\n### Recommended Settings\n\n```bash\n# Set credentials helper\ngit config --local credential.helper store\n\n# Set push default\ngit config --local push.default current\n\n# Auto-setup remote tracking\ngit config --local push.autoSetupRemote true\n\n# Rebase by default when pulling\ngit config --local pull.rebase true\n\n# Show branch in prompt\ngit config --local oh-my-zsh.hide-status 0\n```\n\n### Session-specific Configuration\n\n```bash\n# Create .git\u002Fconfig settings for Claude sessions\ncat >> .git\u002Fconfig \u003C\u003C EOF\n\n[branch \"claude\u002F*\"]\n    # Auto-setup upstream\n    autoSetupMerge = always\n\n[remote \"origin\"]\n    # Fetch all claude branches\n    fetch = +refs\u002Fheads\u002Fclaude\u002F*:refs\u002Fremotes\u002Forigin\u002Fclaude\u002F*\nEOF\n```\n\n## Troubleshooting\n\n### Issue 1: 403 Error on Push\n\n**Symptoms:**\n```\nerror: failed to push some refs to 'https:\u002F\u002Fgithub.com\u002Fuser\u002Frepo.git'\n! [remote rejected] claude\u002Ffeature-abc123 (permission denied)\n```\n\n**Cause:**\nBranch name doesn't match required `claude\u002F*-[session-id]` format\n\n**Solution:**\n```bash\n# Check current branch name\nCURRENT=$(git branch --show-current)\necho \"Current: $CURRENT\"\n\n# Rename if needed\nSESSION_ID=\"01MtCwKhDQhWyZCgwfkhdVG5\"\nNEW_BRANCH=\"claude\u002Ffeature-name-${SESSION_ID}\"\ngit branch -m \"$CURRENT\" \"$NEW_BRANCH\"\n\n# Push with new name\ngit push -u origin \"$NEW_BRANCH\"\n```\n\n### Issue 2: Network Timeout During Push\n\n**Symptoms:**\n```\nfatal: the remote end hung up unexpectedly\nerror: failed to push some refs\n```\n\n**Cause:**\nIntermittent network issues\n\n**Solution:**\nUse retry logic (see \"Push with Retry Logic\" section)\n\n### Issue 3: Divergent Branches\n\n**Symptoms:**\n```\nhint: You have divergent branches and need to specify how to reconcile them.\n```\n\n**Cause:**\nLocal and remote branches have different histories\n\n**Solution:**\n```bash\n# Option 1: Rebase (cleaner history)\ngit pull --rebase origin $(git branch --show-current)\n\n# Option 2: Merge (preserves all history)\ngit pull --no-rebase origin $(git branch --show-current)\n\n# Option 3: Reset to remote (discard local changes)\ngit reset --hard origin\u002F$(git branch --show-current)\n```\n\n## Best Practices\n\n### ✅ DO\n\n1. **Always use claude\u002F prefix** for session branches\n2. **Include session ID** in branch name\n3. **Push with retry logic** for network resilience\n4. **Create atomic commits** with clear messages\n5. **Rebase before PR** to clean up history\n6. **Test before pushing** to avoid broken builds\n7. **Use conventional commits** for clear history\n8. **Clean up merged branches** regularly\n\n### ❌ DON'T\n\n1. **Don't commit secrets** or credentials\n2. **Don't force push** to main\u002Fmaster\n3. **Don't create generic branch names** without session ID\n4. **Don't skip commit messages** or use placeholders\n5. **Don't leave unresolved conflicts** in commits\n6. **Don't commit large binary files** without LFS\n7. **Don't bypass CI checks** without good reason\n8. **Don't mix unrelated changes** in single commit\n\n## Quick Reference\n\n### Common Commands\n\n```bash\n# Create Claude branch\ngit checkout -b claude\u002Ffeature-name-$(date +%s)\n\n# Push with retry\nfor i in {1..4}; do git push -u origin $(git branch --show-current) && break || sleep $((2**i)); done\n\n# Create PR\ngh pr create --title \"feat: Description\" --body \"Details here\"\n\n# Clean merged branches\ngit branch --merged main | grep \"claude\u002F\" | xargs git branch -d\n\n# Show branch stats\ngit log main..HEAD --oneline --stat\n\n# Squash last 3 commits\ngit rebase -i HEAD~3\n```\n\n### Workflow Cheat Sheet\n\n1. **Start**: `git checkout -b claude\u002F[feature]-[session-id]`\n2. **Work**: Make changes, commit atomically\n3. **Push**: `git push -u origin $(git branch --show-current)` (with retry)\n4. **PR**: `gh pr create` or use GitHub UI\n5. **Merge**: Squash and merge through GitHub\n6. **Clean**: `git branch -d claude\u002F[feature]-[session-id]`\n\n---\n\n**Version**: 1.0.0\n**Author**: Harvested from your_claude_skills repository\n**Last Updated**: 2025-11-18\n**License**: MIT\n\n## Integration with Claude Code\n\nThis skill integrates seamlessly with Claude Code workflows:\n\n- Automatically suggests branch names during session start\n- Provides retry logic for unreliable networks\n- Generates PR descriptions from commit history\n- Handles multi-repo coordination\n- Manages cleanup of old branches\n\nUse this skill at the start of every Claude Code session for optimal Git workflow management! 🚀\n",{"name":5,"tags":23,"license":14,"description":7},[24,25,26,27,28,29],"git","workflow","branching","claude-code","version-control","automation","main","6b73b29e4866f997b1eb47fe8d9631396265fc24",0,"https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn","2026-09-09 16:06:07",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add davidanthonyn\u002Fagent-skills --skill claude-git-branching",{"tool":42,"command":43},"bunx","bunx skills add davidanthonyn\u002Fagent-skills --skill claude-git-branching",{"tool":45,"command":46},"pnpm","pnpm dlx skills add davidanthonyn\u002Fagent-skills --skill claude-git-branching","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fclaude-git-branching\u002FSKILL.md",true,[],[51,58,66,73,80,89],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7AQNJDXVNVMN08N5BHBGZBF","zustand-state-management","Production-tested setup for Zustand state management in React applications with TypeScript.\nThis skill provides comprehensive patterns for building scalable, type-safe global state.\n\nUse when: setting up global state in React, migrating from Redux or Context API, implementing\nstate persistence with localStorage, configuring TypeScript with Zustand, using slices pattern\nfor modular stores, adding devtools middleware for debugging, handling Next.js SSR hydration,\nor encountering hydration errors, TypeScript inference issues, or persist middleware problems.\n\nPrevents 5 documented issues: Next.js hydration mismatches, TypeScript double parentheses\nsyntax errors, persist middleware export errors, infinite render loops, and slices pattern\ntype inference failures.\n\nKeywords: zustand, state management, React state, TypeScript state, persist middleware,\ndevtools, slices pattern, global state, React hooks, create store, useBoundStore,\nStateCreator, hydration error, text content mismatch, infinite render, localStorage,\nsessionStorage, immer middleware, shallow equality, selector pattern, zustand v5","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fzustand-state-management\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":62,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M7AQN2DW9DTPM8BYNZSHQANC","zetic-mlange","Help users integrate the ZETIC Melange (MLange) on-device AI SDK into Android (Kotlin\u002FJava) and iOS (Swift) mobile apps. Use this skill whenever the user mentions Zetic, MLange, Melange, ZeticMLangeModel, ZeticMLangeLLMModel, ZeticMLangeHFModel, on-device NPU inference for mobile, or deploying ML models to Android\u002FiOS with NPU acceleration. Also trigger when users ask about running LLMs on-device with GGUF quantization, mobile NPU model deployment, or converting PyTorch\u002FONNX models for mobile inference. Covers general model inference, LLM inference (streaming token generation), and HuggingFace model loading.","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fzetic-mlange\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fzetic-mlange\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7AQMEK370FBPC75N2W8WA4W","youtube-downloader","Download videos, audio, playlists, and channels from YouTube and 1000+ websites using yt-dlp. Supports quality selection, format conversion, subtitle download, playlist filtering, metadata extraction, thumbnail download, and batch operations. Use when downloading YouTube videos in any quality (4K, 8K, HDR), extracting audio as MP3\u002FM4A\u002FFLAC, downloading entire playlists\u002Fchannels, getting subtitles in multiple languages, converting to specific formats, downloading live streams, archiving content, or batch processing multiple URLs. Optimized for reliability with automatic retries, rate limiting, and error handling.","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7AQHKQ4VQB04NH6BG4SV9Q7","wordpress-plugin-core","This skill provides comprehensive knowledge for WordPress plugin development, covering core patterns, security best practices, database interactions, hooks\u002Ffilters, Settings API, custom post types, REST API, and AJAX. This skill should be used when creating WordPress plugins, troubleshooting security issues, implementing custom post types\u002Ftaxonomies, building admin interfaces, or working with the WordPress database.\n\nUse when: Creating new WordPress plugins, implementing nonces\u002Fsanitization\u002Fescaping, working with $wpdb and prepared statements, building Settings API pages, registering custom post types or taxonomies, implementing REST API endpoints, handling AJAX requests, debugging plugin activation\u002Fdeactivation issues, preventing SQL injection\u002FXSS\u002FCSRF vulnerabilities.\n\nKeywords: wordpress plugin development, wordpress security, wordpress hooks, wordpress filters, wordpress database, wpdb prepare, sanitize_text_field, esc_html, wp_nonce, custom post type, register_post_type, settings api, rest api, admin-ajax, wordpress sql injection, wordpress xss, wordpress csrf, plugin header, activation hook, deactivation hook, wordpress coding standards, wordpress plugin architecture","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fwordpress-plugin-core\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":84,"licenseFileUrl":85,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7AQH4JW8F2MJFS1C43TZ2TY","webapp-testing","Test local web applications with Playwright. Use when asked to verify frontend functionality, debug UI behavior, capture browser screenshots, or inspect browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M7AQH0PWD6Z1NN66V15DT25M","web-performance-audit","Audit web performance using Chrome DevTools MCP. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed.","https:\u002F\u002Fgithub.com\u002Fdavidanthonyn\u002Fagent-skills\u002Fblob\u002Fmain\u002Fweb-performance-audit\u002FSKILL.md",[],[]]