claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
Pushes all branches in a stack and opens or updates one dependent PR per slice. Use after stack-create to publish the stack or after adding commits to a slice.
$ npx -y skills add athola/claude-night-market --skill stack-push --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/stack-pushContext preview
The summary Claude sees to decide when to auto-load this skill.
Pushes all branches in a stack and opens or updates one dependent PR per slice. Use after stack-create to publish the stack or after adding commits to a slice.
name: stack-push description: Pushes all branches in a stack and opens or updates one dependent PR per slice. Use after stack-create to publish the stack or after adding commits to a slice. alwaysApply: false category: workflow-automation tags: - git - stacked-diffs - pr - push - github tools: [] complexity: medium model_hint: standard estimated_tokens: 900 dependencies: - sanctum:stack-create - sanctum:pr-prep - sanctum:git-workspace-review
Push all branches in a stack and open (or update) one PR per slice, with each PR targeting its parent branch as base.
Run `stack-push` after `stack-create` has initialized the branch topology and at least one commit exists on each slice branch. Also run it after adding commits to any slice to update open PRs.
`sanctum:stack-rebase`)
Create `TodoWrite` items before starting:
1. `stack-push:branches-listed` 2. `stack-push:branches-pushed` 3. `stack-push:prs-opened` 4. `stack-push:stack-summary-posted`
Identify all branches in the stack. By convention they share a `stack/<feature-name>/` prefix:
STACK=stack/my-feature
BASE=master
git branch --list "${STACK}/*" | sed 's/^[* ]*//'Verify each branch has commits beyond the base:
for branch in $(git branch --list "${STACK}/*" \
| sed 's/^[* ]*//'); do
count=$(git rev-list --count \
"$(git merge-base ${BASE} ${branch})..${branch}")
echo "${branch}: ${count} commit(s)"
doneAny branch showing `0 commits` must have work added before pushing.
Push every slice branch to the remote in stack order (base slice first):
for branch in $(git branch --list "${STACK}/*" \
| sed 's/^[* ]*//' | sort); do
git push --set-upstream origin "${branch}"
echo "pushed: ${branch}"
donejj git push --all
Create one PR per slice, targeting its parent branch. For the first slice the parent is `master`; for subsequent slices the parent is the previous slice's branch.
PREV_BASE=master
for branch in $(git branch --list "${STACK}/*" \
| sed 's/^[* ]*//' | sort); do
# Check if a PR already exists for this branch
existing=$(gh pr list \
--head "${branch}" \
--json number \
--jq '.[0].number' 2>/dev/null)
if [ -n "${existing}" ]; then
echo "PR #${existing} already open for ${branch} -- skipping"
else
gh pr create \
--base "${PREV_BASE}" \
--head "${branch}" \
--title "[$(echo ${branch} | sed 's|.*/||')] <title>" \
--body "Part of stack \`${STACK}\`." \
--draft
echo "opened PR for ${branch} (base: ${PREV_BASE})"
fi
PREV_BASE="${branch}"
doneFill in the actual PR titles and bodies before removing the `--draft` flag. Run `Skill(sanctum:pr-prep)` on each slice to generate quality-gated descriptions.
After all PRs are open, post a summary comment on the first PR (the root of the stack) listing the full chain:
ROOT_PR=$(gh pr list \
--head "${STACK}/$(git branch --list \
"${STACK}/*" | sed 's/^[* ]*//' | sort | head -1 \
| sed 's|.*/||')" \
--json number --jq '.[0].number')
# Build the stack table
BODY="## Stack\n\n| # | Branch | PR |\n|---|--------|----|\n"
N=1
for branch in $(git branch --list "${STACK}/*" \
| sed 's/^[* ]*//' | sort); do
pr_num=$(gh pr list --head "${branch}" \
--json number --jq '.[0].number')
BODY="${BODY}| ${N} | \`${branch}\` | #${pr_num} |\n"
N=$((N+1))
done
gh pr comment "${ROOT_PR}" --body "$(printf "${BODY}")"branch before the child PR is opened
individually as they pass review
`git push --force-with-lease` (never `--force`)
to cascade the rebase before updating the next PR's base
`stack-push:stack-summary-posted`) are created before pushing starts and marked complete in order
before `git push` is called; branches with 0 commits are blocked
as base (root slice targets `master`/`main`)
columns `#`, `Branch`, and `PR` listing all slices
pushed branch after the step completes
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.