sanitize
Skill0 starsChanged 5 months agoMITView on GitHub
Redact secrets and customer-identifying data from support notes, logs, and configs (HCL/JSON/YAML/.env) before they are shared with an external AI model or pasted outside the local machine. Use this BEFORE sending logs, stack traces, config files, or support-case text to any external service. Swaps sensitive values (tokens, AWS/Vault creds, private/public IPs, hostnames, emails, customer names) for stable typed placeholders like <PRIVATE_IP_1>, <HOST_1>, <REDACTED_VAULT_TOKEN_1> so debugging context survives.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Stackbilt-dev/aegis-osstheir own version, first seen Oct 8, 2026
- yuanhaorannnnnn/agent-skillstheir own version, first seen Sep 18, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Stackbilt-dev/aegis-oss★ 3same name
- yuanhaorannnnnn/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 39
When you are about to include externally-sourced text in a message that leaves the local environment, sanitize it first and use the …
- Distinctive: line 99
Use the sanitized text downstream, never the original.
- Very specific: line 100
If you ran --report, briefly tell the user what was redacted (counts by type), so they can confirm nothing important was lost or missed.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
sanitize — local support-text sanitizer
A local-first, zero-dependency CLI that strips secrets and customer-identifying
data out of support notes, logs, and configs, replacing them with stable,
typed placeholders instead of a blanket <REDACTED>. Topology and
relationships are preserved (the same IP always maps to the same placeholder in
a run), so the text stays useful for debugging while the sensitive bits are gone.
10.42.1.15 failed to connect to 10.42.1.16 on port 4647
↓
<PRIVATE_IP_1> failed to connect to <PRIVATE_IP_2> on port 4647When to use this skill
Reach for this proactively, before any of the following:
- Pasting or sending logs, stack traces, config files (HCL/JSON/YAML/
.env), or support-case notes to an external AI model or any service off this machine. - Quoting customer-provided artifacts (Nomad/Consul/Vault logs, allocation output, agent configs) into a chat, ticket, or PR that leaves the local box.
Also use it on explicit request — e.g. "sanitize this", "redact this log", "is this safe to paste?".
When you are about to include externally-sourced text in a message that leaves
the local environment, sanitize it first and use the sanitized version. If you
are unsure whether content is safe, run it through strict and show the report.
How to run it
The sanitizer is bundled inside this skill (pure Python 3.11+, no install). Call the wrapper with an absolute path so it works from any working directory:
python3 "<SKILL_DIR>/run.py" INPUT [options]<SKILL_DIR> is the directory containing this SKILL.md. Sanitized text goes to
stdout; reports go to stderr, so redirection stays clean.
Common invocations:
# Sanitize a file to stdout
python3 "<SKILL_DIR>/run.py" alloc.log
# Pipe text in (e.g. content you were about to paste)
printf '%s' "$TEXT" | python3 "<SKILL_DIR>/run.py" --report
# Choose a profile and name the customer to redact
python3 "<SKILL_DIR>/run.py" case-notes.txt --profile case-summary --customer "Acme Corp"
# Write the clean text to a file; report prints to the terminal
python3 "<SKILL_DIR>/run.py" notes.txt --report > clean.txtPicking a profile
| Profile | Use when… | Notably preserves |
strict | Unsure the content is safe. Redacts the most (incl. URLs, UUIDs, phones). | Ports, timestamps, error text. |
infra-safe (default) | You want infra/debugging context intact. | Timestamps, ports, protocols, status codes, cloud regions, generic service names. |
case-summary | Pasting a case narrative into an AI assistant. | Product names (Nomad, Consul, Vault, Terraform…), versions, the technical narrative. |
For infrastructure debugging (e.g. Nomad/Consul/Vault logs and configs),
infra-safe is usually the right default — it keeps the technical signal while
removing secrets, IPs, hostnames, and customer identity.
Useful flags
| Flag | Purpose |
-o, --output FILE | Write sanitized text to a file instead of stdout. |
--profile NAME | strict, infra-safe (default), or case-summary. |
--report | Count summary of what was redacted → stderr. |
--json-report | Machine-readable summary → stderr. |
--customer NAME | Literal org/customer name to redact as <ORG_n> (repeatable). |
--allow TERM | Term to never treat as a hostname (repeatable). |
--config FILE | Path to a .sanitizer.yml (else auto-discovered up the tree). |
--no-config | Skip .sanitizer.yml auto-discovery. |
--debug | Include original values in the report (local only; off by default). |
After sanitizing
- Use the sanitized text downstream, never the original.
- If you ran
--report, briefly tell the user what was redacted (counts by type), so they can confirm nothing important was lost or missed. - State the caveat plainly: this is a regex/heuristic tool, not a guarantee. It can miss novel secret formats and can occasionally over-redact. The user must review the output before sharing it externally.
Configuration
A .sanitizer.yml in the repo (or up the tree from the input) is auto-loaded.
It can add customer_names, an allowlist of non-hostnames, and custom
extra_patterns. See examples/sanitizer.yml.example.
Examples / reference
The examples/ folder beside this file has realistic before-text to try:
nomad-client.log, nomad-scheduler.log, consul-agent.hcl, vault-config.hcl,
case-notes.txt. Good for verifying the skill works:
python3 "<SKILL_DIR>/run.py" "<SKILL_DIR>/examples/nomad-client.log" --reportDoes 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.

