feat: add git-wt worktree management to developer plugin#57
feat: add git-wt worktree management to developer plugin#57devin-ai-integration[bot] wants to merge 5 commits into
Conversation
Bundle the git-wt script from vojtabiberle/git-wt as a new skill and slash command in the developer plugin, enabling Claude to manage git worktrees for parallel development workflows. - Add git-worktree skill with SKILL.md and bundled git-wt script (v1.0.0) - Add /worktree slash command (add/rm/ls/help subcommands) - Allow git worktree and git wt bash permissions in settings template - Update plugin structure docs in README - Bump developer plugin to 1.8.0, marketplace to 1.7.0 Co-Authored-By: Martin Vasko <Matovidlo2@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Martin Vasko <Matovidlo2@gmail.com>
Replace the bundled git-wt script with an ensure-git-wt.sh setup script that clones/pulls vojtabiberle/git-wt to ~/.local/share/git-wt on each use. This keeps the tool always up-to-date with upstream. Co-Authored-By: Martin Vasko <Matovidlo2@gmail.com>
Co-Authored-By: Martin Vasko <Matovidlo2@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR adds git worktree management capability to the developer plugin through the external git-wt helper script. The implementation creates a new slash command /worktree and corresponding skill that fetches the git-wt tool from its upstream GitHub repository at runtime, enabling Claude to manage parallel development workflows via git worktrees.
Changes:
- New git-worktree skill with runtime fetching of external git-wt script
- New
/worktreeslash command with subcommands (add, rm, ls, help) - Bash permissions for
git worktree:*andgit wt:*commands
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/developer/skills/git-worktree/SKILL.md | Skill documentation for git worktree management with git-wt |
| plugins/developer/skills/git-worktree/scripts/ensure-git-wt.sh | Script to clone/update git-wt from upstream repository |
| plugins/developer/commands/worktree.md | Slash command definition for /worktree |
| plugins/developer/templates/settings.json | Added bash permissions for git worktree and git wt commands |
| plugins/developer/README.md | Documentation updates for worktree feature and version bump to 1.8.0 |
| plugins/developer/.claude-plugin/plugin.json | Version bump to 1.8.0 |
| .claude-plugin/marketplace.json | Version bump to 1.7.0 and developer plugin to 1.8.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Pin ensure-git-wt.sh to specific commit (f44fbfe) for supply-chain safety - Use fetch+checkout instead of pull for resilient updates - Add error handling with fallback for network failures - Verify git-wt executable exists after clone - Remove unused Bash(git wt:*) permission from settings.json - Fix slash command: remove dependency, use inline clone logic - Fix slash command: validate subcommands and safely pass arguments - Clarify init command should not use --non-interactive - Fix SKILL.md wording about session/invocation behavior Co-Authored-By: Martin Vasko <Matovidlo2@gmail.com>
Matovidlo
left a comment
There was a problem hiding this comment.
@tomasfejfar I have tried to kickoff the git wt from Vojta but I am unsure how you meant it that it can be used via this plugin. I thought that it clones the repo if you do not have it or pull latest main and simply it uses it. I am not sure whether the skills of using it etc. shouldn't be rather there or here used by the agent
Summary
Adds git-wt worktree management to the developer plugin as a new skill and slash command, enabling Claude to manage git worktrees for parallel development workflows.
Instead of bundling the script, an
ensure-git-wt.shsetup script clones the upstream repo to~/.local/share/git-wtat runtime, pinned to a known-good commit (f44fbfe) for supply-chain safety. Updates are attempted viafetch + checkoutwith graceful fallback to the existing local version on network failure.What's added:
plugins/developer/skills/git-worktree/— skill with SKILL.md andensure-git-wt.sh(clones upstream, pinned to commit)plugins/developer/commands/worktree.md—/worktreeslash command (add,rm,ls,help) with subcommand validationgit worktree:*bash permission intemplates/settings.jsonUpdates since last revision
Addressed all 8 Copilot code review comments:
git pullwithfetch + checkoutpinned to commitf44fbfe; added error handling with fallback for network failures; added clone error messages; added post-clone verification that thegit-wtexecutable exists$SKILL_DIRdependency (uses inline clone logic instead); added subcommand allowlist (add|rm|ls|help) with safe argument passing viacasestatementBash(git wt:*)permission (git-wt is not installed as a git subcommand)--non-interactiveshould not be used withinitcommandReview & Testing Checklist for Human
worktree.mduses$ARGUMENTS— verify Claude Code actually resolves this variable in slash command context. If not, the argument parsing will fail silently.worktree.md) uses inline clone logic that does not pin to the commit, while the skill'sensure-git-wt.shdoes pin. Consider whether this inconsistency is acceptable or if the slash command should also pin.tomasfejfar-worktree-skill-with-stale-detectionhas an alternative worktree skill with stale-worktree detection. Confirm this is the intended approach.f44fbfeis the current HEAD ofvojtabiberle/git-wt. To update in the future, changeGIT_WT_PINNED_COMMITinensure-git-wt.sh.Suggested test plan:
/worktree lsand verify it executes correctlyNotes
Release Notes
Justification, description
Adds git worktree management capability to the developer plugin via the external git-wt helper script, fetched from upstream at runtime and pinned to a known-good commit for security.
Plans for Customer Communication
N/A
Impact Analysis
N/A
Deployment Plan
N/A
Rollback Plan
N/A
Post-Release Support Plan
N/A