smart-git-automation
できること
コードの変更をより効率的に管理するためのツールです。関連するファイルをグループ化し、新しいブランチ(コードのバージョン)の名前を提案し、変更を保存して送信する作業の一部を自動化します。
使う場面
- ✓小さな変更が多くあり、それらをまとめたいとき。
- ✓新機能を作成する際に、コードのバージョンにわかりやすい名前を付けたいとき。
- ✓レビューのためにコードを保存して送信する作業を早く進めたいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/smart-git-automation/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“コードの変更を保存したいです。”
毎週5つの新しいスキル。1分で読めます。
仕組み
ツールは、どのファイルを変更したかを分析し、類似性によってグループ化します。次に、新しいコードのバージョンにわかりやすい名前を付け、少ない手作業で変更を保存して送信できるよう支援します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
What I do
- Intelligently detect and group related changes
- Auto-generate descriptive branch names from changes
- Streamlined workflow: scan → branch → commit → push → PR with fewer prompts
When to Use
Use this when you want a faster, smarter git workflow that groups changes logically and reduces manual confirmation overhead.
Workflow Steps
1. Smart Detection & Grouping
Run in parallel:
git status- check what's changedgit diff --stat- see file modification summarygit diff --name-only- list changed files onlygit diff --staged --stat- see what's already staged
Analyze changes to group them logically:
- Files in the same module/directory → likely related
- Files that were modified together in recent edits → likely related
- New files that complement each other → likely related
Present grouped changes in a clear format, e.g.:
📁 Group 1: UI Components
- src/components/Button.tsx (modified)
- src/components/Button.test.tsx (modified)
📁 Group 2: API Layer
- src/api/client.ts (new)
- src/api/types.ts (modified)
2. Auto Branch Name Generation
Generate branch name from dominant change pattern:
- Use format:
<type>/<short-description> - Types:
feature,fix,refactor,docs,test,chore - Derive description from most significant changed file/feature
- Convert to kebab-case, max 50 chars
- Examples:
feature/add-user-auth(from auth-related files)fix/login-validation(from validation changes)refactor/api-cleanup(from API refactoring)
Show the proposed branch name and ask for one-word confirmation (or type alternative).
3. Streamlined Branch & Commit
- If not on main/master: check if current branch matches proposed name
- If yes: stay on it
- If no: ask to switch or create new
- Create branch only after validating the branch name, then use
git checkout -b "$branch_name" - Stage explicit pathspecs only:
git add -- path/to/file ...- If file paths are generated, keep them NUL-delimited (
git diff -z --name-only) and pass them as pathspec arguments. - Never concatenate untrusted filenames into a shell command and never run the placeholder text literally.
- If file paths are generated, keep them NUL-delimited (
- Auto-generate commit message from changes:
- First line:
<type>: <short description>(max 72 chars) - Body: grouped file changes with brief descriptions
- First line:
- Commit with generated message, show preview first
- Ask for one-word confirmation to proceed
4. Push & Optional PR
- After commit, ask: "Push to remote? (yes/no/abort)"
- If yes:
git push -u origin <branch-name> - Then ask: "Create PR? (yes/no)"
- If yes:
- Check remote:
git remote -v - If fork: use fork's remote (e.g.,
mskadu/repo-name) - Auto-generate PR description from commit messages
- Use
gh pr createwith:- Title from branch name
- Body: summary of changes + file breakdown + follow-up notes
- Check remote:
Key Rules
- Group related files automatically, but allow user to adjust
- Generate branch names from actual changes, don't ask user to name them
- Reduce confirmations: ask for one-word answers or single confirmation points
- Never commit secrets, credentials, or large binaries
- Check if GitHub repo exists before PR creation
- Skip PR step if user says "no" at any point
- If branch already exists with changes, offer to amend or add new commit
Limitations
- Do not bypass repository-specific maintainer rules, branch policies, or required review gates.
- Confirm destructive or publishing actions explicitly; this skill should streamline routine Git flow, not remove accountability.
よくある質問
Gitの「変更」と「ブランチ」とは何ですか?
変更とは、プロジェクトのファイルに加えた修正のことです。ブランチとは、プロジェクトの並行したコピーのようなもので、メインのバージョンに影響を与えずに新機能や修正を作業できます。
なぜ関連するファイルをまとめるのですか?
関連するファイルをまとめると、コードのどの部分がつながっているかを理解しやすくなり、より正確なブランチ名や、わかりやすいコミットメッセージを作成できます。
ツールがコードを自動で保存しますか?
ツールは手順を自動化し、提案しますが、保存(コミット)や送信(プッシュ)などの重要な操作の前には、必ずユーザーの確認を求めます。
詳細
作者による元の説明
Smart change detection, auto branch naming, and streamlined commit/PR workflow
人気
- GitHubのスター
- 48k
- ランキング
- #5814
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。