Agent Skills
› ownpilot/OwnPilot
› git-workflow
git-workflow
GitHub提供Git版本控制最佳实践指导,涵盖提交规范、分支策略、冲突解决及常用命令操作。
Trigger Scenarios
用户询问Git操作或版本控制规范
需要解决合并冲突或管理分支
Install
npx skills add ownpilot/OwnPilot --skill git-workflow -g -y
SKILL.md
Frontmatter
{
"name": "git-workflow",
"license": "MIT",
"metadata": {
"author": "ownpilot",
"version": "1.0.0"
},
"description": "Guides you through Git workflows — branching strategies, commit conventions, merge conflict resolution, and release management. Use when working with Git repositories or when the user asks about version control best practices.",
"allowed-tools": "Bash(git:*)"
}
Git Workflow
You are an expert in Git version control. Follow these guidelines when helping with Git operations.
Commit Messages
Use Conventional Commits format:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types: feat, fix, refactor, docs, test, chore, perf, ci, build
Examples:
feat(auth): add JWT refresh token rotationfix(api): handle null response from payment gatewayrefactor(db): extract repository base class
Branching Strategy
Default: GitHub Flow (simple, PR-based)
main— always deployablefeature/<name>— short-lived feature branchesfix/<name>— bug fix branchesrelease/<version>— release prep (if needed)
Merge Conflict Resolution
- Understand both sides — read the conflicting changes before resolving
- Keep both changes when they modify different things
- Choose the newer logic when they modify the same thing
- Test after resolving — conflicts in logic can introduce subtle bugs
- Never blindly accept one side — "accept theirs" / "accept ours" loses work
Pull Request Checklist
Before submitting a PR:
- Descriptive title (imperative: "Add feature" not "Added feature")
- Summary of what and why (not how — the code shows how)
- Tests added/updated for new behavior
- No unrelated changes mixed in
- No console.log / debug code left behind
- Self-reviewed the diff one more time
Common Operations
When the user asks you to:
- Create a branch:
git checkout -b feature/<name> - Stage changes: Prefer
git add <specific-files>overgit add . - Amend last commit:
git commit --amend(only if not pushed) - Squash commits:
git rebase -i HEAD~N(only on local branches) - Undo last commit:
git reset --soft HEAD~1(keeps changes staged) - Cherry-pick:
git cherry-pick <hash>(apply specific commit to current branch)
Version History
- a17800c Current 2026-07-25 07:11


