xiaohongshu
xiaohongshu
worktree-tending
Manage git worktrees for parallel branch development using custom git scripts (git-newtree, git-killtree, git-maingulp). Use when creating new worktrees, listing active worktrees, or closing/merging worktrees back to main. All worktrees are stored in .tree/ subdirectories of the repository.
Full skill instructions
This skill helps manage git worktrees using a customized workflow with scripts stored in ~/bin/. Worktrees enable working on multiple branches simultaneously by creating separate working directories that share the same git repository. All worktrees are stored in .tree/ subdirectories.
The typical worktree lifecycle:
git newtreeCRITICAL INSTRUCTION: After completing any worktree operation (create, merge, delete, archive), you MUST always run git worktree list and display the current state of all worktrees before yielding control back to the user.
This helps the user maintain awareness of their worktree state and verify that operations completed successfully.
Example output format:
**Current worktrees (N total):**
- `/path/to/repo` - detached HEAD (commit-hash)
- `/path/to/repo.bare` - detached HEAD (commit-hash)
- `feature-name` - branch: feature-name
- `maincomp` - branch: main
To create a new worktree for a branch:
git newtree <tree-name> [branch-name]
Behavior:
.tree/<tree-name>.env, .envrc, and .claude/ to the new worktree if presentExamples:
git newtree feature-x # Creates .tree/feature-x with branch 'feature-x'
git newtree fix check/lint-graphql # Creates .tree/fix with existing branch 'check/lint-graphql'
When to use: User asks to create a new worktree, start work on a new branch, or work on a branch in parallel.
To show all active worktrees with status:
git worktree list
Output format:
/path/to/repo commit-hash (detached HEAD)
/path/to/repo/.tree/feature-x commit-hash [feature-x]
/path/to/repo/.tree/maincomp commit-hash [main]
Interactive selection with fzf: When closing or switching worktrees, use fzf for interactive selection of worktrees from the list.
When to use: User asks to see active worktrees, list branches being worked on, or needs to select a worktree to close.
When closing a worktree, always ask the user whether to merge back to main or just remove the worktree.
Use git maingulp to merge changes back to main and cleanup:
cd .tree/maincomp # or wherever main branch worktree is
git maingulp <branch-name> <worktree-path>
Requirements:
Example:
cd .tree/maincomp
git maingulp feature-x .tree/feature-x
When to use: Work is complete and ready to be merged into main.
Use git killtree to remove worktree without merging:
git killtree <worktree-path> [--force]
Behavior:
Examples:
git killtree .tree/feature-x # Remove worktree, delete if merged
git killtree .tree/experiment --force # Force remove unmerged work
When to use: Work is abandoned, experimental, or will be merged manually later.
When the user asks to close a worktree without specifying which one, use fzf for interactive selection:
# First list worktrees
git worktree list
# Parse the output and use fzf to let user select
# Then confirm merge vs. remove decision
Example interaction:
git worktree list outputSee references/git-scripts-reference.md for detailed documentation of all git scripts including git-archivebranch and git-substat.
origin/main
git checkout --detach origin/main.tree/ subdirectory.tree/maincomp or similar.tree/<name> directoryStarting new feature work:
git newtree my-feature
cd .tree/my-feature
# work on feature
Completing and merging feature:
cd .tree/maincomp
git maingulp my-feature .tree/my-feature
Abandoning experimental work:
git killtree .tree/experiment --force
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