gsd-pr-branch

Rewrite Git branch history to remove PLAN.md, SUMMARY.md, and STATE.md commits.

Updated Jan 28, 2025
One-click install
npx skills add https://github.com/aslaii/dotfiles --skill gsd-pr-branch-aslaii
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gsd-pr-branch
Source: https://github.com/aslaii/dotfiles/tree/main/claude/skills/gsd-pr-branch
Command: npx skills add https://github.com/aslaii/dotfiles --skill gsd-pr-branch-aslaii

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Filter out planning artifacts from the PR branch to present clean, code-focused diffs during reviews.

Core Features & Use Cases

  • Filter planning commits like PLAN.md, SUMMARY.md, and STATE.md from the current branch history so that diffs reflect only code changes.
  • Safely rewrite branch history to remove non-code artifacts while preserving changes to source files.
  • Use case: when preparing a feature branch for PR review, ensure reviewers see only meaningful code changes.

Quick Start

Run the pr-branch workflow on your current branch to produce a clean PR-ready branch.

Frequently Asked Questions about gsd-pr-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I filter out planning commits from a git branch before creating a PR?

You can filter planning commits from a git branch by running a pr-branch workflow that reads the local repository, identifies planning artifacts like PLAN.md, and rewrites history to keep only code changes for a clean PR diff.

Why do planning artifacts pollute my git code review diffs?

Planning artifacts like PLAN.md, SUMMARY.md, and STATE.md pollute git code review diffs because standard workflows commit them alongside source files, obscuring meaningful code changes during the review process.

What is the best way to remove STATE.md and SUMMARY.md from my commit history?

The best way to remove STATE.md and SUMMARY.md from commit history is to apply a pr-branch workflow that safely rewrites the branch, filtering out these specific planning files while preserving all actual code changes.

Does the pr-branch workflow preserve source file changes when rewriting history?

Yes, the pr-branch workflow preserves source file changes when rewriting history. It specifically targets and removes planning artifacts while ensuring that all modifications to source files remain intact in the rewritten commits.

Can I clean up local branch history for a PR review without losing code changes?

Yes, you can clean up local branch history for a PR review without losing code changes by using a pr-branch workflow that selectively filters out planning commits while safely preserving all your source code modifications.

When should I not use history rewriting to filter planning artifacts?

You should not use history rewriting to filter planning artifacts on shared branches where collaborators depend on the original commit history, as rewriting can cause conflicts and desynchronize local repositories.