re0-squash

re0-squash is a skill for Claude Code, Codex from LilMGenius/paperthin. It costs 74 tokens per session (1,791 once invoked), scanned A, original, MIT.

A Git history cleanup procedure that turns every commit in a GitHub repository into one signed commit while keeping the current files unchanged. It then deletes and recreates the remote repository under the same name and recorded settings.

In plain words
What is it for?
It is for deliberately replacing a repository's complete Git history with a single commit when the current file tree must stay byte-for-byte the same.
Why use it?
Rewriting history with a force push can leave old commits reachable through clones, forks, hashes, or pull requests. Recreating the remote is used when those old objects must be removed from that repository.

Skill for Claude CodeCodex

Written for Claude Code and Codex: disable-model-invocation in frontmatter, but also agents/openai.yaml present.

Part of the paperthin plugin — 45 skills shipped together

Good fit It is for deliberately replacing a repository's complete Git history with a single commit when the current file tree must stay byte-for-byte the same.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lilmgenius/paperthin/re0-squash
About the project

Paperthin is a collection of low-level design patterns that coding agents can apply as repeatable checks and actions during software work. It is for people using agents such as Claude Code, Codex, Cursor, or other supported tools, and its catalogue entries package the patterns as skills, an instruction, and a plugin.

LilMGenius/paperthin · 1,481 stars · on GitHub · paperthin.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LilMGenius/paperthin --skill re0-squash
Clone the repo
git clone --depth 1 https://github.com/LilMGenius/paperthin

Made for: Claude Code, Codex.

Or install paperthin, the plugin that ships this one along with the rest of its 45 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for re0-squash

README.md
[![agentmods](https://agentmods.dev/badge/skills/lilmgenius/paperthin/re0-squash/github.svg)](https://agentmods.dev/skills/lilmgenius/paperthin/re0-squash)
Your own site
<a href="https://agentmods.dev/skills/lilmgenius/paperthin/re0-squash"><img src="https://agentmods.dev/badge/skills/lilmgenius/paperthin/re0-squash/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for re0-squash

Your own site · 80×15
<a href="https://agentmods.dev/skills/lilmgenius/paperthin/re0-squash"><img src="https://agentmods.dev/badge/skills/lilmgenius/paperthin/re0-squash.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,791 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.01791
Opus 5.5 $0.00030 $0.00716
Sonnet 5.5 $0.00015 $0.00358
Haiku 4.5 $0.00007 $0.00179

Measured 20d ago against content hash 5341e4953724, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

re0-squash scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/squash.mjs, scripts/squash.test.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/depth/re0-squash/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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>]

Each prints one JSON object. Exit codes: 0 done (audit: no blockers; republish: pushed head matches and no setting drifted); 1 refused or failed (dirty tree, detached HEAD, wrong --confirm, unaccepted blockers, more than one commit, a git or gh call that failed, a pushed head that differs, or a restored setting that drifted); 2 usage; 3 audit found blockers.

Read the full file on GitHub · 52 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 20d ago First seen · 52 lines · 74 tokens per session scan A 5341e4953724

Subscribe to this mod's changes

re0-squash is a skill published in the GitHub repository LilMGenius/paperthin (1,481 stars, last pushed 4d ago), licensed MIT. It adds 74 tokens to every session and 1,791 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-09.

Related

re0-squash compared with skills from other repositories

re0-squash next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
re0-squashLilMGenius/paperthinSkill1.5k4d agoMITA74Claude Code, Codex
git-workflow-and-versioningaddyosmani/agent-skillsSkill121k6d agoMITA131Claude Code
antfu-create-prantfu/skillsSkill6.1k3d agoMITA54Claude Code, Codex
chinese-commit-conventionsjnMetaCode/superpowers-zhSkill8.6k14d agoMITA65Claude Code
commit-with-reflectionforyourhealth111-pixel/Vibe-SkillsSkill3.9k21d agoApache-2.0A69Claude Code, Codex
skill-changelogluongnv89/asmSkill976todayMITA53Claude Code
comet-safe-deliveryrpamis/cometSkill3.3kyesterdayMITA78Claude Code, Codex