agentsclimarketplace

Sanitize

Skill louievandyke/sanitize-cli/skills/sanitize

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.From its SKILL.md

Install
npx -y skills add louievandyke/sanitize-cli --skill sanitize

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.1 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

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 4647

When 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.txt

Picking a profile

ProfileUse when…Notably preserves
strictUnsure 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-summaryPasting 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

FlagPurpose
-o, --output FILEWrite sanitized text to a file instead of stdout.
--profile NAMEstrict, infra-safe (default), or case-summary.
--reportCount summary of what was redacted → stderr.
--json-reportMachine-readable summary → stderr.
--customer NAMELiteral org/customer name to redact as <ORG_n> (repeatable).
--allow TERMTerm to never treat as a hostname (repeatable).
--config FILEPath to a .sanitizer.yml (else auto-discovered up the tree).
--no-configSkip .sanitizer.yml auto-discovery.
--debugInclude original values in the report (local only; off by default).

After sanitizing

  1. Use the sanitized text downstream, never the original.
  2. If you ran --report, briefly tell the user what was redacted (counts by type), so they can confirm nothing important was lost or missed.
  3. 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" --report

What ships with it: 15 files

38.9 KB alongside SKILL.md, 9 of them executable

sanitizer/

Keep looking

Skills are one crate of 326,286. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.