agentleFS
zyniverse-hqzyniverse-hq/skills-registry/skills/git-workflow/SKILL.md

git-workflow

Skill0 starsChanged 6 months agoApache-2.0View on GitHub

Applies this user's git conventions for branches, commits, merges, pull requests, force-pushes, and release tags whenever Claude runs any git command. For pre-push conflict detection before a push or PR, use safe-push-workflow.

  • Deletes or force-pushes
  • 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

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 101 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Do NOT activate when: the task has no git/version-control component (pure reading, non-repo edits).

    line 29
  2. Distinctive:

    Keep the description part short and kebab-case.

    line 56
  3. Distinctive:

    Never merge locally. The flow is:

    line 66
  4. Very specific:

    Do not run git checkout main && git merge feature or git merge origin/main locally.

    line 70
  5. Distinctive:

    Prefer merge over rebase — preserves history and avoids rewriting shared commits.

    line 72
  6. Distinctive:

    Every PR must have:

    line 76
  7. Distinctive:

    Default: never. No git push --force.

    line 85
  8. Distinctive:

    If truly unavoidable (removing secrets, purging binaries, pre-PR history cleanup on a solo branch):

    line 87
  9. Very specific:

    Use --force-with-lease - never bare --force

    line 88
  10. Very specific:

    Follow semantic versioning: v1.0.0, v1.0.1, v2.0.0.

    line 105

“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

Git conventions to load before running any git command - branches, commits, merges, PRs, force-push, and tags.

When to use

  • Activate when: the user asks Claude to run any git command (commit, branch, merge, push, rebase, tag).
  • Activate when: the user asks Claude to open, update, or handle a pull request.
  • Activate proactively when: a task involves version control in any way, before acting.
  • Do NOT activate when: the task has no git/version-control component (pure reading, non-repo edits).

Steps

Step 1: Name the branch

Always fetch before branching — your local copy of the remote may be stale. Branching from old code causes merge conflicts later.

git fetch origin

Then create your branch off the freshly fetched remote:

git checkout -b <branch-name> origin/<base-branch>

Pattern: type/short-description (20 chars max including prefix).

TypePrefix
Featurefeat/
Bug fixbugfix/
Refactorrefactor/
Docsdocs/

Keep the description part short and kebab-case. If it won't fit in 20 chars, abbreviate the description - not the prefix.

Step 2: Write the commit

  • Present tense ("Add auth", not "Added auth")
  • Concise - no padding, no vague verbs like "update" or "fix stuff"
  • Reference issues/tickets when relevant: Add login validation #42

Step 3: Merge correctly

Never merge locally. The flow is:

  1. Push source branch to remote
  2. Merge happens on remote via PR only — never run git merge locally

Do not run git checkout main && git merge feature or git merge origin/main locally. Both are local merges and both are wrong. The PR is the merge.

Prefer merge over rebase — preserves history and avoids rewriting shared commits.

Step 4: Open the pull request

Every PR must have:

  • Clear title (imperative, describes the change)
  • Description explaining what and why
  • Linked issues/tickets
  • Labels
  • Reviewers assigned

Step 5: Force-push only as a last resort

Default: never. No git push --force.

If truly unavoidable (removing secrets, purging binaries, pre-PR history cleanup on a solo branch):

  1. Use --force-with-lease - never bare --force
  2. Notify the team before pushing - regardless of whether you think it's a solo branch. Someone else may have fetched it; CI may have pushed to it.
git push --force-with-lease origin <branch>
# Then: message teammates with branch name and what changed

Step 6: Tag releases

Annotated tags only for releases:

git tag -a v1.0.0 -m "Release v1.0.0"
git push origin v1.0.0

Follow semantic versioning: v1.0.0, v1.0.1, v2.0.0.

Output

  • Format: git actions executed according to these conventions, plus any branch names, commit messages, and PR text Claude produces.
  • Location: the active git repository and its remote.
  • Example: a feature branch feat/login-retry, a commit Add login retry on 401 #42, and a PR with title, what/why description, linked issue, labels, and reviewers.

Notes

  • Merge is preferred over rebase to avoid rewriting shared history.
  • --force is never bare; --force-with-lease plus a team heads-up is the only sanctioned override.
  • These are conventions, not tooling - no external dependencies required.

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.