en un clic
liam-commit
创建清晰传达价值的git commit。触发词: commit, save changes.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
创建清晰传达价值的git commit。触发词: commit, save changes.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
迭代收敛(太虚二转·澄源):链式分析自动循环至稳定。触发词: 收敛, 黑格尔, hegel.
提交推送开PR,自适应描述。触发词: commit and PR, ship this.
多角色并行审查需求/计划文档。触发词: 审文档, doc review.
创建隔离git worktree用于并行开发或PR审查。触发词: worktree, 并行开发.
发散思维(太虚一转·散怀):想法量、SCAMPER、Stakeholder轮转。触发词: 发散, 开脑洞, 奥斯本. Divergent thinking (太虚一转·散怀): volume of ideas, SCAMPER, stakeholder rotation → idea-pool.md. Use when user says "发散", "开脑洞", "奥斯本", "osborn". 即便用户未明确说"用 osborn",当对话出现以下信号时也应主动建议使用:方案只有一条路想扩空间、 团队讨论在同一批想法里打转、方向定了但觉得可能有更好的选择、用户说"还有别的思路吗""帮我想想还有什么可能"。 不要等用户说出触发词才启动——识别意图比匹配关键词更重要。
Fact verification (太虚三转·叩实): decompose conclusion → testable predictions → external data validation. Use when user says "验证", "贝叶斯", "bayes", "靠谱吗".
| name | liam-commit |
| description | 创建清晰传达价值的git commit。触发词: commit, save changes. |
| version | 1.0.0 |
| display_name | Liam Commit |
| visibility | public |
Create a single, well-crafted git commit from the current working tree changes.
On platforms other than Claude Code, skip to the "Context fallback" section below and run the command there to gather context.
In Claude Code, the five labeled sections below (Git status, Working tree diff, Current branch, Recent commits, Remote default branch) contain pre-populated data. Use them directly throughout this skill -- do not re-run these commands.
Git status:
!git status
Working tree diff:
!git diff HEAD
Current branch:
!git branch --show-current
Recent commits:
!git log --oneline -10
Remote default branch:
!git rev-parse --abbrev-ref origin/HEAD 2>/dev/null || echo '__DEFAULT_BRANCH_UNRESOLVED__'
In Claude Code, skip this section — the data above is already available.
Run this single command to gather all context:
printf '=== STATUS ===\n'; git status; printf '\n=== DIFF ===\n'; git diff HEAD; printf '\n=== BRANCH ===\n'; git branch --show-current; printf '\n=== LOG ===\n'; git log --oneline -10; printf '\n=== DEFAULT_BRANCH ===\n'; git rev-parse --abbrev-ref origin/HEAD 2>/dev/null || echo '__DEFAULT_BRANCH_UNRESOLVED__'
Use the context above (git status, working tree diff, current branch, recent commits, remote default branch). All data needed for this step is already available -- do not re-run those commands.
The remote default branch value returns something like origin/main. Strip the origin/ prefix to get the branch name. If it returned __DEFAULT_BRANCH_UNRESOLVED__ or a bare HEAD, try:
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
If both fail, fall back to main.
If the git status from the context above shows a clean working tree (no staged, modified, or untracked files), report that there is nothing to commit and stop.
If the current branch from the context above is empty, the repository is in detached HEAD state. Explain that a branch is required before committing if the user wants this work attached to a branch. Ask whether to create a feature branch now. Use the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded), request_user_input in Codex, ask_user in Gemini, ask_user in Pi (requires the pi-ask-user extension). Fall back to presenting options in chat only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip the question.
git checkout -b <branch-name>, then run git branch --show-current again and use that result as the current branch name for the rest of the workflow.Follow this priority order:
type(scope): description where type is one of feat, fix, docs, refactor, test, chore, perf, ci, style, build.When using conventional commits, choose the type that most precisely describes the change (the type list above). Where fix: and feat: both seem to fit, default to fix:: a change that remedies broken or missing behavior is fix: even when implemented by adding code. Reserve feat: for capabilities the user could not previously accomplish. Other types remain primary when they fit better. The user may override for a specific change.
Before staging everything together, scan the changed files for naturally distinct concerns. If modified files clearly group into separate logical changes (e.g., a refactor in one directory and a new feature in another, or test files for a different change than source files), create separate commits for each group.
Keep this lightweight:
git add -p or try to split hunks within a file.If the current branch from the context above is main, master, or the resolved default branch from Step 1, automatically create a feature branch before committing. Derive the branch name from the change content, create it with git checkout -b <branch-name>, run git branch --show-current to confirm, and use the new branch as the current branch for the rest of the workflow. Do not ask whether to branch — committing on the default branch is not an option here.
Write the commit message:
For each commit group, stage and commit in a single call. Prefer staging specific files by name over git add -A or git add . to avoid accidentally including sensitive files (.env, credentials) or unrelated changes. Use a heredoc to preserve formatting:
git add file1 file2 file3 && git commit -m "$(cat <<'EOF'
type(scope): subject line here
Optional body explaining why this change was made,
not just what changed.
EOF
)"
Run git status after the commit to verify success. Report the commit hash(es) and subject line(s).