agentleFS
aws-samplesaws-samples/sample-claude-code-agent-team/skills/git-workflow/SKILL.md

git-workflow

Skill65 starsChanged 6 months agoMIT-0View on GitHub

Conventional commit style, branch naming, and merge-conflict resolution, with commit-commands plugin and `gh` CLI integration. Use when working with version control, creating branches, writing commits, or resolving merge conflicts.

  • Commits and pushes

118 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use squad-commands, typescript-patterns and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    squad-commands

    Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.

    Also in 3 projects that use this

  • cohen-lielSkill

    typescript-patterns

    TypeScript best practices and patterns. Use when writing TypeScript code, defining types, working with generics, or converting JavaScript to TypeScript.

    Also in 4 projects that use this

  • martinholovskySkill

    llm-integration

    Expert skill for integrating local Large Language Models using llama.cpp and Ollama. Covers secure model loading, inference optimization, prompt handling, and protection against LLM-specific vulnerabilities including prompt injection, model theft, and denial of service attacks.

    Also in 4 projects that use this

  • MicrosoftSkill

    cost-optimization

    Optimize existing Azure resources and analyze Reservations or Savings Plans. WHEN: \"optimize Azure costs\", \"reduce cloud spending\", \"rightsize resources\", \"find idle resources\", \"orphaned disk\", \"deleted VM still charged\", \"public IP still charging\", \"reservation utilization\", \"Savings Plan coverage\", \"commitment recommendation\", \"why is pay-as-you-go still charged\". DO NOT USE FOR: cost spikes, forecasts, pricing estimates, budgets, or governance.

    Also in 5 projects that use this

  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 3 projects that use this

  • Vimalk0703Skill

    dependency-management

    Vet packages before adoption, audit for vulnerabilities, pin versions, and prevent dependency bloat.

    Also in 3 projects that use this

  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 101 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use these conventions when working with version control, creating branches, writing commits, or resolving merge conflicts.

    line 8
  2. Very specific:

    All git commands must be non-interactive (see rules/execution-hygiene.md):

    line 52
  3. Distinctive:

    Keep correct code, remove markers

    line 96
  4. Distinctive:

    When resolving conflicts, investigate both sides before choosing — the conflicting code may represent someone else's in-progress work.

    line 99
  5. Distinctive:

    Always run before pushing:

    line 103
  6. Very specific:

    All agents use --no-pager and GIT_PAGER=cat for non-interactive output

    line 134
  7. Very specific:

    After all review cycles pass, use commit-commands:commit-push-pr or superpowers:finishing-a-development-branch to handle merge/PR creation

    line 136
  8. Very specific:

    Use the gh CLI to link PRs to issues and add reviewers (gh pr edit)

    line 137

“Common” is measured: kept by at least 6 in 10 of the 101 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 Workflow

Use these conventions when working with version control, creating branches, writing commits, or resolving merge conflicts.

Plugins for Git Work

Plugin / ToolWhen to Use
commit-commands:commitCreate conventional commits — handles staging, message formatting, and pre-commit checks
commit-commands:commit-push-prCommit, push, and open a PR in one flow
commit-commands:clean_goneClean up local branches that have been deleted on remote (marked [gone]), including worktrees
gh CLIGitHub operations — create/edit PRs, link issues, add labels, request reviewers, post comments (gh pr create, gh pr edit, gh issue create)

Prefer plugins/CLI over raw git for:

  • Committing — commit-commands:commit enforces conventional commit format
  • PR creation — commit-commands:commit-push-pr opens the PR; use the gh CLI for labels, linked issues, and reviewers
  • Branch cleanup — commit-commands:clean_gone safely removes stale branches and worktrees

Commit Messages

<type>(<scope>): <subject>

[optional body]

[optional footer]

Types: feat, fix, docs, style, refactor, test, chore

Good: feat(auth): add OAuth2 support for GitHub login Bad: fixed stuff

Branch Naming

<type>/<ticket>-<description>

Examples:

  • feature/PROJ-123-user-authentication
  • fix/PROJ-456-null-pointer-crash
  • hotfix/PROJ-789-security-patch

Non-Interactive Git

All git commands must be non-interactive (see rules/execution-hygiene.md):

# Always use --no-pager or GIT_PAGER=cat
git --no-pager log -10
git --no-pager diff
GIT_PAGER=cat git show HEAD

# Commit with message (never open editor)
git commit -m "feat(auth): add login endpoint"

# Merge without editor
git merge --no-edit feature-branch

# Rebase non-interactively
git rebase --no-edit main

Common Operations

# Squash last N commits (non-interactive)
git reset --soft HEAD~N && git commit -m "squashed commit message"

# Cherry-pick specific commit
git cherry-pick <sha>

# Undo last commit (keep changes)
git reset --soft HEAD~1

# Find commit that introduced bug
git bisect start
git bisect bad HEAD
git bisect good <known-good-sha>

# Stash with description
git stash push -m "WIP: auth middleware"
git stash pop

Merge Conflict Resolution

  1. git status — identify conflicted files
  2. Open file, look for <<<<<<<, =======, >>>>>>>
  3. Keep correct code, remove markers
  4. git add <file> then git rebase --continue or git merge --continue

When resolving conflicts, investigate both sides before choosing — the conflicting code may represent someone else's in-progress work.

Pre-Commit Checks

Always run before pushing:

  • Linting/formatting
  • Unit tests
  • Type checking (if applicable)
# Example pre-push verification
npm run lint && npm test && npx tsc --noEmit && git push

Worktrees

For isolated feature work (used by superpowers:using-git-worktrees):

# Create a worktree for isolated feature work
git worktree add ../project-feature feature/PROJ-123-description

# List active worktrees
git worktree list

# Clean up after merge (or use commit-commands:clean_gone)
git worktree remove ../project-feature

Worktrees are useful when fullstack-agent orchestrates parallel task groups that need file-level isolation beyond what the task ownership rules provide.

Agent Integration

  • fullstack-agent creates feature branches before starting spec-driven work
  • coding-agent and devops-agent commit their changes with conventional commit messages matching the task scope
  • All agents use --no-pager and GIT_PAGER=cat for non-interactive output
  • review-agent may use git diff to identify the exact changeset under review
  • After all review cycles pass, use commit-commands:commit-push-pr or superpowers:finishing-a-development-branch to handle merge/PR creation
  • Use the gh CLI to link PRs to issues and add reviewers (gh pr edit)

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.