worktree-from-issue
Create a git worktree with a new branch for implementing a fix or feature for a GitHub issue
Best use case
worktree-from-issue is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create a git worktree with a new branch for implementing a fix or feature for a GitHub issue
Teams using worktree-from-issue should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/worktree-from-issue/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How worktree-from-issue Compares
| Feature / Agent | worktree-from-issue | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create a git worktree with a new branch for implementing a fix or feature for a GitHub issue
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# Git Worktree for Issue Implementation
Set up an isolated git worktree with a new branch to implement a fix or feature for a GitHub issue.
Parse `$ARGUMENTS` to extract the branch name in format `<category>/<issue-number>-<short-description>`.
## Branch Naming Convention
Branches must follow the pattern from CONTRIBUTING.md:
```
{category}/{ticket-id}-description-of-the-branch
```
Categories: **feat**, **fix**, **exp**, **test**, **docs**, **keep** (all lowercase, dashes, no underscores).
For `feat` and `fix`, a ticket number is mandatory.
Examples:
- `fix/3562-clickhouse-drop-sync-perf`
- `feat/1234-add-new-destination`
## Steps
### 1. Parse and validate
Extract from `$ARGUMENTS`:
- `branch_name`: Full branch name (e.g., `fix/3562-clickhouse-drop-sync-perf`)
- `category`: Prefix before `/` (e.g., `fix`)
- `issue_number`: Number after `/` and before first `-` (e.g., `3562`)
- `short_name`: Directory-friendly version: `{category}-{issue_number}-{first-few-words}` (e.g., `fix-3562-clickhouse-drop-sync`)
Validate the branch name matches pattern `(feat|fix|exp|test|docs|keep)/[0-9]+-[a-z0-9-]+`.
### 2. Verify the issue exists
```
gh issue view <issue_number> --json number,title,state
```
Warn if the issue doesn't exist or is closed, but continue.
### 3. Fetch latest devel
Fetch the newest devel from origin so the branch starts from the latest code:
```
git fetch origin devel
```
### 4. Create the worktree
Use `/create-worktree` skill:
```
/create-worktree <short_name> --branch origin/devel
```
Then create the feature branch inside the worktree:
```
git -C <worktree-path> checkout -b <branch_name>
```
### 5. Set up dev environment
Use `/worktree-make-dev` skill to set up the development environment in the worktree. This runs `make dev` and copies `secrets.toml`.
Note which secrets source was used — this determines what destinations can be tested.
### 6. Verify cwd
After dev setup, verify the cwd is still in the worktree:
```
pwd
```
If `pwd` does not show the worktree path, run `cd <worktree-path>` and verify again. Stop with an error if the cwd cannot be set.
### 7. Report
Report the worktree info and available test destinations:
```
Worktree ready: <worktree-path>
Branch: <branch_name> (based on origin/devel)
Issue: #<issue_number> - <issue_title>
```
Include the test credential availability from `/worktree-make-dev` output — downstream skills need this to know which destinations can be tested.Related Skills
worktree-make-dev
Set up a dev environment in an existing worktree (make dev + copy secrets)
switch-worktree
Switch the current session to work in an existing git worktree
implement-issue
Triage, plan, and implement a fix or feature for a GitHub issue end-to-end
create-worktree
Create or reuse a git worktree for a pull request or branch so reviews and work happen in isolation
find-source
No description provided.
review-pr
Analyze a GitHub pull request including diff, comments, related issues, and local code context
release-notes
Generate release notes between two git tags with categorized PR summaries and author attribution
optimize-code
Analyze and optimize Python code performance in critical paths
dashboard
Use when reading, editing, or creating files in dlt/_workspace/helpers/dashboard/ or tests/workspace/helpers/dashboard/ or tests/e2e/
auto-write-test-rules
Use when adding or proposing a new test ONLY if the test rules are not present
auto-import-rules
Enforces dlt import conventions and ordering. Use when writing or modifying Python imports in dlt/ or tests/.
auto-docstring-rules
Enforces dlt docstring conventions. Use when writing or modifying docstrings, classes, or function signatures in Python files.