ns-flow-gs-autobranch

Moves dirty Git work onto a gh-stack child branch with verified checkpoints.

2|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/nseng-ai/ns --skill ns-flow-gs-autobranch-nseng-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ns-flow-gs-autobranch
Source: https://github.com/nseng-ai/ns/tree/main/skills/incubating/flow/ns-flow-gs-autobranch
Command: npx skills add https://github.com/nseng-ai/ns --skill ns-flow-gs-autobranch-nseng-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Uncommitted changes sitting on a trunk branch or a stack top are risky and hard to organize into a stacked-diff workflow. This Skill safely moves dirty work onto a new gh-stack child branch, creating a durable checkpoint commit without losing or corrupting in-progress work. ## Core Features & Use Cases - Trunk bootstrap path: Creates an ordinary child branch from a dirty trunk, checkpoints the work with ns flow cp, then initializes it as the first gh-stack branch. - Tracked-top extension path: Uses native gh stack add to extend a dirty branch already tracked as the current stack top, then checkpoints the work. - Defensive preflight and verification: Validates gh-stack version 0.1.0, branch state, dirty status, and child-name availability before any mutation, and re-probes Git and gh stack view --json after every step. - Use Case: You have uncommitted changes on your main trunk and want them on a stacked branch. Invoke the command, and the Skill creates the child branch, commits the work durably, and registers it with gh-stack while refusing unsafe states. ## Quick Start Invoke the /ns:flow:gs:autobranch command with an optional child branch name to move my current dirty work onto a new gh-stack child branch.

Frequently Asked Questions about ns-flow-gs-autobranch

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

FAQPage Schema
How do I move uncommitted changes onto a new gh-stack branch?

Invoke the autobranch command with an optional child branch name. The Skill creates a child branch from your dirty trunk or extends the tracked stack top with gh stack add, then commits the work as a durable checkpoint after verifying every precondition.

What is the difference between the trunk bootstrap and tracked-top extension paths?

Trunk bootstrap handles dirty work on the Git trunk by creating an ordinary child, checkpointing it, then running gh stack init. Tracked-top extension handles a dirty branch already tracked as the stack top by running native gh stack add, then checkpointing.

Which gh-stack version does this workflow require?

It requires gh stack --version to report exactly version 0.1.0. The Skill refuses before any mutation on command failure, missing version output, version drift, or help output, since gh stack version is invalid in the 0.1.0 surface.

What happens if the gh stack add command fails partway through?

The Skill re-probes branch refs, SHAs, dirty status, and gh stack view JSON regardless of exit status. If postconditions cannot be proven, it stops with a forward-only preservation report and never retries, rolls back, deletes branches, or edits gh-stack metadata.

Can this skill extract the latest commit or initialize an existing branch?

No. It explicitly refuses latest-commit extraction, initializing an existing non-trunk branch, fetching, pushing, submitting, and any rollback. Users wanting Graphite-style latest-commit extraction are directed to the separate gt branch-latest-commit command.