git-worktree-manager
Git Worktree Manager
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/alirezarezvani/git-worktree-managerWhat This Skill Does
The git-worktree-manager is a robust engineering tool designed to streamline parallel development by automating the Git worktree lifecycle. Instead of manually stashing changes or switching branches, which can lead to rebuilds and context loss, this skill allows you to maintain multiple independent directory trees for the same repository. It handles the heavy lifting of branch creation, environment synchronization, dependency installation, and, most importantly, automatic port allocation. By assigning non-conflicting ports to each worktree, it ensures that your services (like databases, Redis, or web servers) do not crash due to port binding collisions when running multiple instances simultaneously.
Installation
To integrate this into your workflow, execute the following command in your terminal:
clawhub install openclaw/skills/skills/alirezarezvani/git-worktree-manager
Ensure you have Python 3.x installed, as the utility leverages Python scripts for orchestrating Git commands and managing the port mapping registry.
Use Cases
- Parallel Feature Development: Simultaneously work on a feature branch, a hotfix, and a chore branch without interrupting local build states.
- PR Validation: Quickly spin up a pristine environment for a pull request to test changes without affecting your current primary work branch.
- Multi-Agent Orchestration: Ideal for team settings where multiple AI agents or developers need to operate within the same repository structure without interfering with each other's local environment configurations or service ports.
- Clean Lifecycle Management: Automated cleanup processes identify stale or merged branches to reclaim disk space and remove unused port allocations.
Example Prompts
- "Create a new worktree named 'wt-login-fix' for branch 'fix/login-bug' based on main, and install all necessary dependencies."
- "Cleanup all my stale worktrees that are older than 14 days and have already been merged into the main branch."
- "List all active worktrees and show me the port mapping configuration for my current project."
Tips & Limitations
- Port Strategy: The tool defaults to a base + (index * stride) approach. Ensure your applications are configured to respect these dynamic port assignments, ideally via environment variables generated by the manager.
- Resource Usage: Remember that each worktree is a full directory instance. While they share the underlying Git object database, running multiple services (Docker containers, databases) can significantly consume CPU and RAM.
- Cleanup Safety: Always review the output of the cleanup command before proceeding. While it detects merged branches, it is wise to manually verify critical unmerged work before allowing the tool to force-delete directories.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-alirezarezvani-git-worktree-manager": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
Related Skills
intl-expansion
International market expansion strategy. Market selection, entry modes, localization, regulatory compliance, and go-to-market by region. Use when expanding to new countries, evaluating international markets, planning localization, or building regional teams.
marketing-strategy-pmm
Product marketing skill for positioning, GTM strategy, competitive intelligence, and product launches. Use when the user asks about product positioning, go-to-market planning, competitive analysis, target audience definition, ICP definition, market research, launch plans, or sales enablement. Covers April Dunford positioning, ICP definition, competitive battlecards, launch playbooks, and international market entry. Produces deliverables including positioning statements, battlecard documents, launch plans, and go-to-market strategies.
paid-ads
When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ad copy,' 'ad creative,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' or 'audience targeting.' This skill covers campaign strategy, ad creation, audience targeting, and optimization.
qms-audit-expert
ISO 13485 internal audit expertise for medical device QMS. Covers audit planning, execution, nonconformity classification, and CAPA verification. Use for internal audit planning, audit execution, finding classification, external audit preparation, or audit program management.
code-reviewer
Code review automation for TypeScript, JavaScript, Python, Go, Swift, Kotlin. Analyzes PRs for complexity and risk, checks code quality for SOLID violations and code smells, generates review reports. Use when reviewing pull requests, analyzing code quality, identifying issues, generating review checklists.