AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Ghstack Workflow

skill-shikanime-labs-skills-ghstack-workflow · by shikanime-labs

A Claude skill from shikanime-labs/skills.

No reviews yet
0 installs
35 views
0.0% view→install

Install

$ agentstack add skill-shikanime-labs-skills-ghstack-workflow

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-shikanime-labs-skills-ghstack-workflow)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Ghstack Workflow? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

ghstack + jj: Stacked PR Workflow

Manage stacked pull requests using ghstack (or gh stack) with Jujutsu (jj) as the local VCS. Each commit becomes exactly one PR.

Core Concept

1 commit  ==  1 PR
N commits ==  N PRs  (called a "stack")

Each PR's base is the commit below it. Reviewers see only that layer's diff. The bottom PR targets main (or trunk).

commit-3  -> PR #3 (base: commit-2)   PR #2 (base: commit-1)
commit-1  -> PR #1 (base: main)      //base`, `gh///head`, `gh///orig`.

## Workflow: Update a PR in the Stack

```bash
# 1. Edit files as needed
# 2. Squash changes into the TARGET commit (NOT a new commit)
jj squash -r 
# 3. Resubmit the entire stack
ghstack

Critical: Use jj squash (not jj commit) to amend an existing commit. This preserves the 1-commit-1-PR mapping.

Targeting a specific commit

# Squash working copy into a specific revision
jj squash -r 

# Or squash a specific revision into another
jj squash  -d 

Workflow: Land (Merge) a Stack

# Land a specific PR (cascading rebase + merge)
ghstack land 
# OR: ghstack land #
# OR: gh stack merge 

Never use gh pr merge or the GitHub UI merge button on a ghstack PR. This breaks the stack's base branch tracking and produces [ghstack-poisoned] commits.

Workflow: Rebase a Stack onto Updated Main

# Fetch latest main, then rebase the entire stack
jj rebase -d main
# Then resubmit
ghstack

Never git merge into a ghstack branch — ghstack will error because each commit must remain a separate PR.

Workflow: Checkout an Existing Stack

# By PR number
ghstack checkout 
# OR: gh stack checkout 

Workflow: Sync PR Descriptions

# Sync GitHub PR descriptions back to local commit messages
ghstack sync

Branch Structure (Internal)

For each commit N in a stack, ghstack creates three branches:

| Branch | Purpose | | ---------------- | --------------------------------------------------------- | | gh/user/N/base | Base branch (like main). Never force-pushed. | | gh/user/N/head | The actual change. PR targets base. Never force-pushed. | | gh/user/N/orig | Exact local commit. Not visible on GitHub. |

Pitfalls

  1. Never gh pr merge on a ghstack PR. Always use ghstack land. The UI

merge button breaks base branch tracking.

  1. Never force-push ghstack branches manually. ghstack manages branch

pointers. Manual force-poisoning corrupts the stack.

  1. Never git merge into a ghstack branch. Use jj rebase instead. Merge

commits break the 1-commit-1-PR invariant.

  1. Use jj squash not jj commit for updates. A new commit means a new PR.

Squashing preserves the existing PR.

  1. Rebase before resubmit. If main has moved, rebase your stack first:

jj rebase -d main then ghstack.

  1. Stack order matters. Commits are stacked in topological order (oldest =

bottom). Reorder with jj rebase -r -d before submitting.

  1. ghstack vs gh stack: ghstack (ezyang) is the Python CLI with

~/.ghstackrc. gh stack (GitHub official) is a Go-based gh extension with .git/gh-stack metadata. They are NOT compatible — pick one per repo.

  1. Splitting a stack into separate PRs. When asked to split changes into

individual PRs (1 commit == 1 PR), use ghstack submit for each commit. If ghstack submit fails mid-stack (e.g., timeout, duplicate commit error), push remaining commits as separate branches and create PRs manually:

``bash # Push each commit to its own branch git push origin :refs/heads/fix/ # Create PRs manually, basing each on the previous PR's head branch gh pr create --title "..." --head fix/ --base ``

This preserves the stack relationship without relying on ghstack's internal tracking.

Quick Reference

| Task | Command | | ----------------- | --------------------------------------- | | Create stack | jj commit -m "..." x N → ghstack | | Update PR | edit → jj squash -r ghstack | | Land PR | ghstack land | | Rebase stack | jj rebase -d mainghstack | | Checkout PR | ghstack checkout | | Sync descriptions | ghstack sync | | View stack | jj log -r main..@ |

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.