Tooluck logoTooluck
SKILL.md

github-sensitive-data-cleanup

Agent skill fromdaymade/claude-code-skills

Scans and removes sensitive data (secrets, API keys, private domains/IPs, PII) from GitHub repository history, then verifies and force-pushes safely. Use for 清理敏感数据 / 历史重写 / 泄露, "scan sensitive data", "clean git history", "remove secrets from repo", or before any force push to a public repo. Not for local-only Git recovery (use git-safety-net) or ordinary repository setup (use auto-repo-setup).

How to install github-sensitive-data-cleanup

install github-sensitive-data-cleanup
# install the claude-code-skills pack with the skills CLI
npx skills add daymade/claude-code-skills

# or add only this skill to Claude Code: copy the folder

github-sensitive-data-cleanup/

# into

~/.claude/skills/github-sensitive-data-cleanup/ (all projects)

.claude/skills/github-sensitive-data-cleanup/ (one project)

github-sensitive-data-cleanup/SKILL.md

MITFull file
1# GitHub Sensitive Data Cleanup
2
3## Overview
4
5This skill guides you through safely removing sensitive data from a Git
6repository's history and pushing the cleaned history to GitHub. It encodes the
7hard-won lessons from real incidents: scan first, backup before rewriting,
8verify after rewriting, and never force-push to a public repo without checking
9its visibility and fork count.
10
11The bundled scripts automate the mechanical parts:
12
13- `scripts/scan_repo.py` — scan the repo for secrets and private context.
14- `scripts/rewrite_history.py` — create a backup and rewrite history with
15 `git-filter-repo`.
16- `scripts/verify_cleanup.py` — confirm the sensitive content is gone.
17- `scripts/safe_push.py` — verify repo visibility and push safely.
18
19**This skill is conservative by design.** If any safety check fails, it stops
20and asks for human confirmation rather than continuing.
21
22## When to Use This Skill
23
24Trigger this skill when the user:
25
26- Says "scan sensitive data", "扫描敏感信息", "看看仓库有没有泄露".
27- Wants to "clean git history", "sanitize history", "rewrite history",
28 "remove secrets from history".
29- Has accidentally pushed a secret, private domain, internal IP, or PII to a
30 public repository.
31- Is about to force-push to a public repository (even without sensitive data).
32- Mentions `git filter-repo`, `BFG`, `git-filter-branch`, or history rewrite.
33
34## Prerequisites
35
36Install these tools once per machine:
37
38```bash
39# git-filter-repo (modern replacement for git-filter-branch)
40…

Excerpt shown under the repository's MIT license.

More skills in claude-code-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates