AgentSkillsCN

ship

通过提交、推送并创建PR至主分支,完成变更的交付。

SKILL.md
--- frontmatter
name: ship
description: Ship changes by committing, pushing, and creating a PR to main.
disable-model-invocation: true
user-invocable: true
argument-hint: "[optional repo hint: fe, be, or repo name]"
allowed-tools: Bash

Task

  1. Locate the Repository: - Check if the current directory is a Git repo.

    • If not, or if $ARGUMENTS suggests a specific area (like "fe" or "be"), examine the sub-folders.
    • Check which repo has changes and cd into it. If uncertain, ask the user.
  2. Branch Management:

    • Check the current branch. If on main or master branch, create a new feature branch.
    • Name the branch descriptively based on the changes.
  3. Commit Changes:

    • If there are uncommitted changes, create a commit with a conventional commit message following the format:
      • feat: for new features
      • fix: for bug fixes
      • docs: for documentation changes
      • refactor: for code refactoring
      • test: for adding tests
      • chore: for maintenance tasks
      • Include a clear, concise description.
  4. Push and PR:

    • Push the branch to origin (with -u flag if first push).
    • Create a pull request to main using gh pr create with:
      • A clear, descriptive title.
      • A concise body that summarizes all changes/features added using markdown formatting.
      • Include test plan or notes if relevant.

Constraints

  • You MUST navigate (cd) into the correct sub-repo before running git commands.
  • Do not include the "Generated by Claude" footer in commits.
  • You MUST do all of the above in a single response. Do not send any other text or messages besides these tool calls.

Optional user arguments

$ARGUMENTS