/hoangsa:git-flowfrom hoangsa
Manages git branching, task switching, and PR lifecycle. Detects branching strategy (gitflow, trunk-based) and naming conventions automatically. Handles task start, park, resume, finish, and branch cleanup.
Ships in hoangsa. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run once per session before any flow:
# 1. Detect base branch
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'
# Fallback: check for main, master, develop
# 2. Detect branching strategy from existing branches
git branch -a --format='%(refname:short)'
# 3. Detect naming convention from recent branches
git branch --sort=-committerdate --format='%(refname:short)' | head -20
# 4. Current state
git status --porcelain
git stash list
git log --oneline -5
Strategy detection rules:
develop, release/*, hotfix/* → gitflowmain/master + feature/* → trunk-basedNaming convention detection:
feature/, feat/, fix/, bugfix/, chore/-, _, /PROJ-123, #123, no IDdevelopmain/mastermain/mastergit checkout -b <branch-name> <base-branch>
git status --porcelain)/plate, then switchgit stash push -m "WIP: <current-task-context>"git checkout -- .git checkout <branch>Two strategies — ask user preference (save to config on first ask):
wip: <context> → can be squashed latergit stash push -m "PARK: <task-context> [<branch>]"# WIP commit approach
git add -A
git commit -m "wip: <task-description>"
# Stash approach
git stash push -m "PARK: <task-description> [$(git branch --show-current)]"
After parking, optionally switch to another branch (ask user).
Trigger: "resume", "continue", "back to task X", "where was I"# Check for WIP commits on branches
git branch --sort=-committerdate --format='%(refname:short)' | while read b; do
git log -1 --format='%s' "$b" 2>/dev/null | grep -q '^wip:' && echo "$b"
done
# Check stash list
git stash list | grep 'PARK:'
git stash popgit reset HEAD~1 to unstage, or keep working and squash later)
/plategit push -u origin $(git branch --show-current)
gh pr create --title "<title>" --body "<body>" --base <base-branch>
/serve if external task linked (update status to "In Review")# Find merged branches
git branch --merged <base-branch> --format='%(refname:short)' | grep -v -E '^(main|master|develop)$'
# Show list, confirm with user
# Delete confirmed branches
git branch -d <branch>
# Prune remote tracking
git remote prune origin
Trigger: "pull latest", "rebase", "sync", "update from main"
# If merge commits exist → merge strategy
git log --oneline --merges -5
# Rebase strategy (default for feature branches)
git fetch origin
git rebase origin/<base-branch>
# Merge strategy
git fetch origin
git merge origin/<base-branch>
Read/write via:
"$HOANGSA_BIN" pref get . <key>
"$HOANGSA_BIN" pref set . <key> <value>
This skill is integrated into HOANGSA workflows via the shared `git-context.md` module:
| Workflow | Integration Point | Behavior |
|---|---|---|
/menu | Step 1c (after session init) | Create branch for new feature |
/fix | Step 3 (after session init) | Create branch for bugfix |
/cook | Step 1c (before execution) | Verify correct branch |
/plate | Step 6 (after commit) | Push + PR + switch options |
The skill provides the knowledge; git-context.md provides the executable steps that workflows reference.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
git-branching, task-switching, pr-creation, branch-cleanup, git-workflow
npx claudepluginhub unknown-studio-dev/hoangsa --plugin hoangsa11 skills in this plugin
/fe-testingThis skill should be used when the user is building, changing, or trying to verify a frontend feature on web (React/Vite) or React Native/Expo, and is unsure how to prove it actually works. Triggers on phrases like 'how do I test this component/screen', 'verify this feature', 'make sure this works on web/mobile', 'is this covered by tests', 'my tests pass but the feature is broken', 'no tests yet', or before shipping any FE change. Guides the full loop: define verifiable success criteria before coding, write tests at the correct layer (logic/component/E2E/visual), and confirm behavior by running the real app./memory-cliUse when the user needs to run hoangsa-memory CLI commands — init / index / query / watch / memory / archive / impact / context / changes / graph / projects. Examples: "index this repo", "show memory", "trace the graph", "find taint paths", "consolidate memory".
/memory-debuggingUse when the user is debugging a bug, tracing an error, or asking why something fails. Examples: "why is X failing?", "where does this error come from?", "trace this bug", "who calls this method?", "this endpoint returns 500".
/memory-disciplineThis skill should be used before any non-trivial coding action — editing code, writing new files, running migrations, deploying, or answering a question that involves factual claims about this codebase. It forces the agent to consult hoangsa-memory's persistent memory (USER.md, MEMORY.md, LESSONS.md, the indexed code graph) and acknowledge relevant lessons before acting. Trigger phrases: "edit", "refactor", "implement", "fix the bug in", "add a feature", "deploy", "why does this do", "how does X work".
/memory-exploringUse when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: "how does X work?", "what calls this function?", "show me the auth flow", "where is the DB logic?".
/memory-guideUse when the user asks about hoangsa-memory itself — available MCP tools, CLI commands, resources, prompts, skill catalog, or how to drive the memory/graph workflow. Examples: "what hoangsa-memory tools are available?", "how do I use hoangsa-memory?", "what skills do I have?".
Other plugins' skills for the same job