secret-redact-before-ai
Skill1 starsChanged 3 months agoMITView on GitHub
Redact secrets and PII before sending text to an AI or committing. Use when pasting logs, env files, traces, or screenshots text, or Chinese "脱敏", "密钥", "token", "别把密码给 AI", "redact". Practical privacy guard for AI coding sessions.
- Reads credentials
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-diff-ship-checkSkill
- customer-bug-to-failing-testSkill
- dead-code-safe-deleteSkill
- env-drift-checkSkill
- feature-flag-lifecycleSkill
- flake-vs-bug-triageSkill
- minimal-repro-packSkill
- using-ship-guard-skillsSkill
The file
Files
Secret Redact Before AI
Overview
Scan user-provided or workspace text for credentials and PII; produce a redacted copy safe to paste into models. Prefer block over partial if unsure.
Patterns to flag (non-exhaustive)
- API keys, tokens,
Bearer …, JWT-shaped strings - Private keys (
BEGIN … PRIVATE KEY) - Passwords, connection strings with credentials
- Cloud keys (AKIA…, etc.), webhook secrets
- Emails/phones if user asked for PII scrub
- Internal hostnames/IPs if policy says so
Steps
- Identify corpus (paste, file paths,
git diff, log snippet). - Scan; list findings with type and location (not full secret values).
- Produce redacted text (
***REDACTED_TYPE***placeholders). - Say what still must not be committed (
.env, key files). - Optional: suggest
.gitignore/ gitleaks rules.
Exit criteria
- Corpus identified
- Findings listed without echoing full secrets
- Redacted version provided
- Commit/chat safety advice given
Anti-patterns
- Printing full secrets “for confirmation”
- Claiming “no secrets” without scanning
Output template
## Redaction report
### Findings
| type | where | action |
|------|-------|--------|
### Safe-to-paste text
...
### Do not commit
- ...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.

