git-workflow
できること
このスキルは、チームのプロジェクトでGitを使う方法を説明します。明確なコミットメッセージの書き方から、ブランチの管理までを扱います。一貫していて追跡しやすいバージョン管理がほしい開発者のためのものです。
使う場面
- ✓Gitのコミットをしようとしていて、標準的で明確なメッセージがほしいとき。
- ✓機能や修正のためのブランチを作ったり、名前を付けたり、管理したりする必要があるとき。
- ✓プルリクエストの流れや、マージの競合を扱っているとき。
スキルのリンク
https://github.com/Galaxy-Dawn/claude-scholar/blob/main/skills/git-workflow/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“キャプチャの再読み込みのバグを直す私の変更について、適切なコミットメッセージを書いてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、コミットの種類、スコープ、件名について、プロジェクトのルールに従い、履歴が追いやすいように、明確なブランチとマージの方法を使います。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Git Workflow Standards
This document defines the project's Git usage standards, including commit message format, branch management strategy, workflows, merge strategies, and more. Following these standards improves collaboration efficiency, enables traceability, supports automation, and reduces conflicts.
Commit Message Standards
The project follows the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
Type Reference
| Type | Description | Example |
|---|---|---|
feat |
New feature | feat(user): add user export functionality |
fix |
Bug fix | fix(login): fix captcha not refreshing |
docs |
Documentation update | docs(api): update API documentation |
refactor |
Refactoring | refactor(utils): refactor utility functions |
perf |
Performance improvement | perf(list): optimize list performance |
test |
Test related | test(user): add unit tests |
chore |
Other changes | chore: update dependency versions |
Subject Rules
- Start with a verb: add, fix, update, remove, optimize
- No more than 50 characters
- No period at the end
For more detailed conventions and examples, see references/commit-conventions.md.
Branch Management Strategy
Branch Types
| Branch Type | Naming Convention | Description | Lifecycle |
|---|---|---|---|
| master | master |
Main branch, releasable state | Permanent |
| develop | develop |
Development branch, latest integrated code | Permanent |
| feature | feature/feature-name |
Feature branch | Delete after completion |
| bugfix | bugfix/issue-description |
Bug fix branch | Delete after fix |
| hotfix | hotfix/issue-description |
Emergency fix branch | Delete after fix |
| release | release/version-number |
Release branch | Delete after release |
Branch Naming Examples
feature/user-management # User management feature
feature/123-add-export # Issue-linked feature
bugfix/login-error # Login error fix
hotfix/security-vulnerability # Security vulnerability fix
release/v1.0.0 # Version release
Branch Protection Rules
master branch:
- No direct pushes allowed
- Must merge via Pull Request
- Must pass CI checks
- Requires at least one Code Review approval
develop branch:
- Direct pushes restricted
- Pull Request merges recommended
- Must pass CI checks
For detailed branch strategies and workflows, see references/branching-strategies.md.
Workflows
Daily Development Workflow
# 1. Sync latest code
git checkout develop
git pull origin develop
# 2. Create feature branch
git checkout -b feature/user-management
# 3. Develop and commit
git add .
git commit -m "feat(user): add user list page"
# 4. Push to remote
git push -u origin feature/user-management
# 5. Create Pull Request and request Code Review
# 6. Merge to develop (via PR)
# 7. Delete feature branch
git branch -d feature/user-management
git push origin -d feature/user-management
Hotfix Workflow
# 1. Create fix branch from master
git checkout master
git pull origin master
git checkout -b hotfix/critical-bug
# 2. Fix and commit
git add .
git commit -m "fix(auth): fix authentication bypass vulnerability"
# 3. Merge to master
git checkout master
git merge --no-ff hotfix/critical-bug
git tag -a v1.0.1 -m "hotfix: fix authentication bypass vulnerability"
git push origin master --tags
# 4. Sync to develop
git checkout develop
git merge --no-ff hotfix/critical-bug
git push origin develop
Release Workflow
# 1. Create release branch
git checkout develop
git checkout -b release/v1.0.0
# 2. Update version numbers and documentation
# 3. Commit version update
git add .
git commit -m "chore(release): prepare release v1.0.0"
# 4. Merge to master
git checkout master
git merge --no-ff release/v1.0.0
git tag -a v1.0.0 -m "release: v1.0.0 official release"
git push origin master --tags
# 5. Sync to develop
git checkout develop
git merge --no-ff release/v1.0.0
git push origin develop
Merge Strategy
Merge vs Rebase
| Feature | Merge | Rebase |
|---|---|---|
| History | Preserves complete history | Linear history |
| Use case | Public branches | Private branches |
| Recommended for | Merging to main branch | Syncing upstream code |
Recommendations
- Feature branch syncing develop: Use
rebase - Feature branch merging to develop: Use
merge --no-ff
よくある質問
Conventional Commitsとは何ですか?
種類、任意のスコープ、短い件名からなるコミットの形式で、fixやfeatなどの種類を使います。
件名の長さのルールは?
件名は動詞で始め、50文字未満にし、末尾に句点を付けないようにします。
マージの戦略も扱いますか?
はい。ブランチの戦略やマージの方法も扱います。
詳細
作者による元の説明
This skill should be used when the user asks to "create git commit", "manage branches", "follow git workflow", "use Conventional Commits", "handle merge conflicts", or asks about git branching strategies, version control best practices, pull request workflows. Provides comprehensive Git workflow guidance for team collaboration.
人気
- GitHubのスター
- 6.0k
- ランキング
- #14487
- ライセンス
- MIT
- 更新日
- 2026/10/19
コメント
- …
このリポジトリの他のスキル
agent-identifier
6.0kClaude Codeのエージェントを作る方法をエージェントに教えます。名前、トリガーの説明、システムプロンプト、設定を正しく書きます。
architecture-design
6.0k機械学習プロジェクトのコードの標準的な構成を教えます。登録可能な部品を追加するときは、ファクトリーとレジストリのパターンを使います。
bug-detective
6.0k理解、証拠の収集、仮説の検証、修正の確認という手順で、コードのエラーを見つけて直すようエージェントを支援します。
citation-verification
6.0k学術論文の各引用を信頼できる学術情報源と照らして確認し、偽物や誤った参考文献を見つけるようエージェントを支援します。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。