Create a git commit after completing a task. Use this skill after finishing a logical unit of work to commit changes with a detailed conventional commit message. Always confirms with user before applying the commit. Never pushes to remote. Triggers include: "commit this", "commit changes", "save my changes", "write a commit", "help me commit", "create a commit", "conventional commit", "/commit", "done with changes", "finished editing", "wrap up", "save work".
Create conventional commits with branch protection, semantic correlation, and user confirmation.
git status
git diff --stat
git diff --cached --stat
If there are no changes (nothing staged, modified, or untracked), inform the user and stop.
Detect the current branch and the default branch:
git symbolic-ref --short HEAD
git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null || echo ""
If refs/remotes/origin/HEAD is not set, check whether main or master exists as fallback.
If on the default branch:
<default-branch>. Consider creating a feature branch."git branch -a --format='%(refname:short)'
/ vs - vs _feat, fix, chore, docs, etc.user/type/desc, type/descPROJ-123-desctype/short-description if no clear pattern foundfeat/PROJ-123-add-auth).If the user chooses to create a branch, run:
git checkout -b <branch-name>
Detect whether the project uses a ticket tracking system and ensure changes are associated with a ticket.
Detection — check for ticket system indicators (in order):
GitHub/GitLab Issues — Check if remote is GitHub/GitLab:
git remote get-url origin
If GitHub: use gh issue list --limit 5 --state open to confirm issues are enabled.
If GitLab: note that GitLab issues are likely available.
Jira — Look for Jira-style ticket IDs in existing branch names ([A-Z]+-\d+ pattern like PROJ-123). Check for .jira config or Jira URL references in the repo.
Linear — Check for Linear-style IDs in branches ([A-Z]+-\d+ with short prefixes like ENG-123). Check for linear references in the repo.
No ticket system detected — Skip this step entirely and proceed.
If a ticket system is detected:
gh issue create --title "..." --body "..."Only when on a feature branch (not the default branch):
/, -, _)"Changes appear to be about X, but branch
branch-namesuggests Y. Continue?"
Identify:
feat, fix, docs, refactor, style, test, chore)Use conventional commits format:
<type>(<scope>): <short description>
<body with details>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation onlyrefactor: Code change that neither fixes a bug nor adds a featurestyle: Formatting, missing semicolons, etc.test: Adding or updating testschore: Maintenance tasks, dependenciesIf a ticket was associated in Step 3, include it in the footer (e.g., Closes #123 or Refs: PROJ-123).
Before committing, ALWAYS:
git diff --staged
Show the proposed commit message
Ask: "Ready to commit these changes? (yes/no)"
Wait for explicit user approval
Stage files — prefer specific files over git add -A:
git add <specific-files>
git commit -m "<message>"
git log -1 --stat
git push## Proposed Commit
**Branch:** feat/add-auth
**Type:** feat
**Scope:** auth
**Files:**
- src/auth/reset.ts (new)
- src/components/ResetForm.tsx (new)
- src/api/routes.ts (modified)
**Message:**
feat(auth): add password reset flow
- Add forgot password endpoint
- Implement email verification token
- Add password reset form component
Closes #123
**Diff summary:**
3 files changed, 245 insertions(+)
---
Ready to commit these changes?
npx skills add sergio-bershadsky/commit下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer