agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use for branching, committing, history repair, and release hygiene. Covers atomic commits, rebase versus merge, bisect, reflog recovery, and undoing mistakes safely. Trigger on "undo my last commit", "i messed up a rebase", "squash these commits", "find which commit broke this".
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill git-workflow --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill git-workflow -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill git-workflow -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill git-workflow -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill git-workflow -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill git-workflow -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill git-workflow -a windsurf -y
name: git-workflow description: Use for branching, committing, history repair, and release hygiene. Covers atomic commits, rebase versus merge, bisect, reflog recovery, and undoing mistakes safely. Trigger on "undo my last commit", "i messed up a rebase", "squash these commits", "find which commit broke this". Do not use for pipeline and deploy automation — see the ci-cd skill. metadata: category: development version: 1.0.0 tags: [git, version-control, rebase, bisect, workflow]
Keep history readable and recoverable. A good history is a debugging tool: it lets you bisect, revert, and explain. A bad one is a wall of "fix", "fix again", "wip".
1. **Commit atomically** — One logical change per commit. Use `git add -p` to split a messy working tree. 2. **Write the message for the future** — Subject in the imperative under 72 characters; body explaining why the change was needed. 3. **Clean before review** — `git rebase -i` to squash fixups and reorder. Reviewers should read the story, not the process. 4. **Rebase private branches, merge shared ones** — Rewriting history that others have pulled is how you lose their work. 5. **Recover with reflog** — Almost nothing is truly lost. `git reflog` shows every position HEAD has held.
**Automated bisection:**
git bisect start git bisect bad HEAD # current commit is broken git bisect good v2.14.0 # this release was fine # Any script exiting 0 for good, non-zero for bad. git bisect run pytest tests/test_checkout.py::test_total # Git prints the first bad commit, then: git bisect reset
**Recovering a branch destroyed by a bad reset:**
git reflog # find the sha from before the reset
# 8a3f1c2 HEAD@{3}: commit: add proration handling
git reset --hard 8a3f1c2 # branch is back**Splitting a messy working tree into reviewable commits:**
git add -p # stage hunks belonging to the first change git commit -m "Extract proration calculator" git add -p # stage the next logical change git commit -m "Fix double-charge on mid-cycle upgrade"
A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.