Open-source CLI tool sdf uses Claude to manage stacked GitHub PRs

✍️ OpenClawRadar📅 Published: March 14, 2026🔗 Source
Open-source CLI tool sdf uses Claude to manage stacked GitHub PRs
Ad

sdf (Stacked Diffs Flow) is an open-source CLI tool that automates stacked pull request workflows on top of git and gh. The tool uses Claude CLI as its engine to handle complex operations, with Claude listed as a proper dependency alongside git and gh, version-checked at startup. AI features degrade gracefully if Claude CLI is not present.

Key commands and features

The tool provides several commands where Claude does the heavy lifting:

  • sdf split — Decomposes a big branch into a stack. Claude analyzes the full diff, identifies semantic themes, and proposes a layered split plan with hunk-level precision, including when the same file spans multiple concerns. It then creates each branch in dependency order, verifies the split is lossless, and opens the PRs.
  • sdf sync — Handles conflict resolution during cascade rebase. When an upstream PR merges and a downstream branch has a conflict, sdf builds a prompt with full stack context (what each branch was trying to do, what changed upstream, and actual conflict markers) and hands it to Claude CLI. Claude resolves conflicts semantically, understanding why they exist, not just where.
  • sdf sync --with-content — Claude reads the diff for each branch and writes a title and description that explains the what and why, useful when you don't want to context-switch into writing prose.
  • sdf ai intro — Creates a skill file so Claude Code understands sdf's commands, workflows, and conventions across sessions.
Ad

Installation and availability

The tool is free and MIT licensed, with source available on GitHub. It can be installed via Homebrew with brew install pavelpascari/tap/sdf. Documentation is available at stacked-diffs-flow.com/docs/getting-started.

This type of tool is useful for developers working with complex codebases who need to manage multiple dependent pull requests efficiently. The integration with Claude CLI allows for semantic understanding of code changes rather than just textual manipulation.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also