Skills Explorer Add Skills

github-sensitive-data-cleanup

An agent skill by daymade, from daymade/claude-code-skills. Tags: audit, compliance, github, secrets, security.

What it does

Scan and remove sensitive data (secrets, API keys, private domains/IPs, PII) from GitHub repository history. Use this skill whenever the user says "scan sensitive data", "clean git history", "remove secrets from repo", "sanitize GitHub history", "清理敏感数据", "历史重写", "force push", "泄露", or needs to repair a public repo after accidental secret/private context leakage. Also use before any force push to a public repository to verify visibility, backup, and scan results.

Install

With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:

npx skills add daymade/claude-code-skills --skill github-sensitive-data-cleanup

Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):

git clone --depth 1 https://github.com/daymade/claude-code-skills
cp -r claude-code-skills/github-sensitive-data-cleanup ~/.claude/skills/github-sensitive-data-cleanup

Safety box score

Grade D, elevated risk: 47 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.

This skill performs a full Git history-cleanup workflow: scanning, rewriting commits/refs, creating a backup bundle, verifying, and pushing the rewritten branch back to GitHub. The main risks are destructive history replacement on the repo and a network push to a possibly public repository; it also preserves the old history in a backup bundle and can read optional user-home config files for extra scan context.

Category levels, from 0 (none) to 3 (high)
CategoryLevelWhy
Code & shell execution2 (moderate)The shipped Python scripts run real local commands via `subprocess.run` (`git`, `gitleaks`, `gh`, `ssh`, `git-filter-repo`), but they do not evaluate arbitrary code.
Network access2 (moderate)`scripts/safe_push.py` talks to GitHub with `gh repo view`, `git ls-remote`, and `git push`, so the workflow sends repository data and rewritten refs over the network.
Filesystem reach2 (moderate)The workflow writes a backup bundle and JSON reports and rewrites repository history in place, and it can read optional files under the user’s home directory such as `~/.config/github-sensitive-data-cleanup/identities.txt`.
Secrets & credentials2 (moderate)The skill is explicitly for scanning and removing secrets, and `rewrite_history.py` preserves the entire pre-cleanup history in a `git bundle --all` backup that may still contain sensitive material.
Privilege & persistence1 (low)It recommends installing `git-filter-repo`, `gitleaks`, and `gh` with `brew install ...`, but it does not require sudo, services, or global system changes.
Instruction hijack surface0 (none)I did not find instructions to ignore the agent’s rules, hide actions, fetch and follow remote instructions, or bypass confirmations; the `--no-verify` text is a prohibition, not a bypass.
Irreversible actions3 (high)The skill’s purpose is to rewrite Git history and then push it back to GitHub, including a forced update path (`--force-with-lease`), which can affect collaborators and public forks.
Transparency0 (none)All shipped files are readable source text; there are no binaries, embedded blobs, or decoded-at-runtime payloads.

Before installing

Rated 2026-10-20 by an automated review of 9 files from the skill's repository.

Source

Repository
daymade/claude-code-skills (all skills from this repository)
Path
github-sensitive-data-cleanup/SKILL.md
Branch
main
Updated
2026-09-20