git-commit

GitHub

辅助用户执行Git提交操作,自动暂存文件、分析代码变更并生成符合Conventional Commits规范的提交信息。

data/skills-md/aayushbtw/skills/git-commit/SKILL.md NeverSight/learn-skills.dev

触发场景

用户要求提交代码 用户说'commit this' 用户说'make a commit' 用户说'ship it'

安装

npx skills add NeverSight/learn-skills.dev --skill git-commit -g -y
更多选项

非标准路径

npx skills add https://github.com/NeverSight/learn-skills.dev/tree/main/data/skills-md/aayushbtw/skills/git-commit -g -y

不安装直接使用

npx skills use NeverSight/learn-skills.dev@git-commit

指定 Agent (Claude Code)

npx skills add NeverSight/learn-skills.dev --skill git-commit -a claude-code -g -y

安装 repo 全部 skill

npx skills add NeverSight/learn-skills.dev --all -g -y

预览 repo 内 skill

npx skills add NeverSight/learn-skills.dev --list

SKILL.md

Frontmatter
{
    "name": "git-commit",
    "description": "Stages files, analyzes the diff, and commits with a conventional commit message. Use this skill whenever the user wants to commit, says things like \"commit this\", \"make a commit\" or \"ship it\"."
}

Git Commit

Workflow

IMPORTANT: Follow these steps in order. Do not skip or reorder unless a step explicitly says to.

  1. Check what is staged and what isn't:

    git status --short
    
    • If nothing to commit at all, stop and tell the user.
    • If nothing is staged → run git add -A to stage everything.
  2. Read the staged diff and analyze per the Splitting commits rules:

    git diff --cached
    
    • If there is one group → proceed to step 3.
    • If there are multiple groups → tell the user how many commits will be made, then unstage everything and stage only the first group's files:
      git reset HEAD
      git add <file1> <file2> ...
      
  3. Generate a commit message per the Commit message rules and commit:

    git commit -m "<generated message>"
    

    If unstaged changes remain, repeat from step 1.

Guidelines

Commit message

  • Format: <type>(<scope>): <description> where type is one of:
    • feat: A new capability or behavior the project didn't have before
    • fix: Correcting broken or incorrect behavior
    • docs: Changes to documentation only
    • refactor: Restructuring code without changing behavior
    • perf: Performance improvements
    • chore: Routine upkeep (e.g. versions, lockfiles, renaming, linting, formatting)
    • test: Adding or updating tests
    • ci: Changes to CI/CD pipelines or workflow files
    • revert: Undoing a previous commit
  • Scope: ALWAYS include in parentheses (e.g. feat(auth):)
  • Description: Present tense imperative, no period, ≤50 chars
  • Breaking changes: Add ! after type/scope (e.g. feat!(scope):)
  • No generic messages: Never use "update code", "fix bug", "changes"
  • No attribution: Never add Co-Authored-By trailers or footers
  • Examples:
    • feat(auth): add OAuth2 login flow
    • fix(api): handle null response from payment gateway
    • docs(readme): add setup instructions
    • refactor(db): extract query builder into separate module
    • chore(deps): bump express to v5
    • chore(lint): apply prettier formatting
    • perf(search): add index on users.email column
    • test(auth): add unit tests for token refresh
    • ci(deploy): add staging environment workflow
    • feat!(api): change response format to JSON:API

Splitting commits

  • Atomic commits: Each commit must contain only related changes that serve a single purpose
  • Split large changes: If changes touch different concerns, different types (feat vs fix vs refactor), different file categories (source vs docs), or are large enough that breaking them down aids review

Git safety

  • No bypassing hooks: Never use --no-verify or --force
  • No config changes: Never modify git config
  • Sensitive files: Never stage .env, credentials, or private keys
  • Pre-commit failures: Stop and report the error — do not attempt to fix or bypass it
  • Empty staging: If nothing is staged after git add, stop and tell the user

版本历史

  • e0220ca 当前 2026-07-05 22:14

同 Skill 集合

data/skills-md/00prabalk00/claude-skills/knowledge-base-gap-finder/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-agile/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-auth/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-issues/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-project-management/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-projects/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-safe/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-search/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-spaces/SKILL.md
data/skills-md/01000001-01001110/agent-jira-skills/jira-transitions/SKILL.md
data/skills-md/0731coderlee-sudo/wechat-publisher/wechat-publisher/SKILL.md
data/skills-md/0froq/skills/conventionalcommits/SKILL.md
data/skills-md/0froq/skills/nuxt/SKILL.md
data/skills-md/0froq/skills/oq/SKILL.md
data/skills-md/0froq/skills/pinia/SKILL.md
data/skills-md/0froq/skills/pnpm/SKILL.md
data/skills-md/0froq/skills/slidev/SKILL.md
data/skills-md/0froq/skills/tsdown/SKILL.md
data/skills-md/0froq/skills/turborepo/SKILL.md
data/skills-md/0froq/skills/unocss/SKILL.md
data/skills-md/0froq/skills/vitepress/SKILL.md
data/skills-md/0froq/skills/vitest/SKILL.md
data/skills-md/0froq/skills/vue-best-practices/SKILL.md
data/skills-md/0froq/skills/vue-router-best-practices/SKILL.md
data/skills-md/0froq/skills/vue-testing-best-practices/SKILL.md
data/skills-md/0froq/skills/vue/SKILL.md
data/skills-md/0froq/skills/vueuse-functions/SKILL.md
data/skills-md/0froq/skills/web-design-guidelines/SKILL.md
data/skills-md/0juano/agent-skills/bondterminal-x402/SKILL.md
data/skills-md/0juano/agent-skills/edgeone-pages-deploy/SKILL.md
data/skills-md/0juano/agent-skills/ley-ar/SKILL.md
data/skills-md/0juano/agent-skills/ticktick/SKILL.md
data/skills-md/0juano/agent-skills/x-image-cards/SKILL.md
data/skills-md/0juano/x-image-cards/x-image-cards/SKILL.md
data/skills-md/0x0funky/agent-sprite-forge/generate2dsprite/SKILL.md
data/skills-md/0x0funky/agent-sprite-forge/video2dsprite/SKILL.md
data/skills-md/0x2e/superpowers/brainstorming/SKILL.md
data/skills-md/0x2e/superpowers/dispatching-parallel-agents/SKILL.md
data/skills-md/0x2e/superpowers/executing-plans/SKILL.md
data/skills-md/0x2e/superpowers/finishing-a-development-branch/SKILL.md
data/skills-md/0x2e/superpowers/receiving-code-review/SKILL.md
data/skills-md/0x2e/superpowers/requesting-code-review/SKILL.md
data/skills-md/0x2e/superpowers/subagent-driven-development/SKILL.md
data/skills-md/0x2e/superpowers/systematic-debugging/SKILL.md
data/skills-md/0x2e/superpowers/test-driven-development/SKILL.md
data/skills-md/0x2e/superpowers/using-git-worktrees/SKILL.md
data/skills-md/0x2e/superpowers/using-superpowers/SKILL.md
data/skills-md/0x2e/superpowers/verification-before-completion/SKILL.md
data/skills-md/0x2e/superpowers/writing-plans/SKILL.md
data/skills-md/0x2e/superpowers/writing-skills/SKILL.md

元信息

文件数
0
版本
f4b4cf1
Hash
648876b5
收录时间
2026-07-05 22:14

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-10 11:49
浙ICP备14020137号-1 $访客地图$