skills/git-pro/SKILL.md
Advanced git workflows for vibe-kit users who have graduated beyond /vibe auto-commit: create branches, open pull requests via `gh`, merge, and recover from common mistakes. Complements `git-auto-commit` (single commits) and `git-trace` (history lookup). User-visible strings match the user's input language (Vietnamese by default for VN users); raw git/gh commands always shown verbatim so power users can learn. Based on public specs (conventionalcommits.org, gh CLI docs).
npx skillsauth add Hikkywannafly/vibe-kit git-proInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
User says any of:
For single-commit staging, delegate to git-auto-commit instead.
For lookups ("khi nao them X", "ai sua Y"), delegate to git-trace.
branch <name> — Create & switchBranch names use kebab-case with a type prefix that matches the conventional commit types used by git-auto-commit:
| Prefix | For |
|--------|-----|
| feature/ | new user-visible feature |
| fix/ | bug fix |
| refactor/ | restructure, no behavior change |
| chore/ | deps, config, env |
| hotfix/ | urgent production fix |
| experiment/ | throwaway spike |
Workflow:
# 1. Sync main first so the new branch starts from latest
git fetch origin
git switch main
git pull --ff-only origin main
# 2. Create + switch
git switch -c feature/<name>
If main is dirty (uncommitted work), stop and tell user: "Branch main đang có thay đổi chưa commit. Lưu trước rồi mới tạo branch."
pr [base] — Open pull requestDefault base is main. Use gh CLI, always compare remote refs (not local) so unpushed commits are visible on GitHub.
Preflight:
# Must have gh and must be authenticated
command -v gh >/dev/null || { echo "gh CLI not installed. brew install gh"; exit 1; }
gh auth status >/dev/null 2>&1 || { echo "gh not logged in. Run: gh auth login"; exit 1; }
# Must have a remote
git remote get-url origin >/dev/null 2>&1 || { echo "No origin remote."; exit 1; }
Push current branch if not already on remote:
HEAD_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
[ "$HEAD_BRANCH" = "main" ] && { echo "Không mở PR từ main."; exit 1; }
git push -u origin "$HEAD_BRANCH"
Read remote diff to build title + body:
BASE="${1:-main}"
git fetch origin "$BASE"
git log "origin/$BASE..origin/$HEAD_BRANCH" --pretty="- %s" > /tmp/vibe-pr-commits.txt
git diff "origin/$BASE...origin/$HEAD_BRANCH" --stat > /tmp/vibe-pr-stat.txt
PR title — reuse the most significant commit subject (feat > fix > refactor > chore). Strip trailing [P<n>] tags. Max 72 chars.
PR body template (HEREDOC to preserve formatting):
gh pr create --base "$BASE" --head "$HEAD_BRANCH" \
--title "$TITLE" \
--body "$(cat <<EOF
## Summary
$(cat /tmp/vibe-pr-commits.txt)
## Files changed
\`\`\`
$(cat /tmp/vibe-pr-stat.txt)
\`\`\`
## Test plan
- [ ] Run \`npm run build\` locally — build passes
- [ ] Smoke-test the changed pages in dev server
- [ ] Verify no env vars missing in Vercel preview
EOF
)"
Output URL to user so they can click through.
merge [from] — Fast-forward merge into mainOnly fast-forward merges from this skill. Non-fast-forward requires manual review.
FROM="${1:-$(git rev-parse --abbrev-ref HEAD)}"
git switch main
git pull --ff-only origin main
git merge --ff-only "$FROM" || {
echo "Merge không phải fast-forward. Rebase branch '$FROM' lên main trước, hoặc merge thủ công."
exit 1
}
git push origin main
Offer to delete the merged branch after successful push:
Merged $FROM into main. Xoá branch '$FROM'? (y/N)
On yes:
git branch -d "$FROM"
git push origin --delete "$FROM"
undo — Recover from last commitInteractive. Ask user which scenario:
| Scenario | Command | Effect |
|----------|---------|--------|
| Đổi ý, muốn sửa message | git commit --amend | Rewrites last commit message |
| Muốn bỏ commit, giữ file đã edit | git reset --soft HEAD~1 | Changes back in staging |
| Muốn bỏ commit + unstage | git reset HEAD~1 | Changes back in working tree |
| Muốn xoá hẳn (NGUY HIỂM) | git reset --hard HEAD~1 | All work gone — confirm twice |
Refuse --hard if the commit touched > 10 files or > 200 lines unless user types the exact SHA.
Refuse any amend/reset if the commit is already pushed to a protected branch (main, master, production). Instead suggest git revert <sha> (creates a new inverse commit — safe for shared history).
git push --force to main, master, or production. Push-force only allowed to feature branches the user owns, and only after explicit confirmation.git clean -fd from this skill (can delete untracked work).gh pr merge --admin (bypasses branch protection).git status shows unmerged paths, refuse and tell user to resolve conflicts first.Short prose in the user's input language (Vietnamese by default for VN users). ALWAYS show the raw git/gh command being run on its own line so power users can learn — commands themselves stay in English (e.g. git checkout -b feature/login). Never emoji.
data-ai
Generate Vietnamese marketing copy, UI strings, CTAs, error messages, and email templates for vibe-kit projects. Tone: friendly, conversational, Southern Vietnamese style. Activated for any user-visible text generation.
development
One-shot orchestrator. Turns the prose after /vibe into a shipped product by clarifying intent, rendering a plan, gating on approval, then spawning planner+researcher+fullstack-dev+tester+reviewer agents in sequence. User-visible strings match the user's input language (Vietnamese by default for VN users). Two modes: SAFE (default — clarify + show plan + wait for approval, max 1 round-trip) and YOLO (skip clarify+approval, run full auto with smart defaults — for demos and power users). YOLO triggers: prose contains `yolo`, `nhanh nha`, `lam luon`, `khoi hoi`, `auto`, or args start with `yolo`. Trigger phrases (EN + VN): "build me a site", "make me a landing page", "create a shop", "I need an app", "vibe lam website", "tao cho toi mot", "xay dung shop online", "lam landing page", "can mot app".
tools
On-demand security audit for vibe-kit projects. Stack-aware checks for Next.js App Router + Supabase + Polar: secrets leak, RLS gaps, service-role key in client bundle, missing webhook signature verification, unprotected API routes, weak headers, dependency vulns. Outputs a Vietnamese P0/P1/P2 report with file:line + fix hints. User-visible strings match the user's input language (Vietnamese by default for VN users). Trigger phrases (EN + VN): "check security", "audit it", "security scan", "is this safe to launch", "kiem tra bao mat", "quet bao mat", "audit du an", "co an toan khong", "scan bao mat truoc khi deploy".
tools
Wire Supabase JS client into a React Native (Expo) vibe-kit project: session persistence via AsyncStorage, magic-link OAuth callback via expo-linking deep links, Realtime subscriptions on RN, and shared TypeScript types with the Next.js webapp twin (vibe-kit's typical web<->mobile pair pattern). This is the mobile counterpart of `auth-magic-link` (web). User-visible strings match the user's input language (Vietnamese by default for VN users). Trigger phrases (EN + VN): "supabase react native", "supabase mobile", "auth mobile expo", "magic link mobile", "tich hop supabase vao app", "supabase deep link".