clean-branch

Clean merged Git branches, close GitHub issues, and record learnings to telemetry.

2|3|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/psd401/psd-claude-coding-system --skill clean-branch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-branch
Source: https://github.com/psd401/psd-claude-coding-system/tree/main/plugins/psd-claude-coding-system/skills/clean-branch
Command: npx skills add https://github.com/psd401/psd-claude-coding-system --skill clean-branch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates post-merge housekeeping by cleaning merged branches, closing the associated issues, and surfacing compound learning insights for continuous improvement.

Core Features & Use Cases

  • Branch cleanup: remove the local and remote feature branches after they have been merged into the mainline.
  • Issue closure: automatically close the related GitHub issue with a concise summary of the changes.
  • Learnings telemetry: extract learnings from the PR workflow and save them to the telemetry store for future reuse.

Quick Start

Use the clean-branch skill after merging a PR to automatically clean up the feature branch and close the related issue, while recording learnings for future sessions.

Frequently Asked Questions about clean-branch

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

FAQPage Schema
How do I automate branch cleanup after merging a pull request?

Branch cleanup removes local and remote feature branches automatically after merge. This Skill identifies the merged branch, purges references from Git and GitHub, and closes the related issue—eliminating manual housekeeping steps in your GitHub workflow.

Can I automatically close GitHub issues when a PR is merged?

Yes. This Skill closes the corresponding issue with a concise summary after merge detection, linking branch cleanup to issue resolution within your GitHub workflow.

What's the best way to extract learnings from merged PRs for future workflows?

Extract learnings by recording insights to your telemetry store during post-merge housekeeping. This Skill surfaces compound learning data automatically, making PR workflow patterns reusable across sessions.

Does this work with GitHub CLI and standard Git commands?

Yes. This Skill relies on Git and GitHub CLI to perform deterministic branch removal and issue closure steps, integrating with existing command-line tooling in your development environment.

When should I use post-merge automation instead of manual cleanup?

Use post-merge automation to eliminate repetitive branch and issue management after every PR merge. It reduces friction in high-frequency workflows and ensures consistent housekeeping across your team's GitHub repositories.