mcpField
G
gitworfkflows

gitworfkflows

github.com/thelobbi開発2145 回インストール1 日前に更新
リポジトリ

gitworfkflows について

Git Workflows Skillは、Golden Armada AI Agent Fleet PlatformでGit操作を行うためのリファレンススキルです。基本コマンド、Git Flowのブランチ運用、コミット規約、一般的なワークフロー、GitHub CLI、除外パターン、フックを扱います。

主な機能

  1. 01Gitコマンドのリファレンス
  2. 02Git Flowのブランチ運用ガイド
  3. 03ブランチ命名とコミット規約
  4. 04一般的なブランチ・マージ手順
  5. 05GitHub CLIの例
  6. 06除外パターンとGitフック

活用シーン

  1. 01フィーチャーブランチの作成と同期
  2. 02コミットの統合や取り消し
  3. 03プルリクエストとIssueの管理
  4. 04除外パターンとフックの設定

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/thelobbi/claude --skill gitworfkflows

インストール後、Claude Code で/gitworfkflowsを入力して読み込まれたか確認します。

詳細

Git ワークフロースキル

Golden Armada AI Agent Fleet Platform 向けに、包括的な Git バージョン管理機能を提供します。

このスキルを使用するタイミング

次の作業を行うときに、このスキルを有効にしてください。

  • Git コマンドと操作
  • ブランチ戦略
  • コミット管理
  • プルリクエストとマージ
  • リポジトリの設定

クイックリファレンス

基本コマンド
# ステータスと情報
git status
git log --oneline -10
git diff
git diff --staged

# ステージング
git add <file>
git add .
git add -p              # 対話形式でステージング

# コミット
git commit -m "message"
git commit -am "message"  # 追加してコミット
git commit --amend

# ブランチ
git branch
git branch <name>
git checkout <branch>
git checkout -b <branch>
git switch <branch>
git switch -c <branch>

# マージ
git merge <branch>
git merge --no-ff <branch>
git rebase <branch>

# リモート
git fetch
git pull
git push
git push -u origin <branch>

ブランチ戦略(Git Flow)

main          ─────●─────────────●─────────────●───────
                   │             │             │
release       ─────┼─────●───────┼─────────────┼───────
                   │     │       │             │
develop       ─────●─────┼───────●─────────────●───────
                   │     │       │             │
feature       ─────●─────┘       │             │
                                 │             │
hotfix        ───────────────────●─────────────┘
ブランチの命名
# 機能
feature/add-agent-api
feature/GA-123-user-auth

# バグ修正
bugfix/fix-agent-timeout
bugfix/GA-456-memory-leak

# 緊急修正
hotfix/critical-security-patch

# リリース
release/v1.0.0

コミットメッセージの規約

# 形式
<type>(<scope>): <subject>

<body>

<footer>

# 種類
feat:     新機能
fix:      バグ修正
docs:     ドキュメント
style:    書式設定(コードの変更なし)
refactor: コードのリファクタリング
test:     テストの追加
chore:    保守作業

# 例
git commit -m "feat(agent): add Claude agent support"
git commit -m "fix(api): resolve timeout in task processing"
git commit -m "docs: update deployment instructions"

一般的なワークフロー

機能の開始
git checkout develop
git pull origin develop
git checkout -b feature/new-feature
# ... 作業 ...
git add .
git commit -m "feat: implement new feature"
git push -u origin feature/new-feature
# develop への PR を作成
機能ブランチの同期
git checkout develop
git pull origin develop
git checkout feature/my-feature
git rebase develop
# 競合があれば解決
git push --force-with-lease
コミットのスカッシュ
git rebase -i HEAD~3  # 直近 3 件のコミットを対話形式でリベース
# まとめるコミットの 'pick' を 'squash' に変更
変更の取り消し
# 直近のコミットを取り消す(変更は保持)
git reset --soft HEAD~1

# 直近のコミットを取り消す(変更を破棄)
git reset --hard HEAD~1

# ステージングした変更を取り消す
git restore --staged <file>

# 作業ディレクトリの変更を破棄
git restore <file>

# コミットを取り消す(新しいコミットを作成)
git revert <commit-hash>

GitHub CLI

# PR 管理
gh pr create --title "Feature: Add agent API" --body "Description"
gh pr list
gh pr checkout <number>
gh pr merge <number>
gh pr review <number> --approve

# Issue
gh issue create --title "Bug: Agent timeout" --label bug
gh issue list
gh issue close <number>

# リポジトリ
gh repo clone <owner>/<repo>
gh repo view --web

.gitignore のパターン

# 依存関係
node_modules/
venv/
__pycache__/

# ビルド出力
dist/
build/
*.egg-info/

# 環境
.env
.env.local
*.local

# IDE
.idea/
.vscode/
*.swp

# OS
.DS_Store
Thumbs.db

# ログ
*.log
logs/

# シークレット(絶対にコミットしないこと!)
*.pem
*.key
credentials.json

Git フック

# .git/hooks/pre-commit
#!/bin/sh
npm run lint
npm run test
# .git/hooks/commit-msg
#!/bin/sh
if ! grep -qE "^(feat|fix|docs|style|refactor|test|chore)(\(.+\))?: .{1,50}" "$1"; then
    echo "Invalid commit message format"
    exit 1
fi
\`\`\`

コメント