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

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,sdfbuilds 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 understandssdf's commands, workflows, and conventions across sessions.
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
👀 See Also

Developer Builds MCP Server for Claude WhatsApp Integration, Shares Challenges
A developer built an MCP server to give Claude access to real WhatsApp conversations, discovering that conversation context management was trickier than expected and required a database to track conversations.

Self-Maintaining Documentation System Using Fenced Blocks for Zero Drift
A developer built a bash script that extracts structured data directly from source files and injects it into CLAUDE.md through fenced HTML comment blocks, ensuring documentation stays in sync with code without manual maintenance.

Windows System Tray Monitor for Claude Code Quota
A Windows system tray application that monitors Claude Code usage with a color-coded icon, auto-refreshes quota data every 5 minutes via Anthropic's OAuth API, and provides detailed dashboards showing hourly, daily, weekly, and monthly usage patterns.

Need MCP Server Provides Semantic Tool Discovery for AI Agents
An MCP server called Need enables semantic search over 10,000+ tools from brew, npm, pip, and cargo. When an agent requests a task like 'compress these PNGs,' it finds pngquant, installs it, runs it, and reports back on success.