to-stack

to-stack is a skill for Claude Code from helderberto/agent-skills. It costs 44 tokens per session (1,791 once invoked), scanned A, original, MIT.

A GitHub workflow skill that turns one large branch or pull request into a series of smaller, linked pull requests. It rebuilds and checks each layer so the final stack matches the tested code.

In plain words
What is it for?
Use it to split a branch or pull request, check each layer against the base branch, handle conflicts, and open the resulting pull requests with linked descriptions.
Why use it?
Large pull requests are harder to review and can hide unrelated changes. Splitting them lets reviewers handle one concern at a time while preserving the final result.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the hb plugin — 41 skills, 4 agents shipped together

Good fit Use it to split a branch or pull request, check each layer against the base branch, handle conflicts, and open the resulting pull requests with linked descriptions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/helderberto/agent-skills/to-stack
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add helderberto/agent-skills --skill to-stack
Clone the repo
git clone --depth 1 https://github.com/helderberto/agent-skills

Made for: Claude Code.

Or install hb, the plugin that ships this one along with the rest of its 41 skills, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for to-stack

README.md
[![agentmods](https://agentmods.dev/badge/skills/helderberto/agent-skills/to-stack/github.svg)](https://agentmods.dev/skills/helderberto/agent-skills/to-stack)
Your own site
<a href="https://agentmods.dev/skills/helderberto/agent-skills/to-stack"><img src="https://agentmods.dev/badge/skills/helderberto/agent-skills/to-stack/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for to-stack

Your own site · 80×15
<a href="https://agentmods.dev/skills/helderberto/agent-skills/to-stack"><img src="https://agentmods.dev/badge/skills/helderberto/agent-skills/to-stack.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01791
Opus 5.5 $0.00018 $0.00716
Sonnet 5.5 $0.00009 $0.00358
Haiku 4.5 $0.00004 $0.00179

Measured 2d ago against content hash 0e162fec750c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

to-stack scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/to-stack/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Split

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

Read the full file on GitHub · 93 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 93 lines · 44 tokens per session scan A 0e162fec750c

Subscribe to this mod's changes

to-stack is a skill published in the GitHub repository helderberto/agent-skills (17 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 1,791 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-21.

Related

Other skills, from other repositories

git-workflow-and-versioning

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple…

addyosmani/agent-skills · 89 tokens

git-workflow

Trunk-based development with atomic commits, clean history, and meaningful commit messages. Every commit should be deployable.

DevelopersGlobal/ai-agent-skills · 27 tokens

git-workflow-and-versioning

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.

borhen68/SkillEngine · 40 tokens

shipping-and-launch

Prepares production launches. Use when preparing to deploy to production. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.

borhen68/SkillEngine · 45 tokens

ship

Stage, commit, and push every current Git repository change in one operation. Use when the user says /ship, “ship it”, “commit and push everything”, “stage everything”, “push everything”, or otherwise explicitly authorizes committing all current worktree changes without splitting or reviewing them individually.

stewartcelani/skills · 61 tokens

chinese-commit-conventions

A Chinese-language guide to Conventional Commits, a format for writing consistent Git commit messages, plus related changelog, commit-checking, and commit-helper configuration.

jnMetaCode/superpowers-zh · 65 tokens