Agent Skills
› nearai/ironclaw
› commit
commit
GitHub根据暂存区的代码变更自动生成符合规范的 Git 提交信息。通过检查差异和日志风格,确保摘要简洁并解释原因,同时防止敏感文件被提交,并在执行前请求用户确认。
Trigger Scenarios
需要生成 git commit message
协助进行代码提交
Install
npx skills add nearai/ironclaw --skill commit -g -y
SKILL.md
Frontmatter
{
"name": "commit",
"version": "1.0.0",
"activation": {
"tags": [
"git",
"version-control"
],
"keywords": [
"commit",
"git commit"
],
"patterns": [
"(?i)(create|make|write|generate)\\s.*commit",
"(?i)commit\\s.*(message|changes|staged)"
],
"max_context_tokens": 1000
},
"description": "Generate git commit messages from staged changes"
}
Git Commit Workflow
When the user asks to create a commit:
- Run
shellwithgit statusto see what files are staged and unstaged. - Run
shellwithgit diff --cachedto see the exact changes that will be committed. - Run
shellwithgit log --oneline -5to understand the repo's commit message style. - Analyze the staged changes and draft a commit message:
- Summarize the nature of the change (new feature, bug fix, refactor, etc.)
- Keep it concise: 1-2 sentences focusing on why, not what
- Match the repo's existing commit message style
- Do not commit files that likely contain secrets (
.env,credentials.json, API keys). Warn the user if such files are staged. - Show the proposed commit message to the user and ask for confirmation before running
git commit. - Stage any requested files with
git add <specific files>(never usegit add -Aorgit add .).
Commit Message Format
If the repo doesn't have a clear style, use:
<type>: <concise description>
<optional body explaining why>
Where type is: fix, feat, refactor, test, docs, chore.
Version History
- 5380a32 Current 2026-08-20 07:09


