agentsclimarketplace

Git ship flow

Skill megandmartin/agent-skills-repo/skills/builder-dev/git-ship-flow

75 production-grade agent skills for Hermes Agent + Paperclip — research, write, organize, earn, and run an AI workforce. Every skill passes a QA gate with hard safety rails. Built by Gen AI Hub.

Install
npx -y skills add megandmartin/agent-skills-repo --skill git-ship-flow

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 15 days oldThe repository was created 15 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Safe git workflow for non-developers — init, branch, commit, push, open a PR, and undo mistakes without losing work. Use when the user says "commit this", "push my changes", "make a branch", "open a PR", "I messed up git", "undo my last commit", or is shipping code and doesn't know git well. Don't use for reviewing someone else's PR diff — use github-pr-review.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.1 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

Git Ship Flow

The one safe path through git for people who build with AI and don't want to think about git internals: branch → commit → push → PR, plus the exact undo move for every common mistake. Core promise: with this flow you can always get your work back, and you can never destroy a teammate's.

When to Use

  • User wants to save/ship their changes: "commit this", "push it", "get this on GitHub".
  • User is starting a feature and should be on a branch, not main.
  • Something went wrong: wrong commit message, committed to main by accident, need to undo.
  • Not for: reviewing a PR someone else opened — use github-pr-review. Not for writing release notes from history — use changelog-release-notes.

Quick Reference

ActionCommand / Call
See where you aregit status && git branch --show-current
Start a feature branchgit switch -c feat/short-name
Stage + commitgit add -A && git commit -m "feat: what changed and why"
Push branch (first time)git push -u origin feat/short-name
Open PR (needs gh)gh pr create --fill (fallback: push, then open the URL git prints)
Safe undo of a pushed commitgit revert <sha>
Unstage without losing editsgit restore --staged <file>
Rescue "lost" workgit reflog (then git switch -c rescue <sha>)

Procedure

  1. Precheckcommand -v git; then git status. If not a repo: git init and confirm a .gitignore exists (create one covering .env, node_modules/, .DS_Store before the first commit — see env-secrets-hygiene). Note the current branch.
  2. Get off main — if the user is starting new work on main/master, create a branch first: git switch -c feat/short-name. If they already edited files on main, no problem — git switch -c feat/short-name carries uncommitted changes with them.
  3. Secret scan before staginggit diff --stat to see what's changing, and eyeball for .env, keys, or credentials. If anything secret is in the diff, stop and run env-secrets-hygiene first.
  4. Commitgit add -A && git commit -m "type: summary". Message formula: what changed + why, under ~70 chars, e.g. fix: stop signup form clearing on error. Success: git log --oneline -1 shows it.
  5. Pushgit push -u origin <branch>. Success: git prints the remote branch and usually a ready-made PR URL.
  6. PRgh pr create --fill if the GitHub CLI is installed (command -v gh); otherwise use the URL from step 5. Title = the commit summary; body = what/why + how you tested.
  7. Undo (only when asked) — pick from the table below, never guess:
SituationSafe moveWhy
Wrong message, not pushed yetgit commit --amend -m "new msg"Rewrites only your local last commit
Committed too early, not pushedgit reset --soft HEAD~1Uncommits but keeps every edit staged
Bad commit already pushedgit revert <sha>Adds a new "opposite" commit; history stays intact
Committed to main by accidentgit switch -c feat/x then on main git revert <sha>Work lives on the branch; main is cleaned safely
Want one file back to last commitgit restore <file>⚠️ Destroys uncommitted edits to that file — confirm first
  1. The never rule — never git push --force and never git reset --hard on anything pushed or shared. If the user asks for either, explain that revert does the job without rewriting shared history, and proceed with force only if they explicitly confirm they understand teammates' work can be lost (--force-with-lease at minimum, on their own branch only).

Output Template

## Shipped ✅
Branch: feat/short-name  (from main @ <sha>)
Commit: <sha> — "feat: what changed"
Pushed: yes → origin/feat/short-name
PR: <url>  (or: "run `gh auth login` to open PRs from the terminal")
Undo, if needed: git revert <sha>  (safe — does not rewrite history)

Pitfalls

  • Committed a secret (.env, API key) — the key is now in history; deleting the file in a new commit does NOT remove it. Recovery: rotate the key immediately, then follow env-secrets-hygiene for history cleanup. Rotation first, always.
  • "detached HEAD" panic — user checked out a sha and thinks work is gone. Recovery: git switch -c rescue-branch right there; everything is saved on the new branch.
  • Push rejected (non-fast-forward) — remote has commits you don't. Recovery: git pull --rebase origin <branch>, resolve any conflicts, push again. Never "fix" this with --force.
  • Committed to main instead of a branch — recovery: git branch feat/x (bookmarks the work), then git reset --hard origin/main ONLY if main was not pushed since — otherwise git revert the commits on main and open a PR from feat/x.
  • Merge conflict mid-rebase — files full of <<<<<<< markers. Recovery: open each file, keep the correct lines, delete all marker lines, git add <file>, git rebase --continue. If overwhelmed: git rebase --abort returns to the pre-rebase state, nothing lost.

Verification

  • git status is clean (nothing unintentionally uncommitted)
  • Work is on a feature branch, not main (unless user explicitly wanted main)
  • git log --oneline -3 shows the expected commit(s) with clear messages
  • Branch visible on the remote (push output or git ls-remote --heads origin <branch>)
  • No secrets in the diff (git show --stat HEAD reviewed)
  • No force-push or hard reset ran without the user's explicit confirmation

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 327,132. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.