一键导入
git-workflow
Execute safe Git workflows — branching, committing, resolving conflicts, and managing PRs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Execute safe Git workflows — branching, committing, resolving conflicts, and managing PRs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when controlling AI spend, token budgets, model routing, or workflow efficiency before scaling usage
Use when handling incidents, outages, severe regressions, or operational emergencies before attempting broad fixes
Use when investigating latency, throughput, resource saturation, or performance regressions before changing implementation details
Use when reviewing code, preparing a PR for review, or processing review feedback
Use when diagnosing bugs, test failures, or unexpected behavior before attempting any fix
Plan and execute safe deployments with rollback procedures, verification, and monitoring
| name | git-workflow |
| description | Execute safe Git workflows — branching, committing, resolving conflicts, and managing PRs |
Safe Git operations for branching, committing, conflict resolution, and pull request management.
# Always branch from up-to-date main
git fetch origin
git checkout -b <type>/<short-description> origin/main
Branch naming: feat/, fix/, refactor/, docs/, chore/
Write atomic commits — one logical change per commit.
# Stage specific files, not everything
git add <file1> <file2>
# Commit with conventional format
git commit -m "<type>(<scope>): <description>"
Conventional types: feat, fix, refactor, docs, test, chore
| Do | Don't |
|---|---|
| One logical change per commit | Bundle unrelated changes |
| Descriptive message explaining "what" | git commit -m "updates" |
| Stage specific files | git add . blindly |
# Rebase on main to keep linear history
git fetch origin
git rebase origin/main
# If conflicts arise, resolve then continue
git add <resolved-files>
git rebase --continue
# Squash fixup commits before PR
git rebase -i origin/main
# Push (first time)
git push -u origin <branch-name>
# Push after rebase (force-with-lease, never --force)
git push --force-with-lease
| Signal | Action |
|---|---|
git push --force on shared branch | Use --force-with-lease |
| Credentials in a commit | Rotate immediately, rewrite history, rerun full-history secret scans |
| 20+ files changed with vague message | Split into logical commits |
| Merge conflict resolved without reading both sides | Re-resolve intentionally |
| Skill | When |
|---|---|
| pr-writing | Writing the PR description |
| code-review | Reviewing the resulting PR |
| refactoring | When the branch contains a refactor |