git-branch
Use before the first file edit of any task in a Git repository, to choose or create the right branch — a new branch for new work, the existing branch for a…
Skill by DavidTsao1992
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/davidtsao1992-git-branch
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/git-branch
What's inside
- Skill name
git-branch- Description
- Use before the first file edit of any task in a Git repository, to choose or create the right branch — a new branch for new work, the existing branch for a fix to unmerged work — while checking for squash-merged branches, dirty trees, approved PRs and shared history.
- License
- MIT
- Instructions
- 38 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- reference.md
SKILL.md (first lines)
# Git Branch Selection
Decide which branch to work on before writing any code. Deciding after committing means
rewriting history to fix it.
1. **Establish the real state.** A stale local view is the most common cause of a wrong call:
```bash
git fetch origin --prune
git status --short --branch # dirty files, ahead/behind, detached HEAD
git branch -vv # local branches and their upstreams
git worktree list # is the branch checked out elsewhere?
gh pr status # PRs for the current branch, if gh is available
```
2. **Route the task.** Three cases only:
- **New development** → a new branch off the latest default branch, never on an unrelated
feature branch or on the default branch itself:
`git checkout -b <type>/<short-slug> origin/<default-branch>`. Get the default branch from
`gh repo view --json defaultBranchRef -q .defaultBranchRef.name` rather than assuming `main`,
and follow the naming already in `git branch -r`.
- **A fix to work that is still unmerged** → stay on that branch and add commits; its PR
updates on push. Don't open a second branch to patch a first unless asked for a stacked PR.
- **A bug that exists independently of the unmerged work** → a new branch off the default
branch. If the bug reproduces on the default branch, it isn't part of that feature.
3. **Before reusing a branch, check the risks** in [reference.md](reference.md): squash- or
rebase-merged branches that still look live, approved PRs, dirty trees, detached HEAD, shared
branches, non-default bases, branches behind their base, and worktrees.
4. **Never** stash, discard, rebase, amend published commits, or force-push without the user's
explicit say-so. If the right branch is genuinely ambiguous, ask — branching costs nothing,
committing to the wrong branch is expensive to undo.
5. **Report** in one or two lines before starting: the branch, whether it was created or reused,
its base, and any risk that applied and how it was resolved.From DavidTsao1992/neko-skill, MIT.
More from DavidTsao1992/neko-skill
- 0.565score
gh-issues
DavidTsao1992
Use when the user describes a goal ("add SSO", "make the importer resumable") rather than a single change and wants it tracked as GitHub issues — breaks it…
SkillAFreshness: AClaude Code +9 - 0.561score
python-venv
DavidTsao1992
Use before writing or running Python in a project (a .py file, a python or pip command, or a repo with requirements.txt, pyproject.toml, Pipfile, setup.py or…
SkillAFreshness: AClaude Code +9 - 0.556score
memory-log
DavidTsao1992
Use after finishing, failing, or pausing a task in a repository — records it as one timestamped, newest-first line in the repo's AI_MEMORY.md, with the single…
SkillAFreshness: AClaude Code +9 - 0.536score
memory-sync
DavidTsao1992
Use at the start of a task in a repository, before making changes — loads the repo's local AI_MEMORY.md (purpose, recent log entries, known failures, work in…
SkillAFreshness: AClaude Code +9 - 0.529score
test-smoke
DavidTsao1992
Use when asked to run the tests or check that a Python or Node repository still works — detects the test runner (pytest, or npm/yarn/pnpm test), runs it, and…
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 2
- Last commit (this folder)
- Oct 18, 2026 (12 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/DavidTsao1992/neko-skill
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from DavidTsao1992
- 0.565score
gh-issues
DavidTsao1992
Use when the user describes a goal ("add SSO", "make the importer resumable") rather than a single change and wants it tracked as GitHub issues — breaks it…
SkillAFreshness: AClaude Code +9 - 0.561score
python-venv
DavidTsao1992
Use before writing or running Python in a project (a .py file, a python or pip command, or a repo with requirements.txt, pyproject.toml, Pipfile, setup.py or…
SkillAFreshness: AClaude Code +9 - 0.556score
memory-log
DavidTsao1992
Use after finishing, failing, or pausing a task in a repository — records it as one timestamped, newest-first line in the repo's AI_MEMORY.md, with the single…
SkillAFreshness: AClaude Code +9 - 0.536score
memory-sync
DavidTsao1992
Use at the start of a task in a repository, before making changes — loads the repo's local AI_MEMORY.md (purpose, recent log entries, known failures, work in…
SkillAFreshness: AClaude Code +9 - 0.529score
test-smoke
DavidTsao1992
Use when asked to run the tests or check that a Python or Node repository still works — detects the test runner (pytest, or npm/yarn/pnpm test), runs it, and…
SkillAFreshness: AClaude Code +9
Cite this page
git-branch skill. Agent Mart. https://agentmart.dev/skills/davidtsao1992-git-branch (last updated 2026-10-24)