Logo di Worktree Merge

Worktree Merge

Community
coleam00
worktree-merge

Integrate any number of feature branches from parallel worktrees through one safe integration branch, validating after each merge and running the project's full check suite before touching the main line. Use when parallel worktree development is done and the branches need to be merged, or when the user says "merge my worktrees", "integrate these branches", or invokes /worktree-merge.

Panoramica

Pubblicato dacoleam00
Repositoryskills
Nome della skillworktree-merge
Stelle
678
Fork
184
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da coleam00 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Worktree Merge in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/coleam00/skills/tree/main/.claude/skills/worktree-merge
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/coleam00/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/.claude/skills/worktree-merge .claude/skills/worktree-merge
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Worktree Merge in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Worktree Merge non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Worktree Merge non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Worktree Merge

Integrate any number of feature branches into your working branch through a single throwaway integration branch, so nothing lands on the main line until every branch is merged and the whole suite passes. Validation commands are detected from the repo, never assumed.

Input

$ARGUMENTS is the list of branches to integrate.

  • Fewer than two → ask which branches to integrate. Don't guess.
  • Two or more → integrate them in the given order.

Detect the validation commands ONCE

Find the commands that prove this project works, preferring what CI already runs: read .github/workflows/*, a Makefile, or the manifest's test/lint scripts, and reuse those exact commands (test runner, type checker, linter). Do not hardcode pytest/mypy/pyright — use whatever this repo actually uses.

Steps

  1. Preconditions. Confirm you're at the repository root, not inside worktrees/ ([[ $(pwd) =~ /worktrees/ ]] → error). Store the current branch. Verify every branch in the list exists (git rev-parse --verify <branch>). Abort early with a clear message if any check fails.

  2. Create one integration branch off the current branch, named for the set (e.g. integration-<first>, with a short suffix if there are several — keep it filesystem-safe). This is where merges are tested; the main line stays untouched until the end.

  3. Merge each branch in order, --no-ff. After each merge, run the detected test command so a break is localized to the branch that caused it.

    • On conflict: stop, name the conflicting branch and files, and give resolution steps (resolve → git add → git commit → re-run the skill). Don't attempt automatic resolution.
    • On test failure: stop, report which tests failed, and give the rollback (git checkout <original> → git branch -D <integration>).
  4. Full validation once all branches are merged: run the project's complete detected suite (tests + type checks + lint). Any failure → report it and roll back; nothing reaches the main line red.

  5. Merge the integration branch into the original branch (--no-ff), then delete the integration branch.

  6. Offer cleanup with AskUserQuestion: remove the N worktrees and delete their feature branches, or keep them. On yes, for each branch: git worktree remove worktrees/<branch> and git branch -d <branch>.

Report

  • Success: the integration branch used, each branch merged (with its post-merge test result), the full validation result, the merge into <original>, and cleanup status (worktrees kept or removed, with the manual cleanup commands if kept).
  • Failure: the step and branch that failed, the current branch state, and exact rollback commands (git checkout <original> → git branch -D <integration>), plus how to continue after fixing (re-run with the same branch list).

Notes

  • --no-ff preserves each feature branch's history.
  • The integration branch is disposable — the original branch only moves after every merge and the full suite pass.
  • Prefer opening a PR per branch when you're on a team; this skill is for fast local integration when you own the merge.

Domande frequenti

Cosa fa la skill IA Worktree Merge?

Integrate any number of feature branches from parallel worktrees through one safe integration branch, validating after each merge and running the project's full check suite before touching the main line. Use when parallel worktree development is done and the branches need to be merged, or when the user says "merge my worktrees", "integrate these branches", or invokes /worktree-merge.

Perché usare Worktree Merge su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Worktree Merge è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Worktree Merge in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/coleam00/skills/tree/main/.claude/skills/worktree-merge. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Worktree Merge?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Worktree Merge?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Worktree Merge: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Worktree Merge è gratuita?

Sì. È pubblicata su GitHub da coleam00 con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇