agentleFS
aws-solutionsaws-solutions/konductor/skills/git-merge/SKILL.md

git-merge

Skill11 starsChanged 49 days agoApache-2.0View on GitHub

MUST USE for merging branches. Feature branch into mainline, dev into mainline, release merges. Triggers: 'merge', 'merge branch', 'merge into mainline', 'release merge', 'merge dev'.

  • Commits and pushes

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 16
  2. Distinctive:

    Ensure the feature branch is up to date with mainline before merging back.

    line 29
  3. Very specific:

    Not using --no-commit flag — prevents pre-commit inspection of merge result

    line 101
  4. Distinctive:

    Not verifying build passes before committing the merge

    line 102
  5. Distinctive:

    Verify tests pass on the feature branch after Phase 1 before proceeding to Phase 2

    line 109

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git Merge

Overview

Merge a feature branch into mainline safely using --no-ff --no-commit for inspectable merge commits. This skill defines the standard 4-phase merge workflow that preserves branch history and allows pre-commit inspection.

Usage

Use this skill when:

  • Merging a feature branch into mainline
  • Merging dev into mainline
  • Performing release merges
  • Any branch merge that should preserve history

Trigger words: merge, merge branch, merge into mainline, release merge, merge dev

Workflow

Phase 1: Merge mainline into feature branch first

Ensure the feature branch is up to date with mainline before merging back.

git switch mainline
git pull
git switch <feature_branch>
git merge --no-commit --no-ff mainline
# Fix any merge conflicts
git commit -m "Merging mainline into <feature_branch>"
git push

Phase 2: Merge feature branch into mainline

git switch mainline
git pull
git merge --no-ff --no-commit <feature_branch>
# Fix any merge conflicts, verify build
git commit -m "Merging <feature_branch> into mainline"
git push

Phase 3: Tag release (if applicable)

git tag v<version>
git push origin v<version>

Phase 4: Clean up (optional)

git branch -d <feature_branch>        # delete local
git push -d origin <feature_branch>   # delete remote

Merge Flags

FlagPurpose
--no-ffAlways create a merge commit (no fast-forward) — preserves branch history
--no-commitStage the merge but don't commit — lets you inspect and build before committing

Anti-Patterns

  1. NEVER fast-forward merge into mainline — always use --no-ff
  2. NEVER merge into mainline without pulling latest first
  3. NEVER skip merging mainline into feature branch first
  4. NEVER force push to mainline

Quick Reference

TaskCommand
Update mainlinegit switch mainline && git pull
Merge with inspectiongit merge --no-ff --no-commit <branch>
Tag releasegit tag v<version> && git push origin v<version>
Delete local branchgit branch -d <branch>
Delete remote branchgit push -d origin <branch>

Quality Gate

CRITICAL (block merge):

  • Merging into mainline without --no-ff flag — branch history will be lost
  • Merging into mainline without pulling latest first — risks overwriting others' changes
  • Skipping Phase 1 (merging mainline into feature branch first) — conflicts should be resolved on the feature branch, not mainline
  • Force pushing to mainline

IMPORTANT (fix before proceeding):

  • Not using --no-commit flag — prevents pre-commit inspection of merge result
  • Not verifying build passes before committing the merge
  • Merge commit message doesn't describe what was merged

SUGGESTION:

  • Tag releases after merging to mainline for traceability
  • Clean up feature branches after successful merge to reduce clutter
  • Verify tests pass on the feature branch after Phase 1 before proceeding to Phase 2

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.