From git-coach
Diagnose the current git state and recommend the single best next command. Scans status, branch tracking, stash, reflog, and in-progress merge/rebase/cherry-pick, names the situation, then gives the next command plus its undo. Use when stuck or lost in git, mid-operation, in detached HEAD, facing a merge conflict, or unsure what to do next. Read-only and suggest-only, never runs destructive recovery. Skip when the user already knows the operation they want, which is git-guide-me, or wants a concept explained, which is git-explain.
How this skill is triggered — by the user, by Claude, or both
Slash command
/git-coach:git-nextThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Coach a user who is lost or unsure in git. Figure out exactly where they are and give
Coach a user who is lost or unsure in git. Figure out exactly where they are and give
the single best next move — the literal command, why it works, and how to undo it.
Stay read-only and suggest-only: run the diagnostic commands below, but never run
destructive recovery (reset --hard, clean, --abort, --skip, force-push,
branch -D). Show those and let the user run them.
$ <literal command>
✓ <one line: what it does, plain language>
↩ undo: <reversing command, or "— (not reversible)">
Never show a recommendation without its undo.
Run these to read the situation. They are all safe. Don't guess — measure.
git status --short --branch
git branch -vv
git stash list
git log --oneline -10
git reflog -15
In-progress operation markers (check for these files/conditions):
.git/MERGE_HEAD → a merge is in progress.git/rebase-merge or .git/rebase-apply → a rebase is stopped.git/CHERRY_PICK_HEAD → a cherry-pick is in progress.git/REVERT_HEAD → a revert is in progressgit symbolic-ref -q HEAD returns non-zero (no symbolic ref) → detached HEADAlso note: is an upstream set for the current branch? ahead/behind counts?
If this isn't a git repo at all (git rev-parse --git-dir fails), say so and offer
git init or cd to the right directory — stop here.
Match the signals to exactly one row. The full table with detection + recommended
command + undo per row is in reference/situations.md — read it and use it.
Priority order when several seem to match: in-progress operation (merge / rebase / cherry-pick / revert) > detached HEAD > diverged / behind / ahead > dirty working tree > clean. An interrupted operation always wins — finish or abort it before anything else.
Situation: <plain-language name>
Why you're here: <one line — how they got into this state>
Do this:
$ <the literal command(s)>
Because: <what it does, plainly>
If it goes wrong:
$ <rollback / --abort / undo>
Then: <the likely next step once this works>
Give one recommendation, not a menu. If two paths are genuinely valid (e.g. diverged → rebase vs merge), name the trade-off in one line each and recommend the safer default.
pull --ff-only, switch -c, push/push -u): offer to run them, after showing the
command.reset --hard, clean, force-push,
branch -D, rebase, --abort, --skip): show the command and hand it to the
user to run. Explain what it will do and what it costs. Never run these for them.Always show the command before doing anything.
All bundled in this skill's reference/ directory (so it installs self-contained):
reference/situations.md — the full situation → detection → command → undo table.reference/recovery.md — "I did X, how do I undo it?" recipes. Use this for any
rescue (bad reset, lost commit, dropped stash, deleted branch, wrong-branch commit).reference/sources.md — authoritative sources. When explaining why, ground in
git help <cmd> and Pro Git, not memory.reference/git-best-practices.md — safety habits (--force-with-lease, commit before
risky ops, don't rewrite published history).npx claudepluginhub smanaton/git-coach --plugin git-coachSearches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.