git-commit
Skill17 starsChanged 7 months agoMITView on GitHub
Execute git commits in Trae with conventional commit message analysis, intelligent staging, and message generation. Use when the user asks to commit changes, create a git commit, mentions /commit, or says Chinese requests such as 帮我提交, 生成提交信息, 提交当前修改, or 按规范提交. Supports type/scope detection, conventional commit messages, and logical file staging.
- Reads credentials
194 other projects use a version of this, 35 of them edited.
Adopted by
Most recently taken up by
- Shavakan/claude-marketplacetheir own version, first seen Nov 29, 2026
- 27Aaron/skillstheir own version, first seen Nov 29, 2026
- autohandai/community-skillsedited, first seen Nov 29, 2026
- dhruvanbhalara/skillstheir own version, first seen Nov 29, 2026
- CodelyTV/agent-harnesstheir own version, first seen Nov 29, 2026
- microsoft/devsquad-copilottheir own version, first seen Nov 29, 2026
Used with
Projects with it also use git-pr, git-branch and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
klauswgSkillgit-pr
Prepare, review, publish, or update a complete GitHub pull request for the current repository, including local commit readiness, safe push strategy, semantic title validation, repository-native PR templates, issue linking, and checks verification. Use when the user asks to draft, create, submit, publish, open, or update a pull request. Always require the user to review and explicitly approve the exact final PR before any push or GitHub write.
Also in 13 projects that use this
MicrosoftSkillgit-branch
Branch management for implementation. Use when you need to create a branch, switch branches, checkout, or verify branching strategy before implementing code. Do not use for commits (use git-commit), pull requests (use pull-request), or advanced git operations (rebase, merge).
Also in 6 projects that use this
mjun0812Skillgithub-pr-create
Pull Requestを作成するSkill。現在のbranchからpull requestを作成する。言語指定可能。 ユーザーが「PR作って」「pull request作成して」のように依頼したら使うこと。
Also in 3 projects that use this
klauswgSkillgit-issue
Prepare, review, create, or update evidence-based GitHub issues for the current repository with duplicate detection, repository-native templates, valid labels, and post-publication verification. Use when the user asks to draft, file, submit, publish, edit, or refine a GitHub issue, bug report, feature request, performance issue, or technical proposal. Always require the user to review and explicitly approve the exact final issue before any GitHub write.
Also in 3 projects that use this
mgiovaniSkilldocs-adr
Create a numbered Architecture Decision Record (ADR) documenting a technical
Also in 3 projects that use this
gologo13Skillgit-push
Push current branch to origin and sync with remote updates; keywords: git, rebase. Use only on explicit request; before execution, review diffs and list impact scope.
Also in 8 projects that use this
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 35
- doocs/leetcode★ 37k74% same
- doocs/md★ 14k38% same
- GitTools/GitVersion★ 3.1k69% same
- lnikell/loopndroll★ 56776% same
- diodeme/Gold-Band★ 16871% same
- getlago/lago-front★ 16476% same
- jmrplens/gitlab-mcp-server★ 5757% same
- jaskirat1616/grok-skills★ 2270% same
- louisbrulenaudet/monorepo-template★ 1976% same
- klauswg/sasuke★ 1776% same
25 more not listed
Wrote their own version · 159
- github/awesome-copilot★ 42ksame name
- tisfeng/Easydict★ 15ksame name
- spinabot/brigade★ 11ksame name
- PC2005-cloud/dsh-pet★ 6.8ksame name
- igorescodro/alkaa★ 1.6ksame name
- microsoft/hve-core★ 1.6ksame name
- mattmireles/gemma-tuner-multimodal★ 1.5ksame name
- rohaquinlop/complexipy★ 930same name
- decebals/claude-code-java★ 763same name
- redai-infra/Relax★ 683same name
149 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- a11y-debuggingSkill
- agent-blueprint-architectSkill
- brainstormingSkill
- chart-visualizationSkill
- chinese-copywritingSkill
- chinese-git-workflowSkill
- chrome-devtoolsSkill
- creating-trae-rulesSkill
- debug-optimize-lcpSkill
- discovering-subagent-capabilitiesSkill
- dispatching-parallel-agentsSkill
- everything-searchSkill
- executing-plansSkill
- find-docsSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- gh-cliSkill
- image-manipulation-python-magickSkill
- memory-kernelSkill
- memory-leak-debuggingSkill
- mineru-to-mdSkill
- model-config-lookupSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- self-improvementSkill
- skill-creatorSkill
- skill-language-policySkill
- skill-stability-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- troubleshootingSkill
- using-git-worktreesSkill
- verification-before-completionSkill
- visual-brainstormingSkill
- workflow-runnerSkill
- writing-plansSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 17 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 153 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 10
Create standardized, semantic git commits using the Conventional Commits specification.
- Distinctive: line 18
Do not use this skill when:
- Distinctive: line 37
When adapting for Chinese teams:
- Distinctive: line 90
If nothing is staged or you want to group changes differently:
- Very specific: line 131
If the repository uses hooks, let them run.
- Distinctive: line 139
Keep description under 72 characters
- Distinctive: line 155
Keep each bullet under 100 characters
- Distinctive: line 156
Use present tense, imperative mood, lowercase after the dash
- Distinctive: line 177
NEVER update git config
- Distinctive: line 178
NEVER run destructive commands (--force, hard reset) without explicit request
- Distinctive: line 179
NEVER skip hooks (--no-verify) unless user asks
- Distinctive: line 180
NEVER force push to main/master
- Distinctive: line 181
If commit fails due to hooks, fix and create NEW commit (don't amend)
- Distinctive: line 182
If git status --porcelain is empty, do not create an empty commit unless the user explicitly asks.
- Distinctive: line 183
If staged and unstaged changes are mixed, preserve the user's staging intent.
- Distinctive: line 184
If secrets or credential-looking files are present, stop and ask before staging or committing them.
- Very specific: line 185
If this is the last commit on a branch, the next step should be finishing-a-development-branch for branch wrap-up (merge, PR, keep, or …
- Distinctive: line 195
Git not installed: Stop and report Git is not available on this system.
- Distinctive: line 196
Not a git repository: Stop and tell the user the current directory is not a repository.
“Common” is measured: kept by at least 6 in 10 of the 153 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Commit with Conventional Commits
Overview
Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.
When the user writes in Chinese, default to a hybrid Conventional Commit format: keep the type in English (for tooling compatibility), but write the scope, description, and body in Simplified Chinese. Only use a pure English commit message if the user explicitly asks for it or the repository strictly enforces English.
On Windows, use PowerShell-compatible commands and avoid Unix-only shell constructs.
Do Not Use
Do not use this skill when:
- The user asks for a code review, diff explanation, release notes, or changelog but does not want an actual commit.
- The repository has no changes and the user did not explicitly ask for an empty commit.
- The user asks to push, open a pull request, rewrite history, force-push, or manage branches beyond creating the local commit.
- The working tree is in an unresolved merge, rebase, or cherry-pick state and the user has not chosen how to proceed.
- The task involves committing secrets, credentials, private keys, or generated artifacts that should not be versioned.
Conventional Commit Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]Hybrid Chinese/English Format
When adapting for Chinese teams:
feat(用户模块): 添加手机号一键登录功能
- 接入运营商一键登录 SDK
- 支持移动、联通、电信三网Commit Types
| Type | Purpose |
feat | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting/style (no logic) |
refactor | Code refactor (no feature/fix) |
perf | Performance improvement |
test | Add/update tests |
build | Build system/dependencies |
ci | CI/config changes |
chore | Maintenance/misc |
revert | Revert commit |
Breaking Changes
# Exclamation mark after type/scope
feat!: remove deprecated endpoint
# BREAKING CHANGE footer
feat: allow config to extend other configs
BREAKING CHANGE: `extends` key behavior changedWorkflow
1. Analyze Diff
# If files are staged, use staged diff
git diff --staged
# If nothing staged, use working tree diff
git diff
# Also check status
git status --porcelain2. Stage Files (if needed)
If nothing is staged or you want to group changes differently:
# Stage specific files
git add path/to/file1 path/to/file2
# Stage by pattern
git add *.test.*
git add src/components/*
# Interactive staging
git add -pNever commit secrets (.env, credentials.json, private keys).
3. Generate Commit Message
Analyze the diff to determine:
- Type: What kind of change is this?
- Scope: What area/module is affected?
- Description: One-line summary of what changed (present tense, imperative mood, <72 chars)
4. Execute Commit
# Single line
git commit -m "<type>[scope]: <description>"
# Multi-line with body/footer in PowerShell
$msg = @"
<type>[scope]: <description>
<optional body>
<optional footer>
"@
git commit -m $msgIf the repository uses hooks, let them run. Do not add --no-verify unless the user explicitly requests it.
Best Practices
- One logical change per commit
- Present tense: "add" not "added"
- Imperative mood: "fix bug" not "fixes bug"
- Reference issues:
Closes #123,Refs #456 - Keep description under 72 characters
Commit Message Granularity
The granularity of the commit body depends on how many logical changes the diff contains:
| Diff scope | Description | Body | Example |
| Single atomic change (1 file, 1 concern) | One line, no body needed | Omit | feat: add email validation helper |
| Single concern across multiple files (e.g., refactor a function + update all call sites + add tests) | One line summarizing the net effect | Omit or minimal | refactor(auth): extract token validation to middleware |
| Loosely related changes in one commit (multiple fixes or features grouped by the user) | One line as a category label | Required: bullet-point list of what changed, one item per file or per concern | See below |
| Chore / maintenance (config, lint, deps, docs) | One line | Omit | chore: update eslint rules |
Body writing rules:
- One bullet per logical change, not per line of code
- Focus on WHAT changed, not WHY (why goes in the footer or PR description)
- Keep each bullet under 100 characters
- Use present tense, imperative mood, lowercase after the dash
Example of a multi-change commit body:
fix: 修复路由规则触发条件 4 项修复
- alwaysApply: false → true,消除护栏加载空窗期
- 新增 Exception to Escalation,纯机械变更保持 S 级
- M 级下游加入 TDD 选择条件
- 护栏扩充:auth/CI-CD/破坏性操作Example of a single-change commit:
feat(api): add rate limiting middleware
Closes #456Git Safety Protocol
- NEVER update git config
- NEVER run destructive commands (--force, hard reset) without explicit request
- NEVER skip hooks (--no-verify) unless user asks
- NEVER force push to main/master
- If commit fails due to hooks, fix and create NEW commit (don't amend)
- If
git status --porcelainis empty, do not create an empty commit unless the user explicitly asks. - If staged and unstaged changes are mixed, preserve the user's staging intent. Ask before adding unrelated files.
- If secrets or credential-looking files are present, stop and ask before staging or committing them.
- If this is the last commit on a branch, the next step should be
finishing-a-development-branchfor branch wrap-up (merge, PR, keep, or discard).
Integration
verification-before-completion: Upstream — validation must pass before committing.finishing-a-development-branch: Downstream — after committing, wrap up the branch.chinese-git-workflow: Adjacent — use when the remote is Gitee, GitLab, Coding, or CNB.
Failure Handling
- Git not installed: Stop and report Git is not available on this system. Suggest installing Git from https://git-scm.com or using Trae's built-in source control features. Do not attempt git commands.
- Not a git repository: Stop and tell the user the current directory is not a repository. Offer to initialize one with
git initif the user wants version control, or suggest file-level alternatives. - No changes -> do not commit: report that the working tree has no staged or unstaged changes.
- Merge/rebase/cherry-pick in progress -> stop and ask whether to continue, abort, or inspect the state.
- Commit hook failure -> summarize the hook error and fix the underlying issue when it is in scope; do not bypass hooks by default.
- Ambiguous staging scope -> ask before staging broad patterns or unrelated files.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

