session-cleanup-checkpoint

Classify worktrees, check orphaned branches, and checkpoint session state to a cloud database.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/DaBigHomie/ugwtf --skill session-cleanup-checkpoint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-cleanup-checkpoint
Source: https://github.com/DaBigHomie/ugwtf/tree/main/.claude/skills/session-cleanup-checkpoint
Command: npx skills add https://github.com/DaBigHomie/ugwtf --skill session-cleanup-checkpoint

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides a safe way to clean up or hand off a coding session, ensuring that no data is lost and no other agents' work is affected.

Core Features & Use Cases

  • Non-Destructive Session Closure: Classifies worktrees/branches as CURRENT, PROTECT, or SAFE-CANDIDATE to prevent accidental deletion.
  • Orphan Check: Identifies if a deleted branch lost any unmerged commits.
  • Checkpointing: Durable checkpointing of session state to a cloud database.
  • Handoff Framework Integration: Generates self-contained handoffs for unfinished work being handed to another agent.

Quick Start

Run 'npx tsx <this-skill>/scripts/forensics.mts --repo="$PWD"' to observe, classify, and create a cleanup plan.

Frequently Asked Questions about session-cleanup-checkpoint

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

FAQPage Schema
How do I safely clean up a coding session without losing unmerged commits?

Safely clean up a coding session by classifying worktrees as CURRENT, PROTECT, or SAFE-CANDIDATE and performing an orphan check to identify any deleted branches with unmerged commits before removal.

What is a session checkpoint and how does it prevent data loss during worktree management?

Session checkpointing durably saves your coding session state to a cloud database, preventing data loss by preserving the exact working state before any cleanup or handoff occurs.

How do I hand off unfinished work to another agent in a multi-agent setup?

Hand off unfinished work in a multi-agent setup by generating a self-contained handoff package, ensuring the receiving agent can resume work without impacting other agents' active worktrees.

How can I check if deleting a git branch will accidentally lose uncommitted work?

Check for accidental data loss by running an orphan check, which identifies whether a deleted branch lost any unmerged commits and classifies worktrees to prevent destructive deletion.

Can I use this session cleanup script with my existing multi-agent coding workflow?

Yes, the session cleanup script integrates with multi-agent workflows by generating self-contained handoffs for unfinished work, ensuring safe closure without impacting other agents' work.

When should I avoid automatic worktree deletion during a coding session cleanup?

Avoid automatic worktree deletion when branches have unmerged commits or active agents; the script classifies these as PROTECT to prevent accidental data loss during session closure.