Agent Skillsownpilot/OwnPilot › git-workflow

git-workflow

GitHub

提供 Git 版本控制最佳实践指导,涵盖提交规范、分支策略、冲突解决及常用操作命令,协助开发者高效管理代码仓库。

packages/gateway/data/example-skills/git-workflow/SKILL.md ownpilot/OwnPilot

触发场景

用户询问 Git 命令用法 需要解决合并冲突 咨询分支管理规范 检查提交信息格式

安装

npx skills add ownpilot/OwnPilot --skill git-workflow -g -y
更多选项

非标准路径

npx skills add https://github.com/ownpilot/OwnPilot/tree/main/packages/gateway/data/example-skills/git-workflow -g -y

不安装直接使用

npx skills use ownpilot/OwnPilot@git-workflow

指定 Agent (Claude Code)

npx skills add ownpilot/OwnPilot --skill git-workflow -a claude-code -g -y

安装 repo 全部 skill

npx skills add ownpilot/OwnPilot --all -g -y

预览 repo 内 skill

npx skills add ownpilot/OwnPilot --list

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 rotation
  • fix(api): handle null response from payment gateway
  • refactor(db): extract repository base class

Branching Strategy

Default: GitHub Flow (simple, PR-based)

  • main — always deployable
  • feature/<name> — short-lived feature branches
  • fix/<name> — bug fix branches
  • release/<version> — release prep (if needed)

Merge Conflict Resolution

  1. Understand both sides — read the conflicting changes before resolving
  2. Keep both changes when they modify different things
  3. Choose the newer logic when they modify the same thing
  4. Test after resolving — conflicts in logic can introduce subtle bugs
  5. 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> over git 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)

版本历史

  • a17800c 当前 2026-07-25 07:11

同 Skill 集合

packages/gateway/data/example-skills/api-debugging/SKILL.md
packages/gateway/data/example-skills/code-review/SKILL.md
packages/gateway/data/example-skills/document-assistant/SKILL.md
packages/gateway/data/example-skills/meeting-notes/SKILL.md
packages/gateway/data/example-skills/presentation-builder/SKILL.md
packages/gateway/data/example-skills/research-synthesizer/SKILL.md
packages/gateway/data/example-skills/spreadsheet-analyst/SKILL.md
packages/gateway/data/example-skills/writing-assistant/SKILL.md

元信息

文件数
0
版本
5260761
Hash
3f799dc0
收录时间
2026-07-25 07:11

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-01 09:25
浙ICP备14020137号-1 $访客地图$