技能 managing-branches
🔀

managing-branches

安全 ⚙️ 外部命令

調查並建立 Git 分支

也可从以下获取: 1gy,C0ntr0lledCha0s

管理 Git 分支可能令人困惑,尤其是在處理錯誤或同步問題時。此技能可自動化分支調查與建立,並處理常見問題,例如衝突與未提交變更。

支持: Claude Codex Code(CC)
📊 69 充足
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“managing-branches”。 Check the current branch status

预期结果:

  • Current branch: feature/new-api
  • Uncommitted changes: 3 files modified
  • Remote sync: 2 commits ahead of main
  • Remote branches: origin/main is up to date
  • Recommended action: Consider committing or stashing changes before continuing

正在使用“managing-branches”。 Create a feature branch from main

预期结果:

  • Fetching latest changes from origin main
  • Creating new branch feature/user-auth from main
  • Branch created successfully
  • Switched to new branch feature/user-auth
  • No conflicts detected during creation

安全审计

安全
v3 • 1/16/2026

This is a prompt-based Git utility skill with no malicious code. The static scanner incorrectly flagged multiple findings: the 'weak cryptographic algorithm' detections are false positives (the scanner misidentified strings like 'managing-branches' and 'Quick branch status check' as crypto references). The 'external_commands' findings show standard Git commands (git branch, git status, git checkout) that are safe for a branch management skill. The 'filesystem' and 'network' findings are metadata strings, not actual access calls. The skill only uses safe Git commands and does not perform destructive operations.

2
已扫描文件
262
分析行数
1
发现项
3
审计总数

风险因素

⚙️ 外部命令 (1)
审计者: claude 查看审计历史 →

质量评分

38
架构
100
可维护性
85
内容
21
社区
100
安全
91
规范符合性

你能构建什么

快速分支狀態檢查

取得目前分支、未提交變更與同步狀態的摘要

分支建立流程

依命名規範建立功能分支,並包含錯誤處理

Git 學習輔助

透過引導式錯誤解決步驟學習 git 分支操作

试试这些提示

檢查目前分支
Check the current branch status. Show me the current branch, any uncommitted changes, and how up-to-date it is with the main branch.
建立功能分支
Create a new branch called feature/my-feature-name from the main branch. Make sure the main branch is up to date first.
處理分支錯誤
I got an error when trying to work with branches. Help me resolve it. The error was: [describe error]
解決衝突
Help me resolve merge conflicts in my current branch. First show me what files have conflicts, then guide me through resolving them.

最佳实践

  • 建立或更新分支前,務必先從遠端抓取
  • 切換分支前先暫存或提交未提交的變更
  • 確認分支命名規範符合團隊標準

避免

  • 建立名稱包含空白或特殊字元的分支
  • 未經團隊同意對共用分支強制推送
  • 忽略合併衝突並將其留置未解

常见问题

這個技能可以在 GitHub、GitLab 和 Bitbucket 上使用嗎?
是的,它可與任何 Git 託管服務搭配使用,因為它使用標準 Git 指令。
如果我嘗試建立已存在的分支會發生什麼?
該技能會偵測衝突並回報,提出替代方案或確認使用現有分支。
我可以用它搭配 GitHub CLI 建立 pull requests 嗎?
此技能使用 Git 指令。若要整合 GitHub CLI,需另外的技能。
使用這個技能我的儲存庫資料安全嗎?
是的,此技能只讀取儲存庫狀態並建立分支,不進行刪除或強制操作。
如果我遇到複雜的合併衝突怎麼辦?
此技能會針對簡單衝突提供逐步指引,並在遇到複雜衝突時請求指引。
這和 Git aliases 有什麼不同?
此技能提供智慧化錯誤處理與指引,是靜態別名無法匹敵的。

开发者详情

文件结构

📄 SKILL.md