tidy

Automates removal of outdated branches, orphaned sessions, and stale GitHub issues with previews and approval.

1|4|Updated Oct 27, 2014
One-click install
npx skills add https://github.com/rjernst/dotfiles --skill tidy-rjernst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidy
Source: https://github.com/rjernst/dotfiles/tree/main/claude/skills/tidy
Command: npx skills add https://github.com/rjernst/dotfiles --skill tidy-rjernst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Your workspace can accumulate stale Git worktrees, lingering tmux sessions, merged-but-still-present remote branches, and completed spec issues that clutter day-to-day development.

Core Features & Use Cases

  • Merged worktree cleanup: Prunes merged worktrees so your local filesystem matches what’s actually active.
  • Orphaned tmux session detection: Identifies tmux sessions whose current directory no longer exists in this repository.
  • Repository hygiene for GitHub: Closes spec issues that are marked as done but left open, and surfaces remote branches whose PRs were merged.

Quick Start

Ask to run tidy for your current project and show what it would clean up before you approve any destructive actions.

Frequently Asked Questions about tidy

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

FAQPage Schema
How do I clean up stale Git worktrees after branches are merged?

To clean up stale Git worktrees, you can prune merged worktrees so your local filesystem only reflects what is actively in development. This removes worktrees associated with branches that have already been merged.

How do I find and kill orphaned tmux sessions in my repository?

Finding orphaned tmux sessions involves identifying sessions whose current working directory no longer exists within the repository. You can then kill these orphaned tmux sessions to declutter your terminal workspace.

How do I prune merged remote branches and close completed GitHub issues?

Pruning merged remote branches and closing completed GitHub issues requires checking your current repository for branches with merged PRs and spec issues marked done but left open, then removing or closing them to maintain hygiene.

Can I preview workspace cleanup actions before deleting files and sessions?

You can preview workspace cleanup actions by running a dry-run style summary first. This shows what will be cleaned up before you approve any destructive steps, requiring explicit confirmation before deletion.

Does workspace cleanup protect active branches from being removed?

Workspace cleanup includes protected-branch safeguards to prevent accidental removal of active development resources. It applies scoped current-repository checks to ensure only stale resources are targeted.

Why do my Git worktrees and GitHub issues drift out of sync during development?

Git worktrees, tmux sessions, and GitHub issues drift out of sync when ongoing development changes the active codebase without cleaning up merged branches, orphaned sessions, or completed spec issues.