xiaohongshu
xiaohongshu
git-branch-manager
Create, switch, and manage git branches with proper handling of uncommitted changes. Use when creating feature branches, switching contexts, or cleaning up after merges.
Full skill instructions
Check Repository State
Invoke the git-state-validator skill to verify:
Handle Uncommitted Changes If changes exist, ask user:
git stash push -m "WIP: switching to new branch"Ensure Latest Main
git checkout main
git fetch origin
git pull origin main
Determine Branch Prefix Based on work type:
feat/ - New featuresfix/ - Bug fixeschore/ - Maintenance, toolingdocs/ - Documentationrefactor/ - Code refactoringtest/ - Test additions/fixesperf/ - Performance improvementsCreate Branch
git checkout -b <prefix>/<description>
Branch name format:
feat/add-user-authenticationCheck Repository State
Invoke the git-state-validator skill to verify:
Handle Changes (if any)
git stash push -m "WIP: switching from <current> to <target>"Switch Branch
git checkout <branch-name>
Restore Stash (if applicable) After switching, if user stashed:
git stash list
git stash pop
Verify Branch is Merged
git branch --merged main
Switch to Main (if on the branch being deleted)
git checkout main
Check Branch Exists Before Deletion
git branch --list <branch-name>
If no output, branch doesn't exist - skip deletion
Delete Local Branch (only if exists)
git branch -d <branch-name>
Use -D (force delete) only if user explicitly confirms:
git branch -D <branch-name>
Verify Deletion
git branch --list <branch-name>
CRITICAL: Always check if branch exists before attempting deletion to avoid errors.
Safe Deletion Pattern:
# Check if branch exists
if git branch --list <branch-name> | grep -q <branch-name>; then
git branch -d <branch-name>
echo "Branch deleted"
else
echo "Branch does not exist, skipping"
fi
Why This Matters:
Good Examples:
feat/user-profile-pagefix/login-validation-errorchore/update-dependenciesdocs/api-endpoint-guideBad Examples:
my-branch (no type prefix)feat/ThisIsMyNewFeature (not kebab-case)feat/add-the-new-user-profile-page-with-authentication-and-settings (too long)Branch Already Exists: Ask user to:
git checkout <branch-name>git branch -D <branch-name> && git checkout -b <branch-name>Uncommitted Changes Conflict:
error: Your local changes to the following files would be overwritten by checkout
Merge Conflicts When Pulling:
error: Merge conflict in <file>
Cannot Delete Current Branch:
error: Cannot delete branch '<name>' checked out at '<path>'
git checkout main then retry deleteContext: Working on issue #42 to add dark mode
Action:
1. Check uncommitted changes (none found)
2. Switch to main: git checkout main
3. Update main: git pull origin main
4. Create branch: git checkout -b feat/add-dark-mode-toggle
Output: "Created and switched to feat/add-dark-mode-toggle"
Context: User has uncommitted changes, wants to switch branches
Action:
1. Detect uncommitted changes
2. Ask user: "You have uncommitted changes. Stash, commit, or abort?"
3. User chooses stash
4. Run: git stash push -m "WIP: switching branches"
5. Switch: git checkout other-branch
6. Offer to pop stash if returning later
Context: PR merged, need to clean up local branch
Action:
1. Verify branch is merged: git branch --merged main
2. Switch to main: git checkout main
3. Check if branch exists: git branch --list feat/old-feature
4. Delete branch (if exists): git branch -d feat/old-feature
5. Update main: git pull origin main
Output: "Branch cleaned up, main is up to date"
Context: User wants to fix a bug in login validation
Action:
1. Determine type: "fix" (bug fix)
2. Extract description: "login validation"
3. Format: fix/login-validation-error
4. Create: git checkout -b fix/login-validation-error
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience