privacy-redact
Skill1 starsChanged 5 months agoMITView on GitHub
Scan a markdown / text file for usernames, absolute paths, secrets, and project codenames; replace with placeholders. Use before promoting any private/draft file into a public commit or recommendation.
In this repository42 other files it gives its agents.
- codex/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- new-hookSkill
- new-ruleSkill
- new-skillSkill
- publishSkill
- agent-config-adapterSkill
- agent-update-watcherSkill
- autopilotSkill
- autoresearch-toolfinderSkill
- claude-desktop-sessionsSkill
- code-verifierSkill
- doc-writingSkill
- end-of-turn-markerSkill
- figma-authoring-constraintsSkill
- figma-design-fetchSkill
- autopilotSkill
- autoresearch-toolfinderSkill
- code-verifierSkill
- linux-freeze-triageSkill
- long-running-tasksSkill
- preview-templateSkill
- research-criticSkill
- agent-harness-generalSkill
- system-cleanupSkill
- verify-templateSkill
- verify-visualSkill
- init-codex-configSkill
- long-running-tasksSkill
- memory-flywheelSkill
- preview-templateSkill
- privacy-redactSkill
- prompt-librarySkill
- research-criticSkill
- system-cleanupSkill
- task-orchestratorSkill
- feature-audit-templateSkill
- workflow-fix-templateSkill
- task-relationship-analysisSkill
- tui-installerSkill
- verify-templateSkill
- verify-visualSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
Before opening a PR with private context attached
- Distinctive: line 45
When publishing a doc to a public repo for the first time
- Distinctive: line 52
Don't trust the regex for tokens — most token formats aren't covered.
- Distinctive: line 56
If you find something that LOOKS like a secret but doesn't match the regex (random 30+ character alphanumeric string), STOP and ask the …
- Distinctive: line 57
If a redaction would change semantics (e.g., a path is part of an install command), warn the user and propose a placeholder rather than …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/privacy-redact
Scan and redact private content from a file before publishing it.
Usage
/privacy-redact <file-path>What it scans for
| Pattern | Action |
| System usernames (configured per project) | Remove |
Absolute paths (/home/<user>/, /media/<user>/, /mnt/<uuid>/) | Replace with ~ (relative) or <workspace>/ |
Token-shaped strings (matching sk-…, ghp_…, gho_…, github_pat_… patterns) | STOP and warn the user — refuse to write the file with secrets present |
Email addresses (<user>@<domain>) | Remove or replace with <redacted-email> |
| Project-specific codenames | Per project's redaction map (defined in docs/CONTRIBUTING.md of the project) |
Steps
- Read the file
Multi-pattern grep to find matches (adjust
<your-username>per project):grep -nE '<your-username>|/home/|/media/|/mnt/|@gmail|@hotmail|sk-[A-Za-z]|ghp_[A-Za-z0-9]|gho_|github_pat_' <file>- Per match, show the line and proposed replacement
- Ask the user to confirm batch redaction (or per-line if uncertain). Default to ask — privacy-redact is irreversible w.r.t. the original wording.
- Apply via Edit (one Edit per replacement, or replace_all where safe)
- Re-scan to confirm clean
- Report — show what was redacted and what remains as-is
When to use
- Promoting a draft file to a public location (e.g.,
DISCOVERY.md→recommendations/*.md) - Before opening a PR with private context attached
- When publishing a doc to a public repo for the first time
Caveats
- This is a HEURISTIC, not a security tool. False negatives are possible.
- Manual review still required for sensitive cases.
- For real secrets in git history (already committed), use
git filter-branchorBFG Repo-Cleaner— this skill only handles current files, not history. - Don't trust the regex for tokens — most token formats aren't covered. Treat any unknown high-entropy string as suspicious.
Defaults to be safe
- If you find something that LOOKS like a secret but doesn't match the regex (random 30+ character alphanumeric string), STOP and ask the user before continuing.
- If a redaction would change semantics (e.g., a path is part of an install command), warn the user and propose a placeholder rather than removal.
Related
docs/CONTRIBUTING.mdof each consumer project should define a project-specific redaction map (codename → placeholder)- For repo-wide audit, run this skill on each candidate file in a loop
Example
$ /privacy-redact docs/DRAFT.md
Found N codename references that match the project's redaction map.
Proposed replacements (per redaction map in docs/CONTRIBUTING.md):
- <internal-codename-A> → <generic-placeholder-A>
- <internal-codename-B> → <generic-placeholder-B>
...
No system usernames, absolute paths, or token-shaped strings found.
Apply all N replacements? (y/n)(The actual codenames and placeholders come from each consumer project's redaction map — this skill is project-agnostic.)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

