endchat

Deletes orphaned feature and claude branches after a chat session and returns the checkout to preprod.

Updated Aug 13, 2026
One-click install
npx skills add https://github.com/Evolutionary-Leadership/harness --skill endchat-evolutionary-leadership
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: endchat
Source: https://github.com/Evolutionary-Leadership/harness/tree/main/.claude/skills/endchat
Command: npx skills add https://github.com/Evolutionary-Leadership/harness --skill endchat-evolutionary-leadership

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Chat sessions that never produced real work can leave behind orphaned feature/<name> and claude/<name> branches on the remote, cluttering the repository. This Skill removes that cruft safely while refusing to delete anything that contains actual commits. ## Core Features & Use Cases - Safe branch cleanup: Deletes remote feature/<name> and claude/<name> branches only when they contain nothing beyond the automated name/init commits. - Work protection: Refuses to run if the working tree is dirty or the feature branch holds real commits, listing the unexpected commits so nothing is lost silently. - Checkout reset: Switches the local repository back to an up-to-date preprod branch so the next session starts cleanly. - Use Case: You opened a Claude Code session, named a feature, then decided to only chat. Run this Skill to remove the empty branches it created and return to preprod. ## Quick Start Ask the assistant to end the chat session and clean up the empty feature and claude branches, confirming the deletion when prompted.

Frequently Asked Questions about endchat

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

FAQPage Schema
How do I delete an empty feature branch after a chat session?

Run the endchat skill from the claude/ session branch. It verifies the feature branch contains only automated name or init commits, asks for confirmation, deletes the remote branches, and switches your local checkout back to preprod.

What happens if the feature branch contains real commits?

The skill refuses to delete anything and stops. It lists the unexpected commits so you can review them, and directs you to run /to-preprod instead to merge the work rather than lose it.

Can I run endchat with uncommitted local changes?

No. The skill checks git status and stops if the working tree is dirty. You must either commit the changes and run /to-preprod, or discard them manually before retrying; it never discards work on your behalf.

Why does endchat only run on a claude/ branch?

The cleanup logic depends on the harness naming convention where claude/<name>-<sessionId> branches map to feature/<name> branches. Running elsewhere would make branch resolution meaningless, so the skill stops immediately on any other branch.

Does endchat delete branches without asking?

No. Even when the branches look empty, it summarizes exactly what will be deleted (remote feature branch, remote claude branch, local claude branch) and waits for explicit confirmation before proceeding.