Logo van To Stack

To Stack

Community
helderberto
to-stack

Split a large branch or PR into a stack of small PRs, verified layer by layer, and open them as linked drafts.

Overzicht

Uitgeverhelderberto
Repositoryagent-skills
Skillnaamto-stack
Sterren
20
Forks
2
Meegeleverde bestanden
1
LicentieMIT
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • 1 meegeleverde bestanden

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. Bestanden zijn alleen-lezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door helderberto op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill To Stack in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/helderberto/agent-skills/tree/main/skills/to-stack
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/helderberto/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/to-stack .claude/skills/to-stack
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel To Stack in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt To Stack automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is To Stack niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

To Stack

Turn one large change into a stack: PR 1 on the base branch, each later PR on the one below it. Reviewers read one concern at a time, and the top of the stack is byte-for-byte the tree you already tested.

Arguments: $ARGUMENTS

  • A PR number or URL, or a branch. None → the current branch and its PR.
  • --each — land each PR on the base in order, each with its own version bump and CHANGELOG section. Default: merge from the top down into PR 1, which lands as one squash and one release.

Workflow

  1. Resolve.

    • Dirty tree → stop and ask to commit or stash.
    • A PR → gh pr view <PR> --json headRefName,baseRefName, then gh pr checkout <PR>. A branch → check it out. Its head is <tip>; its base is the PR's baseRefName, else the default branch.
    • git fetch origin <base>, then diff against the remote base, since a stale local base inflates the diff: git diff --stat origin/<base>...<tip> and git log --oneline origin/<base>..<tip>.
    • Tip conflicts with the base, or the base already released the planned version → merge the base in and bump first. A collision belongs to the whole change, not to one layer.
    • Under ~600 changed lines without lockfiles → say a split isn't worth it, and stop unless the user insists.

    Done when the scope is stated: "Splitting feat/x (#42) vs main: 49 files, +3432".

  2. Map. Record what every changed file needs: its imports, and for each test case the mocks, globals, helpers and options it touches. Group the changes into concerns. For shared files (manifest, entry barrel, types index, core module, README, CHANGELOG), assign each changed line to a concern. Done when every changed line has an owner. Ownership rules: references/layering.md.

  3. Plan. Order the concerns so each layer depends only on layers below it: manifest and config first, then the core, then features, then deprecated or compatibility code, so a future major deletes one layer. Each layer is tight:

    • one concern, under ~600 changed lines without lockfiles
    • green on its own
    • nothing in it waits on a later layer to be used: move a reader with its writer

    Present a table of layer, branch, contents, approximate lines and base, plus the merge strategy. An existing PR becomes PR 1, and its branch gets rewritten. Wait for an unambiguous yes. It covers building, pushing (--force-with-lease for the rewritten branch) and opening the PRs.

  4. Back up. Run git branch <branch>-full <tip>. Every later check compares against it. Done when the backup points at the tip.

  5. Build bottom-up. For each layer, on a new branch from the one below:

    • Files that land whole: git restore --source=<backup> --staged --worktree -- <paths>, listing both sides of a rename. Unlike git checkout, it also applies deletions.
    • Shared files: write only this layer's slice. In tests, keep the final cases this layer can run. If a core behavior would go untested, write the smallest stand-in case; a later layer restores the final version.
    • Manifest: only this layer's fields, then regenerate the lockfile (npm install --package-lock-only --ignore-scripts, or the repo's equivalent). The version bump goes in layer 1. With --each, each layer bumps from the one below by its own change type, so the top's version can be above the backup's.
    • Docs: only this layer's README and CHANGELOG lines, under the one version heading, or the layer's own heading with --each.
    • Stage explicit paths. Delete any generated output the base doesn't ignore yet, such as build shims, before the checks.
    • Call the Skill tool with check. Commit only if it's green: chain with &&. One conventional commit per layer.

    Done when every layer has its commit and check passed on that exact tree.

  6. Verify the stack. git diff --quiet <backup> <top> must pass, because the top layer is the original tree. With --each, run it with -- . ':!<manifest>' ':!<lockfile>' ':!CHANGELOG.md', then check that git diff <backup> <top> -- <manifest> <lockfile> CHANGELOG.md shows only version lines and version headings. If it fails, find the layer that lost or gained lines, fix it there, and restack as in step 7. Done when the diff is empty.

  7. Fold in fixes, only when the user asked for changes along with the split.

    • Commit each fix on the layer that owns the code.
    • Restack everything above it: git rebase --update-refs --onto <layer> <layer>@{1} <top>.
    • When adjacent edits conflict, keep both sides' intent.
    • Then check that each layer's files outside the fix still match the tree that passed check: git diff <green-sha> <layer> -- . ':!<fix paths>'.

    Done when the top differs from the backup by exactly the fixes.

  8. Open the drafts.

    • Push each layer branch with -u, and the rewritten PR 1 branch with --force-with-lease.
    • Bottom-up, skip a layer that already has a PR: gh pr list --head <branch> --state open.
    • Otherwise run gh pr create --draft --base <layer below> --head <branch> --title <title> --body "Part N of M". PR 1's base is the base branch.
    • Record each PR number from the printed URL.

    Done when every layer has a PR whose base is the layer below.

  9. Write the bodies. One per layer, on the repo's PR template (.github/pull_request_template.md or its variants). Each body holds:

    • Part N of M and a one-sentence summary

    • the stack as a numbered list of the PR numbers, with ← this PR

    • what the layer adds

    • review notes on anything that arrives in a later layer

    • the evidence from step 5

    • Default: PR 1 keeps the whole-change description, because its squash is what lands, with the stack and "this PR's own diff" on top. Retitle it to the whole change with --title.

    • --each: PR 1 lands alone, so its body and title cover its own layer, like the others.

    Apply each body with gh pr edit <n> --body-file <file>.

    Done when every PR body links the whole stack.

Report

A table of # | PR | Branch | Lines | Tests, then how to land it:

  • Review from PR 1 up.
  • Default: merge from the top down, squashing each PR into the one below. PR 1 merges to the base last, so no layer needs a rebase.
  • --each: merge PR 1 into the base, then rebase PR 2 onto the squashed commit (git fetch origin <base>, then git rebase --onto origin/<base> <old PR 1 tip> <PR 2>) and retarget it, and so on up the stack.
  • A fix on a lower layer: commit it there, restack with --update-refs, and push the layers above with --force-with-lease.
  • Keep the backup branch until PR 1 merges.

Next: /hb:feedback <PR 1> once reviews arrive.

Meegeleverde bestanden

Het model leest deze bestanden wanneer nodig terwijl de skill geladen is. Ze worden beschikbaar gesteld als leesbare bestanden en worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill To Stack?

Split a large branch or PR into a stack of small PRs, verified layer by layer, and open them as linked drafts.

Waarom To Stack gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. To Stack bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik To Stack in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/helderberto/agent-skills/tree/main/skills/to-stack. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen To Stack gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met To Stack gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je To Stack ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill To Stack gratis?

Ja. Deze skill is door helderberto op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇