jj-stack

jj-stack is a skill for Claude Code from jamestexas/agents. It costs 124 tokens per session (3,966 once invoked), scanned C, original, Apache-2.0.

A skill that turns one development branch into a sequence of small, stacked pull requests using Jujutsu and Git. Stacked pull requests are changes arranged so each one depends on the previous one.

In plain words
What is it for?
Use it after deciding the change boundaries, or when a ticket needs several pull requests followed in a linear order.
Why use it?
It helps manage and review a large or multi-part change without making one oversized pull request.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it after deciding the change boundaries, or when a ticket needs several pull requests followed in a linear order.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jamestexas/agents/jj-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 jamestexas/agents --skill jj-stack
Clone the repo
git clone --depth 1 https://github.com/jamestexas/agents

Made for: Claude Code.

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 jj-stack

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamestexas/agents/jj-stack/github.svg)](https://agentmods.dev/skills/jamestexas/agents/jj-stack)
Your own site
<a href="https://agentmods.dev/skills/jamestexas/agents/jj-stack"><img src="https://agentmods.dev/badge/skills/jamestexas/agents/jj-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 jj-stack

Your own site · 80×15
<a href="https://agentmods.dev/skills/jamestexas/agents/jj-stack"><img src="https://agentmods.dev/badge/skills/jamestexas/agents/jj-stack.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,966 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00124 $0.03966
Opus 5.5 $0.00050 $0.01586
Sonnet 5.5 $0.00025 $0.00793
Haiku 4.5 $0.00012 $0.00397

Measured 1mo ago against content hash 4c5887524559, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

jj-stack scanned grade C with 1 finding 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 1mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

cd <main-repo> && jj git init --colocate # non-destructive; git untouched; rm -rf .jj reverts
skills/jj-stack/SKILL.md · 282 lines

How it starts

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

/jj-stack — split one branch into signed, stacked PRs on a feature branch

The workflow, and why it exists: agentic work wants one branch you (and the agent) reason about linearly; reviewers want small PRs; the org wants one clean merge. jj resolves the tension — you develop on one branch, jj split it into tiny commits, push each as a small PR that targets a feature branch, and the feature branch is a single squash/merge to main. A reviewer can review each small PR into feature; the feature merge is the one that hits main.

jj gives the primitives (split, duplicate, bookmark, push, signing backends). This skill supplies the two things it does not: keyless-signing wiring and the feature-branch orchestration. Nothing here shells out from a script — it's a procedure of jj/git/gh commands; the only file written is the jj/git config.

Phase 0 — prerequisites (one-time per machine/repo)

  1. jj installed. command -v jj || brew install jj (formula is jj).

  2. Colocate the repo. jj cannot git init --colocate inside a git worktree — do it in the MAIN checkout:

    cd <main-repo> && jj git init --colocate     # non-destructive; git untouched; rm -rf .jj reverts
    

    Run it in a linked worktree and jj refuses with a hint that names the two ways out:

    Error: Cannot create a colocated jj repo inside a Git worktree.
    Hint: Run `jj git init` in the main Git repository instead, or use `jj workspace add` …
    

    If the target branch is checked out in a linked worktree, that's fine — you duplicate it here (Phase 2) and leave the worktree's branch as the backup.

  3. Author identity (empty identity can't push):

    jj config set --user user.name  "<Name>"
    jj config set --user user.email "<email>"
    
  4. Snapshot noise — and why it is dangerous for agents. jj refuses to snapshot files over ~1 MiB. The refusal is a Warning:, not an error: the command still exits 0, and the oversized file is silently left untracked and out of the commit you just made. An agent that trusts exit codes will report a clean commit that is missing a file.

    Warning: Refused to snapshot some files:
      big.bin: 8.0KiB (8192 bytes); the maximum size allowed is 1.0KiB (1024 bytes)
    

    So: grep the output for Refused to snapshot after any command that snapshots (status, commit, split, diff — any of them). Then fix the cause by ignoring the cruft (*.test, *.log, build-binary paths in .git/info/exclude) and/or raising the guard for this repo:

    jj config set --repo snapshot.max-new-file-size 60MiB
    

Read the full file on GitHub · 282 lines

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. 1mo ago Changed · +113 lines 4c5887524559
  2. 1mo ago First seen · 169 lines · 124 tokens per session scan C c40c9689e710

Subscribe to this mod's changes

jj-stack is a skill published in the GitHub repository jamestexas/agents (2 stars, last pushed 23d ago), licensed Apache-2.0. It adds 124 tokens to every session and 3,966 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-11.