smart-git-automation – skill Agent & Tự động hóa cho agent AI
Tự động phát hiện thay đổi thông minh, đặt tên nhánh tự động và quy trình commit/PR được tinh gọn.
Cài skill smart-git-automation bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/smart-git-automation-cbbf9.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /smart-git-automation – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/smart-git-automation-cbbf9.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $smart-git-automation – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/smart-git-automation-cbbf9.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /smart-git-automation – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/smart-git-automation-cbbf9.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /smart-git-automation – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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.
Before grouping, preserve existing staged changes and read repository instructions. Inspect full unstaged/staged diffs and untracked files, not just names/stats; file grouping is advisory and must not absorb unrelated user work. Use the repository branch prefix/template and required checks. For forks, distinguish the upstream PR base from the fork head/remote; verify owner/repo and full head SHA before creation. An amend rewrites history and is not implied by a routine commit request.
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.
- Auto-generate commit message from changes:
- First line:
<type>: <short description>(max 72 chars) - Body: grouped file changes with brief descriptions
- 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
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.
Skill liên quan
- soundza – Tìm, nghe thử và thêm hiệu ứng âm thanh, âm nền hoặc nhạc miễn phí vào game, video hoặc…
- square-automation – Tự động hóa tác vụ Square qua Rube MCP (Composio): thanh toán, đơn hàng, hóa đơn, địa…
- stitch-loop – Hướng dẫn agent xây dựng website lặp đi lặp lại bằng Stitch theo mẫu vòng lặp chuyển…
- stripe-automation – Tự động hóa tác vụ Stripe qua Rube MCP (Composio): khách hàng, giao dịch thu tiền…
- subagent-driven-development – Dùng khi thực thi kế hoạch triển khai có các tác vụ độc lập trong phiên hiện tại
- subagent-orchestrator – Điều phối subagent chạy song song, có kiểm soát hạn mức (quota), cho các tác vụ…
- supabase-automation – Tự động hóa truy vấn cơ sở dữ liệu Supabase, quản lý bảng, quản trị dự án, storage, edge…
- superpowers-lab – Đánh giá các skill workflow Claude thử nghiệm trong một môi trường lab cách ly, với các…