amlei-git-ghlisted
Install: claude install-skill amlei/amlei-skills
# Git & GitHub Workflow
Use `gh` CLI (GitHub) for all remote operations. Commit and push directly without confirmation. Only PR requires explicit user approval.
## ⚠️ CRITICAL CONSTRAINT
**NEVER automatically commit and push after making edits.**
This skill should ONLY activate when:
- User explicitly asks: "commit", "push", "create PR", "提交", "推送"
- User invokes: `/git-gh` command
- User explicitly requests git operations
**DO NOT:**
- Auto-commit after editing files
- Suggest committing after each change
- Be proactive about git operations
**WAIT for the user to initiate.**
## Interactive Mode
When this skill is invoked, immediately run `git status --short` in the background, then ask the user to choose via `AskUserQuestion`:
**Options:**
| # | Option | Action |
|---|--------|--------|
| 默认/回车 | Commit & Push | Execute full commit + push flow (Section 1 + 2) |
| 1 | Staged Files | Show `git diff --cached --stat` + `git diff --cached`, then ask next action |
| 2 | Unstaged Files | Show `git status --short` + `git diff --stat`, then ask next action |
**Flow after viewing files (option 1 or 2):**
- Ask user: proceed to commit & push / stage or unstage specific files / go back
- After staging/unstaging, loop back to the choice menu
## 1. Commit
### Before Committing
Run in parallel to gather context:
- `git status` — untracked and modified files
- `git diff` — staged and unstaged changes
- `git log --oneline -10` — recent commit style
### Commit Message Rules
- Write in **Chine