[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6RTQZM2W4D883XGA5B23RF4":3,"skill-same:01M6RTQZM2W4D883XGA5B23RF4":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":43,"commitSha":44,"skillDirectory":5,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M6RTQZM2W4D883XGA5B23RF4","git-merge-branch",null,"Merge current branch to a target branch. Use when the user wants to merge their current branch to another branch (e.g., qa, master, develop).","ZhaoYis\u002FMy-Skills","ZhaoYis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F22954818?v=4","01M6RTMA12BZDGXFDESDB627H0","大師兄丶","01M6RTMA5H8NVC8J3KZPJQF4GP",2,"MIT","https:\u002F\u002Fgithub.com\u002FZhaoYis\u002FMy-Skills\u002Fblob\u002Fmain\u002Fgit-merge-branch\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"merge","git merge","git","branch","git merge branch","cli","qa","repository","develop","user","use","master","git cli","when","2026-11-10 10:12:30",false,"---\nname: git-merge-branch\ndescription: Merge current branch to a target branch. Use when the user wants to merge their current branch to another branch (e.g., qa, master, develop).\nlicense: MIT\ncompatibility: Requires git CLI and a git repository.\nmetadata:\n  author: zhaoyi\n  version: \"1.2\"\n  generatedBy: \"1.0.0\"\n---\n\nMerge current branch to a target branch.\n\n**Input**: The skill will prompt for the target branch name before executing.\n\n**Steps**\n\n1. **Pre-merge checks**\n\n   Run `git status` to check for:\n   - Uncommitted changes (staged or unstaged)\n   - Untracked files\n\n   **If there are uncommitted changes:**\n   - Warn user and ask how to proceed:\n     - Stash changes and continue\n     - Commit changes first\n     - Cancel merge\n\n   Run `git branch --show-current` to get the current branch name.\n\n   Run `git log origin\u002F\u003Ccurrent-branch>..HEAD --oneline` to check if local is ahead of remote.\n\n   **If current branch not pushed to remote:**\n   - Warn user: \"Current branch has unpushed commits\"\n   - Ask if they want to push first or proceed anyway\n\n2. **Get available branches**\n\n   Run `git branch -a` to list all available branches (local and remote).\n\n   Show current branch and uncommitted changes status.\n\n3. **Prompt for target branch**\n\n   Use **AskUserQuestion tool** to ask the user which branch they want to merge into.\n\n   Show:\n   - Current branch name\n   - List of common target branches (filtered from local branches)\n   - Allow custom input for other branch names\n\n   Example prompt:\n   ```\n   当前分支: feature\u002Fxxx\n   未提交变更: 0 个文件\n\n   请选择目标合并分支:\n   - master\n   - qa\n   - stg\n   - 其他 (手动输入)\n   ```\n\n4. **Prompt for merge strategy**\n\n   Use **AskUserQuestion tool** to ask for merge strategy:\n\n   **Merge strategies:**\n   - **Default merge**: `git merge \u003Cbranch>` - Standard merge with merge commit\n   - **Squash merge**: `git merge --squash \u003Cbranch>` - Squash all commits into one\n   - **No-ff merge**: `git merge --no-ff \u003Cbranch>` - Always create merge commit\n\n   Default: Standard merge\n\n5. **Fetch and update target branch**\n\n   Before merging, ensure target branch is up to date:\n   ```bash\n   git fetch origin \u003Ctarget-branch>\n   git checkout \u003Ctarget-branch>\n   git pull origin \u003Ctarget-branch>\n   ```\n\n6. **Perform merge**\n\n   Execute merge with selected strategy:\n   ```bash\n   git merge \u003Csource-branch> -m \"Merge branch '\u003Csource-branch>' into \u003Ctarget-branch>\"\n   ```\n\n   Or with squash:\n   ```bash\n   git merge --squash \u003Csource-branch>\n   git commit -m \"Merge branch '\u003Csource-branch>' into \u003Ctarget-branch> (squashed)\"\n   ```\n\n   **If merge conflicts occur:**\n   - Show conflict files: `git diff --name-only --diff-filter=U`\n   - Show conflict summary\n   - Ask user how to resolve:\n     1. Abort merge\n     2. Manual resolve (wait for user to resolve)\n     3. Use theirs\u002Fours for specific files\n\n   **If abort:**\n   ```bash\n   git merge --abort\n   ```\n   Exit and inform user.\n\n7. **Push to remote**\n\n   After successful merge:\n   ```bash\n   git push origin \u003Ctarget-branch>\n   ```\n\n8. **Switch back to source branch**\n\n   **IMPORTANT**: Always switch back to the source branch after merge by default.\n\n   Return to the original branch:\n   ```bash\n   git checkout \u003Csource-branch>\n   ```\n\n9. **Post-merge options (optional)**\n\n   After switching back, ask user if they want to delete the source branch:\n\n   **Options (multi-select):**\n   - **Keep branch (default)**: No action needed, continue development on source branch\n   - **Delete local branch**: `git branch -d \u003Csource-branch>` (only if user explicitly selects)\n   - **Delete remote branch**: `git push origin --delete \u003Csource-branch>` (only if user explicitly selects)\n\n   **Default behavior**: Keep the source branch and continue working on it.\n\n   **If user chooses to delete:**\n   - Execute deletion commands\n   - Stay on target branch (since source branch no longer exists)\n\n10. **Display summary**\n\n    Show:\n    - Source branch\n    - Target branch\n    - Merge strategy used\n    - Merge commit hash\n    - Files changed count\n    - Push status\n    - Branch deletion status (if applicable)\n\n**Output On Success**\n\n```\n## Merge Complete\n\n**Source:** \u003Csource-branch>\n**Target:** \u003Ctarget-branch>\n**Strategy:** Standard \u002F Squash \u002F No-ff\n**Commit:** \u003Cmerge-commit-hash>\n\n\u003Csource-branch> ──► \u003Ctarget-branch>\n\n**Changes merged:** \u003Ccount> files (+\u003Cadditions>, -\u003Cdeletions>)\n\n**Post-merge:**\n- Source branch kept: Yes (default) \u002F No (deleted)\n- Switched back to: \u003Csource-branch>\n\n**Remote:** \u003Cremote-url>\n```\n\n**Output On Conflict**\n\n```\n## Merge Conflict\n\n**Source:** \u003Csource-branch>\n**Target:** \u003Ctarget-branch>\n\n**Conflicted files (\u003Ccount>):**\n- \u003Cfile1>\n- \u003Cfile2>\n\n**Options:**\n1. Abort merge\n2. Manual resolve (I'll wait for you to resolve)\n3. Use \"theirs\" for all conflicts\n4. Use \"ours\" for all conflicts\n\nWhat would you like to do?\n```\n\n**Merge Strategy Guide**\n\n| Strategy | Use Case | Pros | Cons |\n|----------|----------|------|------|\n| Standard | Feature branches | Preserves history | Multiple merge commits |\n| Squash | Small features, WIP | Clean history | Loses individual commits |\n| No-ff | Release branches | Clear merge point | Extra merge commit |\n\n**Guardrails**\n\n- Always check for uncommitted changes before merging\n- Always check if source branch is pushed to remote\n- Always prompt for target branch name before merging\n- Always prompt for merge strategy\n- Always fetch and pull target branch before merging\n- **Always switch back to source branch after merge (default behavior)**\n- **Keep source branch by default, only delete if user explicitly requests**\n- Never force push without explicit user request\n- Show clear summary of what happened\n- Handle merge conflicts gracefully\n\n**Common Target Branches**\n\nWhen prompting, show these common branches if they exist:\n- `master` \u002F `main`\n- `qa`\n- `stg`\n- `develop`\n\n**Error Handling**\n\n- If uncommitted changes: Ask user how to proceed (stash\u002Fcommit\u002Fcancel)\n- If source branch not pushed: Warn and ask to proceed or push first\n- If target branch doesn't exist: Show error and suggest available branches\n- If merge fails with conflicts: Show conflicted files and prompt for resolution\n- If push fails: Show error message and suggest resolution\n","Merge current branch to a target branch.\n\n**Input**: The skill will prompt for the target branch name before executing.\n\n**Steps**\n\n1. **Pre-merge checks**\n\n   Run `git status` to check for:\n   - Uncommitted changes (staged or unstaged)\n   - Untracked files\n\n   **If there are uncommitted changes:**\n   - Warn user and ask how to proceed:\n     - Stash changes and continue\n     - Commit changes first\n     - Cancel merge\n\n   Run `git branch --show-current` to get the current branch name.\n\n   Run `git log origin\u002F\u003Ccurrent-branch>..HEAD --oneline` to check if local is ahead of remote.\n\n   **If current branch not pushed to remote:**\n   - Warn user: \"Current branch has unpushed commits\"\n   - Ask if they want to push first or proceed anyway\n\n2. **Get available branches**\n\n   Run `git branch -a` to list all available branches (local and remote).\n\n   Show current branch and uncommitted changes status.\n\n3. **Prompt for target branch**\n\n   Use **AskUserQuestion tool** to ask the user which branch they want to merge into.\n\n   Show:\n   - Current branch name\n   - List of common target branches (filtered from local branches)\n   - Allow custom input for other branch names\n\n   Example prompt:\n   ```\n   当前分支: feature\u002Fxxx\n   未提交变更: 0 个文件\n\n   请选择目标合并分支:\n   - master\n   - qa\n   - stg\n   - 其他 (手动输入)\n   ```\n\n4. **Prompt for merge strategy**\n\n   Use **AskUserQuestion tool** to ask for merge strategy:\n\n   **Merge strategies:**\n   - **Default merge**: `git merge \u003Cbranch>` - Standard merge with merge commit\n   - **Squash merge**: `git merge --squash \u003Cbranch>` - Squash all commits into one\n   - **No-ff merge**: `git merge --no-ff \u003Cbranch>` - Always create merge commit\n\n   Default: Standard merge\n\n5. **Fetch and update target branch**\n\n   Before merging, ensure target branch is up to date:\n   ```bash\n   git fetch origin \u003Ctarget-branch>\n   git checkout \u003Ctarget-branch>\n   git pull origin \u003Ctarget-branch>\n   ```\n\n6. **Perform merge**\n\n   Execute merge with selected strategy:\n   ```bash\n   git merge \u003Csource-branch> -m \"Merge branch '\u003Csource-branch>' into \u003Ctarget-branch>\"\n   ```\n\n   Or with squash:\n   ```bash\n   git merge --squash \u003Csource-branch>\n   git commit -m \"Merge branch '\u003Csource-branch>' into \u003Ctarget-branch> (squashed)\"\n   ```\n\n   **If merge conflicts occur:**\n   - Show conflict files: `git diff --name-only --diff-filter=U`\n   - Show conflict summary\n   - Ask user how to resolve:\n     1. Abort merge\n     2. Manual resolve (wait for user to resolve)\n     3. Use theirs\u002Fours for specific files\n\n   **If abort:**\n   ```bash\n   git merge --abort\n   ```\n   Exit and inform user.\n\n7. **Push to remote**\n\n   After successful merge:\n   ```bash\n   git push origin \u003Ctarget-branch>\n   ```\n\n8. **Switch back to source branch**\n\n   **IMPORTANT**: Always switch back to the source branch after merge by default.\n\n   Return to the original branch:\n   ```bash\n   git checkout \u003Csource-branch>\n   ```\n\n9. **Post-merge options (optional)**\n\n   After switching back, ask user if they want to delete the source branch:\n\n   **Options (multi-select):**\n   - **Keep branch (default)**: No action needed, continue development on source branch\n   - **Delete local branch**: `git branch -d \u003Csource-branch>` (only if user explicitly selects)\n   - **Delete remote branch**: `git push origin --delete \u003Csource-branch>` (only if user explicitly selects)\n\n   **Default behavior**: Keep the source branch and continue working on it.\n\n   **If user chooses to delete:**\n   - Execute deletion commands\n   - Stay on target branch (since source branch no longer exists)\n\n10. **Display summary**\n\n    Show:\n    - Source branch\n    - Target branch\n    - Merge strategy used\n    - Merge commit hash\n    - Files changed count\n    - Push status\n    - Branch deletion status (if applicable)\n\n**Output On Success**\n\n```\n## Merge Complete\n\n**Source:** \u003Csource-branch>\n**Target:** \u003Ctarget-branch>\n**Strategy:** Standard \u002F Squash \u002F No-ff\n**Commit:** \u003Cmerge-commit-hash>\n\n\u003Csource-branch> ──► \u003Ctarget-branch>\n\n**Changes merged:** \u003Ccount> files (+\u003Cadditions>, -\u003Cdeletions>)\n\n**Post-merge:**\n- Source branch kept: Yes (default) \u002F No (deleted)\n- Switched back to: \u003Csource-branch>\n\n**Remote:** \u003Cremote-url>\n```\n\n**Output On Conflict**\n\n```\n## Merge Conflict\n\n**Source:** \u003Csource-branch>\n**Target:** \u003Ctarget-branch>\n\n**Conflicted files (\u003Ccount>):**\n- \u003Cfile1>\n- \u003Cfile2>\n\n**Options:**\n1. Abort merge\n2. Manual resolve (I'll wait for you to resolve)\n3. Use \"theirs\" for all conflicts\n4. Use \"ours\" for all conflicts\n\nWhat would you like to do?\n```\n\n**Merge Strategy Guide**\n\n| Strategy | Use Case | Pros | Cons |\n|----------|----------|------|------|\n| Standard | Feature branches | Preserves history | Multiple merge commits |\n| Squash | Small features, WIP | Clean history | Loses individual commits |\n| No-ff | Release branches | Clear merge point | Extra merge commit |\n\n**Guardrails**\n\n- Always check for uncommitted changes before merging\n- Always check if source branch is pushed to remote\n- Always prompt for target branch name before merging\n- Always prompt for merge strategy\n- Always fetch and pull target branch before merging\n- **Always switch back to source branch after merge (default behavior)**\n- **Keep source branch by default, only delete if user explicitly requests**\n- Never force push without explicit user request\n- Show clear summary of what happened\n- Handle merge conflicts gracefully\n\n**Common Target Branches**\n\nWhen prompting, show these common branches if they exist:\n- `master` \u002F `main`\n- `qa`\n- `stg`\n- `develop`\n\n**Error Handling**\n\n- If uncommitted changes: Ask user how to proceed (stash\u002Fcommit\u002Fcancel)\n- If source branch not pushed: Warn and ask to proceed or push first\n- If target branch doesn't exist: Show error and suggest available branches\n- If merge fails with conflicts: Show conflicted files and prompt for resolution\n- If push fails: Show error message and suggest resolution\n",{"name":5,"license":15,"metadata":38,"description":7,"compatibility":42},{"author":39,"version":40,"generatedBy":41},"zhaoyi","1.2","1.0.0","Requires git CLI and a git repository.","main","f1f3386d8df37cca07033d73addfae1eb9968c30",0,"https:\u002F\u002Fgithub.com\u002FZhaoYis\u002FMy-Skills","https:\u002F\u002Fopsx.dsx.plus","https:\u002F\u002Fgithub.com\u002FZhaoYis","http:\u002F\u002Fwww.cnblogs.com\u002Fzhao-yi","2026-10-08 22:53:14",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add ZhaoYis\u002FMy-Skills --skill git-merge-branch",{"tool":57,"command":58},"bunx","bunx skills add ZhaoYis\u002FMy-Skills --skill git-merge-branch",{"tool":60,"command":61},"pnpm","pnpm dlx skills add ZhaoYis\u002FMy-Skills --skill git-merge-branch","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FZhaoYis\u002FMy-Skills\u002Fblob\u002Fmain\u002Fgit-merge-branch\u002FSKILL.md",true,[],[66,87,103,122,142,165],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":77,"publishedAt":33},"01M6RTSEX8VAMKNV3PYC3TCX05","opsx-dev-pipeline","OpenSpec + Git 需求开发全流程。","https:\u002F\u002Fgithub.com\u002FZhaoYis\u002FMy-Skills\u002Fblob\u002Fmain\u002Fopsx-dev-pipeline\u002FSKILL.md",[72],{"categoryNo":73,"categoryName":74,"taxonomyType":75,"taxonomyTypeDesc":76},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[78,79,80,81,24,82,21,83,84,85,86,31],"dev","pipeline","dev pipeline","opsx dev pipeline","config","yaml","cursor","schema","openspec",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":33},"01M6RTQV3CXBKB3WP295FNJ3R3","git-commit-push","Commit and push code changes to the remote repository. Use when the user wants to commit their changes and push to remote.","https:\u002F\u002Fgithub.com\u002FZhaoYis\u002FMy-Skills\u002Fblob\u002Fmain\u002Fgit-commit-push\u002FSKILL.md",[],[94,95,21,96,97,98,24,99,26,100,28,29,101,31,102,32],"commit","git commit","push","commit push","git commit push","code","commit and push","remote","changes",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":115,"publishedAt":33},"01M6RTQMV7BCRR39HMC7G8F03J","git-code-review","Review uncommitted or committed changes in the current branch and generate a code review report. Use when the user wants to review their changes before or after committing.","https:\u002F\u002Fgithub.com\u002FZhaoYis\u002FMy-Skills\u002Fblob\u002Fmain\u002Fgit-code-review\u002FSKILL.md",[109,114],{"categoryNo":110,"categoryName":111,"taxonomyType":112,"taxonomyTypeDesc":113},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",{"categoryNo":73,"categoryName":74,"taxonomyType":75,"taxonomyTypeDesc":76},[116,117,99,21,118,24,119,120,26,22,28,29,31,102,121,32],"code review","review","git code review","generate","report","review report",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":130,"publishedAt":33},"01M6RTQ2V53GDEYSY384BJ15S8","file-code-review","Review specified files or code snippets against project conventions and generate a code review report. Use when the user wants to review specific files (e.g., \"review this file\", \"审查这个文件\") or code blocks (e.g., \"review this code\", \"审查这段代码\") without git context. Supports single file, multiple files, or pasted code snippets.","https:\u002F\u002Fgithub.com\u002FZhaoYis\u002FMy-Skills\u002Fblob\u002Fmain\u002Ffile-code-review\u002FSKILL.md",[128,129],{"categoryNo":110,"categoryName":111,"taxonomyType":112,"taxonomyTypeDesc":113},{"categoryNo":73,"categoryName":74,"taxonomyType":75,"taxonomyTypeDesc":76},[116,117,99,131,132,133,119,120,21,29,134,135,136,137,138,139,140,121,141,32],"file","file code review","project conventions","files","conventions","snippets","project","requirements","blocks","文件","single",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":33},"01M6RTPNWT66XGYW8S9KXM3W66","openspec-propose","Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.","https:\u002F\u002Fgithub.com\u002FZhaoYis\u002FMy-Skills\u002Fblob\u002Fmain\u002Fdev-pipeline\u002F.claude\u002Fskills\u002Fopenspec-propose\u002FSKILL.md",[],[149,86,150,24,151,152,153,154,155,29,156,157,158,159,160,161,162,163,164,32],"openspec propose","design","change","tasks","artifacts","Bash","generated","ready","implementation","build","get","complete","proposal","with","for","describe",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":33},"01M6RTP3C3EVKHXAMW2E8ZB4G0","openspec-explore","Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.","https:\u002F\u002Fgithub.com\u002FZhaoYis\u002FMy-Skills\u002Fblob\u002Fmain\u002Fdev-pipeline\u002F.claude\u002Fskills\u002Fopenspec-explore\u002FSKILL.md",[],[172,173,86,24,151,154,28,29,174,175,176,177,138,178,179,163,32],"openspec explore","explore","think","thinking partner","thinking","ideas","partner","mode"]