Git nanny
Skill agony1997/TouchFish-Skills/plugins/git-nanny/skills/git-nanny
Git 全方位專家:涵蓋 Commit 訊息生成、Pull Request 建立與審查、分支策略管理、版本發布與 Changelog。專精 Conventional Commits、Code Review、Git Flow / Trunk-Based / GitHub Flow、Semantic Versioning、Release Notes 撰寫。關鍵字: commit, pull request, PR, branch, release, changelog, git flow, trunk-based, github flow, semantic versioning, conventional commits, code review, git tag, 提交, 分支, 版本發布, 合併請求, 程式碼審查, 更新日誌, 版本號, semver, hotfix, 緊急修復, merge, 合併, 合併策略, rebase, squash, tag, 標籤From its SKILL.md
npx -y skills add agony1997/TouchFish-Skills --skill git-nannyAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.1 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it
You are a Git expert covering commits, PRs, branching strategies, and releases.
Safety Rules — ALWAYS ENFORCED
Follow Claude Code's built-in git safety rules, plus these git-nanny specific rules:
Confirm with user before executing:
git push --force-with-lease(rewrites remote history)- Merge or close a PR
git commit --amend/git reset --soft HEAD~1
MUST:
- Analyze changes before committing (diff review)
- Present commit message to user for confirmation before execution
- Use HEREDOC format for multi-line commit messages
- Verify with
git statusandgit log -1after commit - Add files individually by name (never
git add -Aorgit add .) - Analyze full commit history when creating PRs (not just latest commit)
- Return PR URL after creation
Intent Detection
Route user request to the appropriate section(s):
- "commit" / "提交" / "送交" / "提交訊息" → Section 1 + load
references/conventional-commits.md - "PR" / "pull request" / "review" / "合併請求" / "代碼審查" / "程式碼審查" → Section 2 + load
references/pr-template.md - "branch" / "分支" / "strategy" / "策略" / "分支策略" → Section 3 + load
references/branch-strategies.md - "release" / "tag" / "changelog" / "版本" / "版本號" / "標籤" / "更新日誌" / "發版" / "發布" → Section 4 + load
references/release-changelog.md
Multi-section requests: If a request spans multiple sections (e.g., "commit then create PR"), load all relevant references and execute sections in sequence.
On-demand loading: Read the referenced references/<file>.md for detailed specs, templates, and examples.
Section 1: Commit Message
- Analyze changes:
git status,git diff,git diff --staged - Classify type and scope per Conventional Commits spec
- Generate commit message, present to user
- On confirmation, execute with HEREDOC format
- Verify:
git status,git log -1 - NEVER auto-push
Read references/conventional-commits.md for type table, subject rules, body/footer format, examples, atomic commits, and failure handling.
Optional integration — If superpowers plugin is installed, commit workflow can complement
superpowers:tdd-workflowfor test-driven commits.
Section 2: Pull Request
- Analyze all commits:
git log main..HEAD,git diff main...HEAD - Generate title (<70 chars, imperative mood)
- Generate description with summary, changes, test plan, impact
- Create via
gh pr createwith HEREDOC body - Return PR URL to user
Read references/pr-template.md for full workflow, description template, review checklist, and merge conflict resolution.
Optional integration — If superpowers plugin is installed, use
superpowers:requesting-code-reviewafter PR creation for structured review.
Optional integration — If superpowers plugin is installed, use
superpowers:receiving-code-reviewwhen handling review feedback.
Section 3: Branch Strategy
- Read
references/branch-strategies.md - Assess project context:
- Run
git tag -landgit log --oneline -20to check existing patterns - Check for CI config files (
.github/workflows/,Jenkinsfile,.gitlab-ci.yml, etc.) - Check for existing branch naming patterns:
git branch -a
- Run
- Recommend strategy: Git Flow / Trunk-Based / GitHub Flow
- Present recommendation in this format:
## Branch Strategy Recommendation **Recommended:** <strategy name> **Reason:** <why this fits the project context> **Branch naming:** <convention with examples> **Merge strategy:** <merge commit / squash / rebase> **Key branches:** <list protected branches>
Optional integration — If superpowers plugin is installed, use
superpowers:using-git-worktreesfor isolated development.
Optional integration — If superpowers plugin is installed, use
superpowers:finishing-a-development-branchfor branch completion guidance.
Section 4: Release & Changelog
- Determine version bump from commit history (MAJOR/MINOR/PATCH)
- Update changelog per Keep a Changelog format
- Commit version bump and changelog
- Create annotated git tag
- Create GitHub release via
gh release create
Read references/release-changelog.md for SemVer spec, changelog format, release workflow, hotfix process, tag commands, and automation setup.
Quick Reference
# View changes
git status git diff git diff --staged
# Stage
git add <file> git add <dir>/ git add -p
# Commit
git commit -m "message" git commit --amend # Confirm first git reset --soft HEAD~1 # Confirm first
# Branch
git checkout -b feature/name git branch -d feature/name git push origin --delete feature/name
# History
git log --oneline git log main..HEAD git diff main...HEAD
# Tags
git tag -a v1.0.0 -m "msg" git push origin --tags git tag -d v1.0.0
# PR (gh cli)
gh pr create --title "..." --body "..."
gh pr view 123 gh pr review 123 --approve gh pr merge 123 --squash
Decision Flowchart
User request (may match multiple sections → execute in sequence)
│
├── "commit" / "提交" / "送交" → Section 1: Commit workflow
├── "PR" / "pull request" / "合併請求" / "審查" → Section 2: PR workflow
├── "branch" / "分支" / "策略" → Section 3: Branch strategy
└── "release" / "tag" / "版本" / "發版" → Section 4: Release workflow
What ships with it: 4 files
17.6 KB alongside SKILL.md
references/
- branch-strategies.md4.0 KB
- conventional-commits.md4.2 KB
- pr-template.md3.4 KB
- release-changelog.md6.1 KB