maintenance-cleanup

Clean up merged branches, worktrees, GitHub Actions runs, and tmp directories.

Updated Jan 5, 2025
One-click install
npx skills add https://github.com/pkuppens/pkuppens --skill maintenance-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maintenance-cleanup
Source: https://github.com/pkuppens/pkuppens/tree/main/skills/maintenance/maintenance-cleanup
Command: npx skills add https://github.com/pkuppens/pkuppens --skill maintenance-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Branch cleanup after PR merges, removal of stale worktrees, pruning of GitHub Actions runs, and tidying tmp directories to keep repositories clean and efficient.

Core Features & Use Cases

  • Post-merge branch cleanup to prevent drift and confusion.
  • Worktree-aware deletion guidance when a branch is in use by a worktree.
  • Pruning of old GitHub Actions workflow runs to reclaim resources.
  • tmp/ hygiene to avoid accumulating scratch artifacts.

Quick Start

Run the post-merge cleanup to delete the merged local branch, prune stale worktrees, and remove old GitHub Actions runs.

Frequently Asked Questions about maintenance-cleanup

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

FAQPage Schema
How do I automate git branch cleanup after a pull request is merged?

Post-merge branch cleanup removes merged local branches to prevent drift and confusion, while also tidying associated worktrees and temporary directories to maintain repository hygiene.

What is the best way to remove a git worktree when a branch is still in use?

Worktree-aware deletion guidance handles conflicts when a branch is in use by a worktree, ensuring safe branch deletion and proper worktree removal without breaking local git workflows.

How do I prune old GitHub Actions workflow runs to reclaim resources?

Prune old GitHub Actions workflow runs using explicit GitHub CLI commands to delete stale workflow execution records, keeping the repository clean and reclaiming CI resources.

Can I delete local branches safely with git commands without breaking worktrees?

Safe branch deletion with git commands is supported, providing worktree-aware guidance to handle conflicts when a branch is in use by a worktree, preventing broken local workflows.

Why does temporary directory hygiene matter after merging PRs?

Temporary directory hygiene removes accumulated scratch artifacts left after PR merges, preventing stale tmp files from cluttering the repository and causing unexpected conflicts in future workflows.