AgentSkillsCN

merge

将功能分支通过squash合并至主分支。当用户说“合并到主分支”、“进行squash合并”、“完成这个功能”时,可使用此技能。

SKILL.md
--- frontmatter
name: merge
description: Squash merge feature branch to main. Use when user says "merge to main", "squash merge", or "finish feature".

Squash merge completed feature branch to main with proper commit message.

Commit Format

TypeFormat
FeatureAs a [role] I [action] so that [benefit]
FixFix: [description]
RefactorRefactor: [description]
StyleStyle: [description]

Rules

  • ALWAYS include Closes #XX on separate line when resolving issues
  • NEVER include "Co-Authored-By: Claude"
  • Use detailed commit body for complex changes
  • Do NOT push (user will push manually)

Examples

code
Fix: Return proper error message for unauthorized AJAX requests
Closes #123

- Changed empty array response to include 'Authorization required' message
- Updated error handling middleware
code
As a student I can see my learning outcomes
Closes #80

Pre-Merge Checklist

  • Tests pass locally
  • No linting/type errors
  • No console.log statements left in code
  • No commented-out code
  • Environment variables documented in .env.example
  • Database migrations tested (if applicable)
  • API changes documented (if applicable)

Process

  1. Verify pre-merge checklist
  2. Run git log main..HEAD to see all branch commits
  3. Run git diff main...HEAD to see total changes
  4. Check staged files - unstage any files unrelated to this merge
  5. Checkout main: git checkout main
  6. Squash merge: git merge --squash <branch-name>
  7. Commit with HEREDOC:
    bash
    git commit -m "$(cat <<'EOF'
    Commit message here.
    
    Closes #XX
    EOF
    )"