AgentSkillsCN

git-workflow

管理 Git 操作,包括分支管理、commit 提交以及拉取请求。当您从事版本控制相关工作,或当用户提及 Git、commit、分支或 PR 时,均可使用此技能。

SKILL.md
--- frontmatter
name: git-workflow
description: Manage git operations including branching, commits, and pull requests. Use when working with version control or when user mentions git, commits, branches, or PRs.
license: MIT
metadata:
  author: openclaw
  version: "1.0"
allowed-tools: Bash(git:*)

Git Workflow Instructions

Branch Management

When creating branches:

  • Use descriptive names: feature/, fix/, docs/, refactor/
  • Keep names lowercase with hyphens
  • Example: feature/add-user-auth

Commit Messages

Follow conventional commits:

code
<type>(<scope>): <description>

[optional body]

[optional footer]

Types: feat, fix, docs, style, refactor, test, chore

Pull Request Workflow

  1. Ensure branch is up to date with main
  2. Run tests locally before pushing
  3. Create PR with descriptive title and body
  4. Link related issues
  5. Request appropriate reviewers

Common Commands

bash
# Create feature branch
git checkout -b feature/my-feature

# Stage and commit
git add -p  # Interactive staging
git commit -m "feat(scope): description"

# Push and create PR
git push -u origin HEAD