Skip to content

feat: add git-wt worktree management to developer plugin#57

Draft
devin-ai-integration[bot] wants to merge 5 commits into
mainfrom
devin/1772202475-add-git-wt-to-developer-plugin
Draft

feat: add git-wt worktree management to developer plugin#57
devin-ai-integration[bot] wants to merge 5 commits into
mainfrom
devin/1772202475-add-git-wt-to-developer-plugin

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Feb 27, 2026

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.sh setup script clones the upstream repo to ~/.local/share/git-wt at runtime, pinned to a known-good commit (f44fbfe) for supply-chain safety. Updates are attempted via fetch + checkout with graceful fallback to the existing local version on network failure.

What's added:

  • plugins/developer/skills/git-worktree/ — skill with SKILL.md and ensure-git-wt.sh (clones upstream, pinned to commit)
  • plugins/developer/commands/worktree.md/worktree slash command (add, rm, ls, help) with subcommand validation
  • git worktree:* bash permission in templates/settings.json
  • Version bumps: plugin → 1.8.0, marketplace → 1.7.0

Updates since last revision

Addressed all 8 Copilot code review comments:

  • ensure-git-wt.sh: Replaced git pull with fetch + checkout pinned to commit f44fbfe; added error handling with fallback for network failures; added clone error messages; added post-clone verification that the git-wt executable exists
  • worktree.md (slash command): Removed $SKILL_DIR dependency (uses inline clone logic instead); added subcommand allowlist (add|rm|ls|help) with safe argument passing via case statement
  • settings.json: Removed unused Bash(git wt:*) permission (git-wt is not installed as a git subcommand)
  • SKILL.md: Fixed misleading "run once per session" heading; clarified that --non-interactive should not be used with init command

Review & Testing Checklist for Human

  • Slash command variable resolution: worktree.md uses $ARGUMENTS — verify Claude Code actually resolves this variable in slash command context. If not, the argument parsing will fail silently.
  • Slash command vs skill divergence: The slash command (worktree.md) uses inline clone logic that does not pin to the commit, while the skill's ensure-git-wt.sh does pin. Consider whether this inconsistency is acceptable or if the slash command should also pin.
  • Overlap with existing branch: Branch tomasfejfar-worktree-skill-with-stale-detection has an alternative worktree skill with stale-worktree detection. Confirm this is the intended approach.
  • Pinned commit freshness: The pinned commit f44fbfe is the current HEAD of vojtabiberle/git-wt. To update in the future, change GIT_WT_PINNED_COMMIT in ensure-git-wt.sh.

Suggested test plan:

  1. Install the plugin in Claude Code
  2. Test the skill: In a git repo, ask Claude to "create a worktree for feature/test from main" and verify it works
  3. Test the slash command: Run /worktree ls and verify it executes correctly
  4. Test network failure mode: Disconnect network, run the skill again, verify it falls back to existing version with a warning

Notes

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

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-integration
Copy link
Copy Markdown
Contributor Author

devin-ai-integration Bot commented Feb 27, 2026

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration Bot and others added 3 commits February 27, 2026 14:31
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /worktree slash command with subcommands (add, rm, ls, help)
  • Bash permissions for git worktree:* and git 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.

Comment thread plugins/developer/skills/git-worktree/scripts/ensure-git-wt.sh Outdated
Comment thread plugins/developer/skills/git-worktree/scripts/ensure-git-wt.sh
Comment thread plugins/developer/skills/git-worktree/SKILL.md Outdated
Comment thread plugins/developer/templates/settings.json Outdated
Comment thread plugins/developer/skills/git-worktree/SKILL.md Outdated
Comment thread plugins/developer/commands/worktree.md Outdated
Comment thread plugins/developer/skills/git-worktree/scripts/ensure-git-wt.sh Outdated
Comment thread plugins/developer/commands/worktree.md Outdated
- 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>
Copy link
Copy Markdown
Contributor

@Matovidlo Matovidlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants