GitHub Sensitive Data Cleanup
Scan, scrub, verify, and safely force-push away secrets, private domains, and PII hiding in your Git history.
Security & ReviewAdvanced★ 1,323⑂ 212AI score 9/10Last updated: Aug 8, 2026
What it does
Walks you through the full lifecycle of removing sensitive data from a Git repository's history and pushing the cleaned result.
scan_repo.py— gitleaks plus custom regex layers, producing a JSON report- Layer 4 AI semantic review — catches real names, project codenames, transcript snippets and other context regex can't see
rewrite_history.py— creates and verifies agit bundlebackup, then runsgit filter-repo --replace-textverify_cleanup.py— rescans and greps every commit for the original stringssafe_push.py— checksgh repo viewfor visibility and forks, prefers--force-with-lease, refuses--no-verify
Conservative by design: if any safety check fails, it halts and asks for human confirmation.
Who it's for
- Developers who accidentally pushed an API key or internal hostname to a public repo
- Anyone who needs
git filter-repo/BFG but is nervous about the blast radius - Teams auditing history before flipping a repo from private to public
- Security reviewers and open-source release managers
Examples
- "Scan this repo for leaked secrets" → runs the scanner and summarizes
/tmp/scan-report.jsonwith severity triage - An internal domain appears across three years of commits → build a replacements file → backup bundle → rewrite → verify → safe push
- About to force-push a public repo → the skill checks visibility and fork count, warns loudly, and drafts a notice for fork owners
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the github-sensitive-data-cleanup folder from the GitHub repo daymade/claude-code-skills into my ~/.claude/skills/github-sensitive-data-cleanup/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/daymade/claude-code-skills.git /tmp/claude-code-skills && cp -r /tmp/claude-code-skills/github-sensitive-data-cleanup ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/daymade/claude-code-skills.git /tmp/claude-code-skills - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r /tmp/claude-code-skills/github-sensitive-data-cleanup ~/.claude/skills/ - Install the required tools (macOS):
brew install git-filter-repo gitleaks gh - Install
uvif missing:curl -LsSf https://astral.sh/uv/install.sh | sh - Authenticate GitHub CLI:
gh auth login - Restart Claude Code and try: "scan this repository for sensitive data".
- ⚠️ Before any history rewrite, confirm the backup bundle was created and warn teammates — open PRs and forks will be affected.
View source on GitHub ↗License: MIT