SuperAPI AI Directory

commit

Coding & development

View repository

Updated 10-16 09:57

About this skill

Commit — Quick Git Commit

Create a git commit, supporting a specified message or automatic generation.

Current repository status

!`git status`

Staged diff

!`git diff --staged`

Steps

  1. Based on the above git status output, determine:
    • If there are no staged changes → prompt the user to first git add,end immediately
    • Strictly prohibitedto execute without the user's explicit request git add(in any form), including git add .、git add -A、git add <file>
  2. Based on the above git diff --staged output, generate a commit message (pure reasoning, do not call any commands):
    • If $ARGUMENTS is provided → use it directly
    • Otherwise → analyze the diff and generate a message conforming to Conventional Commits
  3. Must call the Bash toolExecute:git commit -m "<message>"(simulated output is prohibited)
  4. Must call the Bash toolExecute:git show --stat --pretty=format:"✓ Committed: %s (%h)" -1, show the real output to the user

Commit Message Format

Format:<type>[optional scope]: <description>

Common types:

  • feat — new feature (triggers a minor version)
  • fix — Bug fix (triggers a patch version)
  • docs — documentation changes
  • style — code formatting (does not affect logic)
  • refactor — refactoring (not feat/fix)
  • perf — performance optimization
  • test — test-related
  • build — build system/dependencies
  • ci — CI configuration
  • chore — other miscellaneous
  • revert — revert

Rules:

  • Concise but descriptive, the first line must not exceed 72 characters
  • scope is optional:feat(auth): add OAuth2 login
  • Breaking change: add after the type ! or write in the footer BREAKING CHANGE: <描述>

Example:

  • feat: add user authentication with JWT
  • fix(api): handle null response from upstream
  • feat!: remove deprecated /v1/users endpoint

Output

Directly display the real Bash output from Step 4; do not manually concatenate or simulate it.