privacy-hygiene
Full-repo sweep for personal data and secrets before commit or durable GitHub post. Use when preparing a PR, cleaning a leak, or when the user asks for a privacy or secret sweep of a repository.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- privacy-hygiene
- description
- Full-repo sweep for personal data and secrets before commit or durable GitHub post. Use when preparing a PR, cleaning a leak, or when the user asks for a privacy or secret sweep of a repository.
02 资源文件 1
- 参考文档reference/sweep-procedure.md2.6 KB
03 SKILL.md 正文
privacy-hygiene
Overview
Find and remove personal data and high-confidence secrets before they land in git history or a durable GitHub post. No write-time hook scans for these. This skill is the sweep.
Announce at start: "Running privacy-hygiene sweep."
When to run a full sweep
- Before the first push of a branch that touched logs, screenshots, config samples, or machine-local paths
- After a
tracked-secretsor gitleaks finding on email, home path, LAN address, or secret material - Before opening a PR to a repository that is public (or will be made public)
- After pasting support tickets, env dumps, or terminal transcripts into the tree
What the automated gate blocks
| Category | Blocked examples | Allowed residual |
|---|---|---|
user@example.com |
user@example.com, user@example.org, user@example.net |
|
| Home path | C:/Users/example/..., /Users/example/..., /home/example/... |
C:/Users/example/..., C:/Users/<you>/..., /Users/alice/... |
| LAN address | Unlisted 10.x / 172.16–31.x / 192.168.x |
Public addresses; your NAS host from CLAUDE_NAS_HOST or ~/.claude/local-identity.json; entries in ALL_ALLOWLISTED_PRIVATE_IP_ADDRESSES |
| Secret | ghp_…, github_pat_…, AKIA…, PEM private-key headers |
Public keys, redacted ***, env var names without values |
Surfaces:
- Committed tree.
scripts/repository_policy.pyruns itstracked-secretscheck over every tracked file with this scanner, and CI runs the same command - CI — the
committed-treejob in.github/workflows/ci-tests.ymlruns gitleaks over every commit the pull request adds, test files included. The repository-root.gitleaks.tomladds three rules to the gitleaks defaults: a user folder path that names a person, an RFC 1918 address, and an email other than a noreply or example address. To clear a fixture that must stay, add its gitleaks fingerprint to.gitleaksignore
Sweep procedure
Run the full-tree sweep in
reference/sweep-procedure.md: scope the tree,
run the ripgrep pass for the four high-confidence pattern families (email, home
path, LAN address, secret), review each hit against the ignore list, and
remediate. It also lists the accepted residual — what to leave in place rather
than over-scrub. The ripgrep command is the only pass over the tree.
Enable on any machine / public repository
Install or reinstall the package so hooks and this skill land under ~/.claude/:
cd packages/claude-dev-env
node bin/install.mjs
Once installed, this skill is available in every repository the agent touches, private or public. No installed hook scans a write, a commit, or a post.
Open knobs
- NAS / LAN allowlist: Unlisted private IPs are blocked. The scanner resolves your NAS host from
CLAUDE_NAS_HOST, then~/.claude/local-identity.json(nas.host), and allowlists it when it is a private address, so the committed tree holds no host address.ALL_ALLOWLISTED_PRIVATE_IP_ADDRESSESinhooks_constantsholds the static allowlist for any host every machine must share. - Public maintainer identity: when an email or name is intentional product surface, keep it and note that in the PR body so reviewers do not treat it as a leak.
What this skill does not do
- Does not rewrite git history without explicit user approval
- Does not rotate credentials for you
- Does not scan commit-message text (
-m/-F); keep messages free of secrets yourself
04 同仓库更多 Skills
update
Fast-forwards a local repository's main branch to a remote's main after confirming the repo path and source remote through AskUserQuestion. Use when the user says '/update', 'update main', 'fast-forward main', 'sync main from origin', 'pull latest main into <path>', or 'bring main up to date'.
source-command-sr-loop
Converging cleanup loop: repeat /simplify until clean, then repeat /code-review --fix until clean
skill-builder
Skill lifecycle: classify, scaffold, write via the skill-writer-agent, self-audit, compose sub-skills, polish description triggers, enforce deterministic scripts. Triggers: build a skill, new skill workflow, improve this skill, optimize skill description, skill development lifecycle, skill modularity, skill composition, description trigger catalog, deterministic skill scripts.
session-tidy
Audit, clean, and consolidate session logs in the Obsidian vault. Fixes format drift, resolves orphaned next-steps, updates stale statuses, and generates project rollup summaries. Use when session logs feel cluttered or before starting a new project milestone. Triggers on '/session-tidy', 'tidy sessions', 'clean up session logs', 'session audit'.
session-log
Logs a session report as an HTML page, tracks vault context, extracts decisions, and outputs a /rename command. Use for /session-log, 'journal this session', 'log this work', 'session report', 'summarize/log/record this session', 'save session', 'capture session', or 'document what we did'.
run-claude-dev-env
Build, install, run, and test the claude-dev-env installer. Use when asked to run claude-dev-env, install the Claude Code config into ~/.claude, drive the installer, smoke-test it against a sandbox, or run its test suite.