/amlei-skills:amlei-git-ghfrom amlei-skills
Guide for git commit, push, and PR using gh CLI (GitHub). Use when committing code, pushing to remote, creating pull requests, managing branches, or any git workflow. Covers commit message conventions, push strategies, and PR creation with confirmation gates.
Ships in amlei-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use gh CLI (GitHub) for all remote operations. Commit and push directly without confirmation. Only PR requires explicit user approval.
NEVER automatically commit and push after making edits. This skill should ONLY activate when:
/git-gh commandWhen 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): |
Run in parallel to gather context:
git status — untracked and modified filesgit diff — staged and unstaged changesgit log --oneline -10 — recent commit styletype: short summary — one line, concise, human-readablefeat, fix, refactor, docs, chore, test, style, perffeat: add user login with email verification
fix: resolve race condition in batch processing
refactor: extract validation logic into shared module
docs: update API endpoint descriptions
chore: upgrade dependencies to latest stable
update files # too vague
feat: add feature # which feature?
wip # meaningless
fix bug # what bug?
git add <file>), avoid git add -Agit status to verify
Never commit files that likely contain secrets (.env, credentials).git branch -vvgit push -u origin <branch>git pushAfter commit, check if current branch is not main/master. If on a feature branch and commit + push succeeded, proceed to step 3.
After a successful commit + push on a non-main branch, ask the user:
Commit and push completed. Would you like to create a pull request? Never create a PR automatically. Always wait for explicit user confirmation.
main or mastergit statusgit diffgit log main..HEAD --oneline — all commits on this branchgit diff main...HEAD — full diff from base## Summary
- Bullet points of key changes (1-3 items)
## Test plan
- Checklist of verification steps
🤖 Generated with [Claude Code](https://claude.com/claude-code)
-u if needed, then create via gh pr createWhen creating a PR, suggest and apply labels, assignees, and reviewers:
| Parameter | Flag | Example |
|---|---|---|
| Labels | --label | --label "enhancement,backend" |
| Assignees | --assignee | --assignee "user1,user2" |
| Reviewers | --reviewer | --reviewer "user1" |
| Milestone | --milestone | --milestone "v2.0" |
| Project | --project | --project "Roadmap" |
| How to suggest metadata: |
feat → enhancement, fix → bug, docs → documentation)@me) unless the user specifies othersTitle: feat: add user login
Labels: enhancement
Assignees: @me
Reviewers: (ask user)
To update an existing PR's metadata:
gh pr edit <number> --add-label "enhancement" --add-assignee "username"
gh pr create --title "the title" \
--label "enhancement" \
--assignee "@me" \
--body "$(cat <<'EOF'
## Summary
<bullets>
## Test plan
<checklist>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
| Action | Command |
|---|---|
| Check status | git status |
| Stage files | git add <file> |
| Commit | git commit -m "msg" |
| Push (new branch) | git push -u origin <branch> |
| Push (existing) | git push |
| Create PR | gh pr create --title "..." --body "..." --label "..." --assignee "..." |
| Edit PR metadata | gh pr edit <n> --add-label "..." --add-assignee "..." |
| Check existing PRs | gh pr list |
| View PR | gh pr view <number> |
git add -A — stage specific files--no-verify)What SKILL.md sets; muted values are Claude Code's defaults
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills: Invalid input
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
14 skills in this plugin
/amlei-academic-ref-retrieval学术论文参考文献检索与格式输出。根据论文主题拆解核心技术,编写脚从权威期刊/数据库(知网、维普、arXiv等)爬取或提取真实论文信息,按标准参考文献格式输出。触发:写论文 / 参考文献 / 查文献 / 检索论文 / 论文参考 / reference retrieval / academic reference。/amlei-agents-authoring用"哲学式引导"写 AGENTS.md / CLAUDE.md / SKILL.md:把清单式规则提炼成可迁移的判断原则,区分价值与事实,先给对照方案再写入。触发:写 AGENTS / 改 AGENTS / 全局约定 / 项目约定 / 原则化 / 哲学式描述 / 把规则改成原则 / 精简 AGENTS / 写 SKILL / 新建 skill / 优化提示词规则 / CLAUDE.md 怎么写 / conventions。/amlei-csdn-postCSDN 发文(md → CSDN 博客)csdn-post skill 更新Other plugins' skills for the same job