graft-worktree-init

Initialize git worktrees for Graft repositories with shared resource links.

6|Updated May 11, 2026
One-click install
npx skills add https://github.com/GeWuYou/Graft --skill graft-worktree-init
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graft-worktree-init
Source: https://github.com/GeWuYou/Graft/tree/main/.agents/skills/graft-worktree-init
Command: npx skills add https://github.com/GeWuYou/Graft --skill graft-worktree-init

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python, and includes scripts (resource) components.

What problem does it solve?

This Skill helps automate the creation of local git worktrees for Graft, ensuring compliance with the repository's shared resource rules and without the need for hardcoded root paths.

Core Features & Use Cases

  • Worktree Creation: Automates the creation of new or rebuilding of existing worktrees for Graft projects.
  • Branch and Resource Management: Allows specification of the branch to be used and manages local resource links.
  • Error Handling and Validation: Ensures all paths are safe and checks for required files before proceeding.

Quick Start

To create a worktree for branch 'feature/new-branch' using 'main' as the base, run:

python3 .agents/skills/graft-worktree-init/scripts/graft_worktree_init.py feature/new-branch --base_branch main

Frequently Asked Questions about graft-worktree-init

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a git worktree for a Graft repository with shared resources?

To create a git worktree for Graft, run the Python initialization script with your target branch and base branch arguments. It automates local branch setup, link creation, and shared resource management based on manifest definitions.

Why does my Graft worktree setup require hardcoded root paths?

Your Graft worktree setup does not require hardcoded root paths. This initialization script manages local resource links automatically, ensuring compliance with the repository's shared resource rules without hardcoded paths.

Do I need Python and git command-line tools to initialize a Graft worktree?

Yes, you need both Python and git command-line tool access to initialize a Graft worktree. The script relies on Python to execute the automation logic and git to manage the local branch setup and worktree creation.

How does the Graft worktree initialization handle existing worktrees and errors?

Graft worktree initialization handles existing worktrees by rebuilding them and includes error handling and validation. It ensures all paths are safe and checks for required manifest files before proceeding with link creation.

What is the best way to automate branch and resource management for git worktrees?

The best way to automate branch and resource management for git worktrees is using a script that specifies the branch and manages local resource links. This ensures safe paths and validates required files before proceeding with creation.

Can I specify a base branch when setting up a new git worktree?

Yes, you can specify a base branch when setting up a new git worktree. By passing the base branch argument to the initialization script, it uses that branch as the starting point for your new local worktree.