SuperAPI AI Directory

git-commit-pr

General & other

View repository

Updated 10-16 09:27

About this skill

Git Commit & PR

Commit the changes and create a Pull Request to the official (upstream) repository.

Trigger conditions

Use this skill when the user requests committing changes and submitting a PR to the original repository (official).

Execution steps

  1. Create a new branch:git checkout -b <branch-name>, with the branch name specified by the user or automatically generated based on the changes.

  2. Review the changes: First use git status and git diff to check all changes yourself, ensuring that no temporary files, debug code, or unrelated files are mixed in.

  3. Stage files:git add the relevant changed files. Do not use git add -A or git add ., but add the relevant files one by one.

  1. Commit the changes:

    git commit --signoff --author="Cheney Zhang <chen.zhang@zilliz.com>" -m "<commit message>"
    
    • Write the commit message in English, briefly describing the changes.
    • Nevermention AI, Claude, LLM, or any auto-generation-related wording in the commit message.
  2. Push the branch:git push origin <branch-name>。

  3. Create the PR:

    gh pr create --repo <official-owner/repo> --title "<PR title>" --body "<PR description>"
    
    • Write the PR title and description in English.
    • Nevermention AI, Claude, LLM, or any auto-generation-related wording in the PR title or description.
    • Do not add Co-Authored-By or similar AI-related markers.
  4. If the user has merge permission and requests a merge:

    • Review the PR and merge.
    • Switch back to the main branch (main or master).
    • Sync upstream:git fetch official && git reset --hard official/<main-branch>。
    • Delete the local temporary branch:git branch -d <branch-name>。
    • Delete the remote temporary branch:git push origin --delete <branch-name>。

Notes

  • First confirm that the official remote exists; if it does not exist, prompt the user to configure it first.
  • Before committing, check whether there are unstaged changes that need to be handled.
  • All externally visible text (commit message, PR title/description) must not contain any AI-related wording.