re0-squash

Installation
SKILL.md

Squash one repository's history into one signed commit with the same tree, then delete its GitHub remote, recreate it with the settings the script records (step 4) and push that one commit.

Goal

A force push does not clean a GitHub history. GitHub's guide on removing sensitive data says rewritten commits can stay reachable in clones and forks, by hash in cached views, and through pull requests that reference them. Deleting the repository is what drops those objects from it, so this skill squashes every commit into one, deletes the remote, recreates it with the settings it can restore, and pushes the one commit. The tree stays byte-identical; only the record changes.

This is not a restart: nothing is rebuilt and no archive branch keeps the old line on the remote. A restart from v0 is re0-work.

It is user-invoked: it deletes a remote repository, which cannot be undone, and its trigger is a deliberate human act; a model with it in reach could reach for a delete on its own. Run it when the human names this skill, or asks to squash a repository's history and recreate its remote.

Workflow

Prerequisites: git with commit signing configured, and gh authenticated with the delete_repo scope. --repo overrides the owner/name read from origin.

The inputs are a clean checkout on the default branch, the commit message the human approves, and the human's acceptance of each loss the audit lists. One bundled script does the work in three subcommands, run from the repository root (the root of the repository being republished; scripts/squash.mjs below means the script in this skill's folder, called by its absolute path):

node scripts/squash.mjs audit [--repo <owner/name>]
node scripts/squash.mjs squash --message-file <file> [--bundle <path>]
node scripts/squash.mjs republish --confirm <owner/name> [--accept-loss] [--repo <owner/name>]
Installs
104
GitHub Stars
1.4K
First Seen
Oct 29, 2026