AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

GitHub Sensitive Data Cleanup

A guided, safety-first workflow to scan for and purge secrets, private domains/IPs and PII from Git history, then force-push safely.

Security & ReviewAdvanced★ 1,323⑂ 212AI score 9/10Last updated: Aug 8, 2026

What it does

  • Scans the entire repo history with gitleaks, custom regex layers, an optional private gitleaks config, and an AI semantic review pass for context regex can't catch.
  • Creates and verifies a git bundle backup before running git filter-repo --replace-text.
  • Re-verifies afterwards that none of the original sensitive strings remain in any commit.
  • Confirms repo visibility and fork count with gh repo view, then pushes using --force-with-lease; never adds --no-verify.
  • Documents special cases: open PRs, forks retaining old history, filter-repo "fresh clone" errors, gitleaks false positives.

Who it's for

  • Developers who accidentally committed an API key or internal infrastructure detail to a public repo.
  • Teams sanitizing a repository before open-sourcing it.
  • Maintainers who must force-push to a public repository and want guardrails.

Example uses

  1. "Scan this repo for leaked secrets" → runs the scanner, produces a JSON report, and classifies each finding as rotate / remove / allowlist.
  2. "I pushed a Slack token — remove it from history" → prompts you to rotate first, then walks through replacements file, backup, rewrite, verify, safe push.
  3. "Our internal domain appears in old commit messages before we go public" → uses literal: replacements to swap it for an example domain and checks fork/PR impact.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/daymade/claude-code-skills/HEAD/github-sensitive-data-cleanup/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI 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 && mkdir -p ~/.claude/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.

  1. Open a terminal and clone the repo: git clone https://github.com/daymade/claude-code-skills.git
  2. Create the skills directory: mkdir -p ~/.claude/skills
  3. Copy just this skill: cp -r claude-code-skills/github-sensitive-data-cleanup ~/.claude/skills/
  4. Install the required tools (macOS): brew install git-filter-repo gitleaks gh
  5. Authenticate GitHub CLI: gh auth login
  6. Install uv so the bundled scripts can run: curl -LsSf https://astral.sh/uv/install.sh | sh
  7. Restart Claude Code and ask something like "scan this repo for sensitive data".
  8. ⚠️ Before any history rewrite, confirm the backup bundle was created and verified — the rewrite is destructive.